@inklu/docs 0.2.0 → 0.2.2
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/CHANGELOG.md +12 -0
- package/dist/index.js +31 -36
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -43
- package/dist/index.mjs.map +1 -1
- package/dist/shiki.js +2 -2
- package/dist/shiki.js.map +1 -1
- package/dist/shiki.mjs +2 -2
- package/dist/shiki.mjs.map +1 -1
- package/dist/styles.css +113 -72
- package/package.json +2 -1
- package/src/components/content/code-block.tsx +6 -4
- package/src/components/layout/docs-layout.tsx +26 -39
- package/src/components/layout/site-header.tsx +1 -1
- package/src/components/layout/site-provider.tsx +2 -0
- package/src/components/shared/command-block.tsx +3 -3
- package/src/shiki.ts +2 -2
- package/src/styles.css +4 -4
- package/src/typeset.css +66 -37
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -913,7 +913,7 @@ function CommandBlock({
|
|
|
913
913
|
}
|
|
914
914
|
};
|
|
915
915
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "not-typeset mt-6 rounded-2xl border-0 bg-code overflow-hidden", children: [
|
|
916
|
-
items.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-0.5 px-3 pb-1.5 pt-
|
|
916
|
+
items.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-0.5 px-3 pb-1.5 pt-2.5 justify-between", children: [
|
|
917
917
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex items-center gap-0.5 ", children: items.map((it, i) => {
|
|
918
918
|
const isActive = i === active;
|
|
919
919
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
@@ -922,7 +922,7 @@ function CommandBlock({
|
|
|
922
922
|
type: "button",
|
|
923
923
|
onClick: () => setActive(i),
|
|
924
924
|
className: cn(
|
|
925
|
-
"relative cursor-pointer rounded-md px-1.5 py-0.5 font-mono outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring",
|
|
925
|
+
"relative cursor-pointer rounded-md px-1.5 py-0.5 font-mono text-xs outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring",
|
|
926
926
|
isActive ? "text-foreground" : "text-muted-foreground hover:bg-accent hover:text-foreground"
|
|
927
927
|
),
|
|
928
928
|
children: [
|
|
@@ -956,7 +956,7 @@ function CommandBlock({
|
|
|
956
956
|
)
|
|
957
957
|
] }),
|
|
958
958
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center", children: [
|
|
959
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex-1 overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("pre", { className: "flex items-center overflow-x-auto px-
|
|
959
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex-1 overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("pre", { className: "flex items-center overflow-x-auto px-4 py-3.5 font-mono text-[13px] leading-5 text-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("code", { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TextMorph, { children: cur.command }) }) }) }),
|
|
960
960
|
items.length === 1 && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
961
961
|
Button,
|
|
962
962
|
{
|
|
@@ -1049,14 +1049,16 @@ function CodeBlock({ html, code, className }) {
|
|
|
1049
1049
|
"[&_pre]:m-0",
|
|
1050
1050
|
"[&_pre]:overflow-x-auto",
|
|
1051
1051
|
"[&_pre]:bg-transparent!",
|
|
1052
|
-
"[&_pre]:px-
|
|
1053
|
-
"[&_pre]:py-
|
|
1052
|
+
"[&_pre]:px-4",
|
|
1053
|
+
"[&_pre]:py-3.5",
|
|
1054
1054
|
"[&_pre]:font-mono",
|
|
1055
|
-
"[&_pre]:
|
|
1055
|
+
"[&_pre]:text-[13px]",
|
|
1056
|
+
"[&_pre]:leading-5",
|
|
1056
1057
|
"[&_code]:bg-transparent!",
|
|
1057
1058
|
"[&_code]:p-0",
|
|
1058
1059
|
"[&_code]:font-inherit",
|
|
1059
|
-
"[&
|
|
1060
|
+
"[&_code]:text-[13px]",
|
|
1061
|
+
"[&_.line]:min-h-5",
|
|
1060
1062
|
"[&_pre::-webkit-scrollbar]:h-2",
|
|
1061
1063
|
"[&_pre::-webkit-scrollbar-track]:bg-transparent",
|
|
1062
1064
|
"[&_pre::-webkit-scrollbar-thumb]:rounded-full",
|
|
@@ -1539,45 +1541,32 @@ function DocsLayout({
|
|
|
1539
1541
|
import_link.default,
|
|
1540
1542
|
{
|
|
1541
1543
|
href: indexUrl,
|
|
1542
|
-
className: "text-sm text-
|
|
1544
|
+
className: "text-sm text-foreground/50 hover:text-foreground flex items-center gap-1.5 transition-colors duration-200 select-none",
|
|
1543
1545
|
children: [
|
|
1544
1546
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_icons2.ArrowLeftIcon, { className: "size-3.5" }),
|
|
1545
1547
|
indexLabel
|
|
1546
1548
|
]
|
|
1547
1549
|
}
|
|
1548
1550
|
),
|
|
1549
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "text-xs font-mono text-
|
|
1551
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "text-xs font-mono text-foreground/35 flex items-center gap-0.5 tabular-nums", children: [
|
|
1550
1552
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SlidingNumber, { value: progress }),
|
|
1551
1553
|
"%"
|
|
1552
1554
|
] })
|
|
1553
1555
|
] }),
|
|
1554
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("
|
|
1556
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("nav", { className: "flex flex-row flex-wrap gap-x-4 gap-y-1.5 md:flex-col md:gap-y-2", children: links.flatMap((group) => group.items).map((link) => {
|
|
1555
1557
|
const active = isLinkActive(link.url, link.isAnchor);
|
|
1556
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.
|
|
1558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1557
1559
|
import_link.default,
|
|
1558
1560
|
{
|
|
1559
1561
|
href: link.url,
|
|
1560
1562
|
onClick: (e) => handleAnchorClick(e, link.url),
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
import_react16.motion.div,
|
|
1565
|
-
{
|
|
1566
|
-
layoutId: "activeDocsLinkBg",
|
|
1567
|
-
className: "absolute inset-0 bg-secondary/50 rounded-md",
|
|
1568
|
-
transition: {
|
|
1569
|
-
type: "spring",
|
|
1570
|
-
duration: 0.3,
|
|
1571
|
-
bounce: 0
|
|
1572
|
-
}
|
|
1573
|
-
}
|
|
1574
|
-
),
|
|
1575
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "relative z-10", children: link.title })
|
|
1576
|
-
]
|
|
1563
|
+
"aria-current": active ? "location" : void 0,
|
|
1564
|
+
className: `text-sm transition-colors duration-200 ${active ? "text-foreground font-medium" : "text-foreground/45 hover:text-foreground/75"}`,
|
|
1565
|
+
children: link.title
|
|
1577
1566
|
},
|
|
1578
1567
|
link.title
|
|
1579
1568
|
);
|
|
1580
|
-
}) })
|
|
1569
|
+
}) })
|
|
1581
1570
|
] }),
|
|
1582
1571
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("main", { className: "flex-1 min-w-0", children })
|
|
1583
1572
|
] })
|
|
@@ -1940,7 +1929,7 @@ function SiteHeader({
|
|
|
1940
1929
|
),
|
|
1941
1930
|
children: [
|
|
1942
1931
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_icons4.GitHubLogoIcon, {}),
|
|
1943
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "hidden sm:inline", children: "GitHub" })
|
|
1932
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "hidden sm:inline text-sm", children: "GitHub" })
|
|
1944
1933
|
]
|
|
1945
1934
|
}
|
|
1946
1935
|
)
|
|
@@ -1966,6 +1955,9 @@ function SiteLayout({ children, header, footer }) {
|
|
|
1966
1955
|
] });
|
|
1967
1956
|
}
|
|
1968
1957
|
|
|
1958
|
+
// src/components/layout/site-provider.tsx
|
|
1959
|
+
var import_react22 = require("@vercel/analytics/react");
|
|
1960
|
+
|
|
1969
1961
|
// src/components/ui/direction.tsx
|
|
1970
1962
|
var import_direction_provider = require("@base-ui/react/direction-provider");
|
|
1971
1963
|
|
|
@@ -1979,25 +1971,28 @@ function ThemeProvider(props) {
|
|
|
1979
1971
|
// src/components/layout/site-provider.tsx
|
|
1980
1972
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1981
1973
|
function SiteProvider({ children }) {
|
|
1982
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.
|
|
1974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1983
1975
|
ThemeProvider,
|
|
1984
1976
|
{
|
|
1985
1977
|
attribute: "class",
|
|
1986
1978
|
defaultTheme: "dark",
|
|
1987
1979
|
enableSystem: true,
|
|
1988
1980
|
disableTransitionOnChange: true,
|
|
1989
|
-
children:
|
|
1981
|
+
children: [
|
|
1982
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_direction_provider.DirectionProvider, { direction: "ltr", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ToastProvider, { position: "bottom-right", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(AnchoredToastProvider, { children }) }) }),
|
|
1983
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react22.Analytics, {})
|
|
1984
|
+
]
|
|
1990
1985
|
}
|
|
1991
1986
|
);
|
|
1992
1987
|
}
|
|
1993
1988
|
|
|
1994
1989
|
// src/components/layout/site-template.tsx
|
|
1995
|
-
var
|
|
1990
|
+
var import_react23 = require("motion/react");
|
|
1996
1991
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1997
1992
|
function SiteTemplate({ children }) {
|
|
1998
|
-
const reduced = (0,
|
|
1993
|
+
const reduced = (0, import_react23.useReducedMotion)();
|
|
1999
1994
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2000
|
-
|
|
1995
|
+
import_react23.motion.div,
|
|
2001
1996
|
{
|
|
2002
1997
|
initial: reduced ? false : { opacity: 0 },
|
|
2003
1998
|
animate: { opacity: 1 },
|
|
@@ -2111,14 +2106,14 @@ function ButtonGroupSeparator({
|
|
|
2111
2106
|
}
|
|
2112
2107
|
|
|
2113
2108
|
// src/components/ui/card.tsx
|
|
2114
|
-
var
|
|
2109
|
+
var import_react24 = require("@lisse/react");
|
|
2115
2110
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2116
2111
|
function Card({
|
|
2117
2112
|
className,
|
|
2118
2113
|
size = "default",
|
|
2119
2114
|
...props
|
|
2120
2115
|
}) {
|
|
2121
|
-
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react24.SmoothCorners, { asChild: true, corners: { radius: 24, smoothing: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2122
2117
|
"div",
|
|
2123
2118
|
{
|
|
2124
2119
|
"data-slot": "card",
|