@dreamlake/dockit 0.2.27 → 0.2.28
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/dist/components/ContentRow.d.ts +7 -0
- package/dist/components/ContentRow.js +18 -0
- package/dist/components/mdx-components.d.ts +2 -0
- package/dist/components/mdx-components.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/renderer/Layout.js +1 -0
- package/dist/styles.css +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export interface ContentRowProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** Expand into the prose gutters, staying inside the content column. */
|
|
4
|
+
width?: "wide" | "text";
|
|
5
|
+
}
|
|
6
|
+
/** A responsive row for diagrams, examples and comparisons wider than prose. */
|
|
7
|
+
export declare function ContentRow({ width, className, ...props }: ContentRowProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
function ContentRow({
|
|
3
|
+
width = "wide",
|
|
4
|
+
className = "",
|
|
5
|
+
...props
|
|
6
|
+
}) {
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
"div",
|
|
9
|
+
{
|
|
10
|
+
...props,
|
|
11
|
+
className: `doc-content-row ${className}`,
|
|
12
|
+
"data-width": width
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
ContentRow
|
|
18
|
+
};
|
|
@@ -2,6 +2,7 @@ import { ComponentPropsWithoutRef } from 'react';
|
|
|
2
2
|
import { Table } from './Table';
|
|
3
3
|
import { Callout } from './Callout';
|
|
4
4
|
import { Chip } from './Chip';
|
|
5
|
+
import { ContentRow } from './ContentRow';
|
|
5
6
|
import { Preview } from './Preview';
|
|
6
7
|
import { StatusTable, TestStatus } from './StatusTable';
|
|
7
8
|
/**
|
|
@@ -27,6 +28,7 @@ export declare const mdxComponents: {
|
|
|
27
28
|
Callout: typeof Callout;
|
|
28
29
|
Chip: typeof Chip;
|
|
29
30
|
Preview: typeof Preview;
|
|
31
|
+
ContentRow: typeof ContentRow;
|
|
30
32
|
StatusTable: typeof StatusTable;
|
|
31
33
|
TestStatus: typeof TestStatus;
|
|
32
34
|
};
|
|
@@ -4,6 +4,7 @@ import { CodeBlock } from "./CodeBlock.js";
|
|
|
4
4
|
import { Table } from "./Table.js";
|
|
5
5
|
import { Callout } from "./Callout.js";
|
|
6
6
|
import { Chip } from "./Chip.js";
|
|
7
|
+
import { ContentRow } from "./ContentRow.js";
|
|
7
8
|
import { Preview } from "./Preview.js";
|
|
8
9
|
import { TestStatus, StatusTable } from "./StatusTable.js";
|
|
9
10
|
const InsidePreContext = createContext(false);
|
|
@@ -341,6 +342,7 @@ const mdxComponents = {
|
|
|
341
342
|
Callout,
|
|
342
343
|
Chip,
|
|
343
344
|
Preview,
|
|
345
|
+
ContentRow,
|
|
344
346
|
StatusTable,
|
|
345
347
|
TestStatus
|
|
346
348
|
};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -30,6 +30,7 @@ import { TOC } from "./components/TOC.js";
|
|
|
30
30
|
import { Topbar } from "./components/Topbar.js";
|
|
31
31
|
import { VersionBadge } from "./components/VersionBadge.js";
|
|
32
32
|
import { Layout, useMerge } from "./renderer/Layout.js";
|
|
33
|
+
import { ContentRow } from "./components/ContentRow.js";
|
|
33
34
|
function initDocs(opts) {
|
|
34
35
|
if (opts.pages && opts.pageMetadata) {
|
|
35
36
|
throw new Error("initDocs: provide pageMetadata or pages, not both");
|
|
@@ -48,6 +49,7 @@ export {
|
|
|
48
49
|
CodeBlock,
|
|
49
50
|
CodeExample,
|
|
50
51
|
CodeTabs,
|
|
52
|
+
ContentRow,
|
|
51
53
|
DOC_PREFIX,
|
|
52
54
|
DocFooter,
|
|
53
55
|
Layout,
|
package/dist/renderer/Layout.js
CHANGED
|
@@ -145,6 +145,7 @@ function Layout({ children }) {
|
|
|
145
145
|
/* @__PURE__ */ jsxs(
|
|
146
146
|
"main",
|
|
147
147
|
{
|
|
148
|
+
"data-doc-fullscreen": isFullscreen || void 0,
|
|
148
149
|
...current?.noindex ? {} : { "data-pagefind-body": true },
|
|
149
150
|
...current?.hidden ? { "data-pagefind-meta": "hidden:true" } : {},
|
|
150
151
|
className: isFullscreen ? "doc-content w-full min-w-0 h-full overflow-auto p-4" : "doc-content w-full min-w-0 px-[18px] pb-20 lg:px-[56px] lg:pb-[120px] lg:max-w-[760px]",
|
package/dist/styles.css
CHANGED
|
@@ -427,3 +427,11 @@
|
|
|
427
427
|
}
|
|
428
428
|
.dockit-code-tabs[data-first-active='true'] [role='tabpanel'] { border-top-left-radius: 0; }
|
|
429
429
|
.dockit-code-tabs [role='tabpanel'][hidden] { display: none; }
|
|
430
|
+
|
|
431
|
+
/* ContentRow borrows only the main column gutters, never the sidebar/TOC. */
|
|
432
|
+
.doc-content { --doc-row-bleed: 6px; }
|
|
433
|
+
.doc-content-row { min-width: 0; margin-block: 24px; }
|
|
434
|
+
.doc-content-row[data-width="wide"] { width: calc(100% + 2 * var(--doc-row-bleed, 0px)); margin-inline: calc(-1 * var(--doc-row-bleed, 0px)); }
|
|
435
|
+
.doc-content-row > * { min-width: 0; }
|
|
436
|
+
@media (min-width: 1024px) { .doc-content { --doc-row-bleed: 40px; } }
|
|
437
|
+
.doc-content[data-doc-fullscreen] { --doc-row-bleed: 0px; }
|
package/package.json
CHANGED