@publish.os/nextjs 0.0.1-alpha.90 → 0.0.1-alpha.92
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/index.tsx +16 -11
- package/compiler-assets/nextjs/defaults/group/layout.tsx +6 -6
- package/compiler-assets/nextjs/defaults/group/page.tsx +36 -26
- package/compiler-assets/nextjs/defaults/project/next.config.mjs +21 -11
- 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/defaults/root/index.tsx +16 -11
- package/compiler-assets/nextjs/defaults/root/layout.tsx +7 -3
- package/compiler-assets/nextjs/shims/agent-user-agents.ts +65 -0
- package/compiler-assets/nextjs/shims/document.tsx +46 -0
- package/compiler-assets/nextjs/shims/generated-leaf-page.tsx +5 -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 +254 -86
- 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-CJDUL4OW.js} +29 -23
- package/dist/{button-c3WGnxIj.d.ts → button-D6Xp2HBm.d.ts} +4 -4
- package/dist/capture-local-source-WGGDIUU2.js +258 -0
- package/dist/chunk-22RSSUNV.js +13 -0
- package/dist/chunk-3T4HVDSC.js +426 -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-DX7PXFCM.js +2519 -0
- package/dist/{chunk-726GV2NF.js → chunk-DZ3VWEV5.js} +950 -632
- package/dist/chunk-EFO6AWXN.js +19 -0
- package/dist/chunk-IL4RJOKI.js +186 -0
- package/dist/{chunk-H6XILMZX.js → chunk-NHSLTARU.js} +2588 -1493
- package/dist/{chunk-DLDFHU7Y.js → chunk-NNBJZPFM.js} +4 -2
- package/dist/{chunk-VO2I7MTM.js → chunk-SBMDONTV.js} +10 -7
- package/dist/{chunk-YLTOLYWM.js → chunk-WL75GQ5M.js} +6 -18
- package/dist/compiler.d.ts +15 -2
- package/dist/compiler.js +111 -23
- package/dist/components/blocks/agent-actions.d.ts +81 -0
- package/dist/components/blocks/agent-actions.js +563 -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 +4 -0
- package/dist/components/ui/button.js +94 -0
- package/dist/compose-44GJSMXD.js +16 -0
- package/dist/config/createNextConfig.js +19 -3
- package/dist/{dev-operation-TZDVJCN7.js → dev-operation-WNECBHZ5.js} +134 -84
- package/dist/{framework-selection-X4U6Y6QC.js → framework-selection-ZVO323PK.js} +3 -2
- package/dist/ide-support-TG74L4FF.js +16 -0
- package/dist/index.d.ts +151 -95
- package/dist/index.js +25 -0
- 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 +37 -8
- package/dist/kernel/components/blocks/AgentActions.js +384 -174
- package/dist/kernel/components/blocks/agent-actions.d.ts +4 -0
- package/dist/kernel/components/blocks/agent-actions.js +563 -0
- package/dist/kernel/components/blocks/animated-icon-swap.d.ts +2 -2
- package/dist/kernel/components/blocks/animated-icon-swap.js +1 -1
- package/dist/kernel/components/blocks/color-palette.d.ts +2 -2
- package/dist/kernel/components/blocks/color-palette.js +4 -4
- package/dist/kernel/components/blocks/logo-block.d.ts +2 -2
- package/dist/kernel/components/blocks/logo-block.js +1 -1
- package/dist/kernel/components/blocks/nav-breadcrumb.d.ts +6 -5
- package/dist/kernel/components/blocks/nav-breadcrumb.js +21 -15
- package/dist/kernel/components/blocks/navbar.d.ts +5 -4
- package/dist/kernel/components/blocks/navbar.js +79 -59
- package/dist/kernel/components/blocks/navigation-progress.d.ts +2 -2
- package/dist/kernel/components/blocks/navigation-progress.js +2 -2
- package/dist/kernel/components/blocks/next-prev.d.ts +4 -4
- package/dist/kernel/components/blocks/next-prev.js +30 -7
- package/dist/kernel/components/blocks/page-list.d.ts +4 -4
- package/dist/kernel/components/blocks/page-list.js +32 -9
- package/dist/kernel/components/blocks/search.d.ts +9 -15
- package/dist/kernel/components/blocks/search.js +16 -17
- package/dist/kernel/components/blocks/sidebar-node.d.ts +3 -5
- package/dist/kernel/components/blocks/sidebar-node.js +13 -3
- package/dist/kernel/components/blocks/sidebar.d.ts +6 -7
- package/dist/kernel/components/blocks/sidebar.js +137 -28
- package/dist/kernel/components/blocks/theme-toggle.d.ts +3 -4
- 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 +20 -2
- package/dist/kernel/components/blocks/toc.js +121 -179
- package/dist/kernel/components/mdx/components/blockquote.d.ts +2 -2
- package/dist/kernel/components/mdx/components/blockquote.js +1 -1
- package/dist/kernel/components/mdx/components/callout.d.ts +3 -3
- package/dist/kernel/components/mdx/components/callout.js +1 -1
- package/dist/kernel/components/mdx/components/code-block.d.ts +2 -2
- package/dist/kernel/components/mdx/components/code-block.js +2 -2
- package/dist/kernel/components/mdx/components/copy-code-button.d.ts +2 -2
- package/dist/kernel/components/mdx/components/copy-code-button.js +5 -4
- package/dist/kernel/components/mdx/components/figure-caption.d.ts +3 -3
- package/dist/kernel/components/mdx/components/figure-caption.js +3 -2
- package/dist/kernel/components/mdx/components/figure.d.ts +8 -4
- package/dist/kernel/components/mdx/components/figure.js +23 -13
- package/dist/kernel/components/mdx/components/footnotes.d.ts +2 -2
- package/dist/kernel/components/mdx/components/footnotes.js +1 -1
- package/dist/kernel/components/mdx/components/heading-copy-link.d.ts +2 -2
- package/dist/kernel/components/mdx/components/heading-copy-link.js +1 -1
- package/dist/kernel/components/mdx/components/heading.d.ts +2 -2
- package/dist/kernel/components/mdx/components/heading.js +6 -3
- package/dist/kernel/components/mdx/components/hr.d.ts +4 -4
- package/dist/kernel/components/mdx/components/hr.js +2 -2
- package/dist/kernel/components/mdx/components/image-zoom.d.ts +3 -3
- package/dist/kernel/components/mdx/components/image-zoom.js +4 -3
- package/dist/kernel/components/mdx/components/image.d.ts +2 -2
- package/dist/kernel/components/mdx/components/image.js +22 -17
- package/dist/kernel/components/mdx/components/inline-code.d.ts +2 -2
- package/dist/kernel/components/mdx/components/inline-code.js +1 -1
- package/dist/kernel/components/mdx/components/kbd.d.ts +3 -3
- package/dist/kernel/components/mdx/components/kbd.js +2 -2
- package/dist/kernel/components/mdx/components/link.d.ts +6 -6
- package/dist/kernel/components/mdx/components/link.js +2 -2
- package/dist/kernel/components/mdx/components/paragraph.d.ts +2 -2
- package/dist/kernel/components/mdx/components/paragraph.js +1 -1
- package/dist/kernel/components/mdx/components/strikethrough.d.ts +2 -2
- package/dist/kernel/components/mdx/components/strikethrough.js +1 -1
- package/dist/kernel/components/mdx/components/table.d.ts +7 -7
- package/dist/kernel/components/mdx/components/table.js +2 -2
- package/dist/kernel/components/mdx/components/task-list.d.ts +3 -3
- package/dist/kernel/components/mdx/components/task-list.js +1 -1
- package/dist/kernel/components/mdx/components/video-player.d.ts +8 -4
- package/dist/kernel/components/mdx/components/video-player.js +6 -2
- package/dist/kernel/components/mdx/components/video.d.ts +5 -4
- package/dist/kernel/components/mdx/components/video.js +7 -5
- package/dist/kernel/components/mdx/error-boundary.d.ts +3 -4
- package/dist/kernel/components/mdx/error-boundary.js +2 -2
- package/dist/kernel/components/mdx/error-fallback.d.ts +2 -2
- package/dist/kernel/components/mdx/error-fallback.js +1 -1
- package/dist/kernel/components/mdx/mdx.d.ts +57 -16
- package/dist/kernel/components/mdx/mdx.js +232 -35
- 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.d.ts +7 -7
- package/dist/kernel/components/ui/accordion.js +1 -1
- package/dist/kernel/components/ui/breadcrumb-trail.d.ts +3 -4
- package/dist/kernel/components/ui/breadcrumb-trail.js +2 -2
- package/dist/kernel/components/ui/breadcrumb.d.ts +14 -14
- package/dist/kernel/components/ui/breadcrumb.js +4 -4
- package/dist/kernel/components/ui/button-group.d.ts +6 -6
- package/dist/kernel/components/ui/button-group.js +3 -3
- package/dist/kernel/components/ui/button.d.ts +59 -7
- package/dist/kernel/components/ui/button.js +43 -39
- package/dist/kernel/components/ui/card.d.ts +7 -7
- package/dist/kernel/components/ui/card.js +1 -1
- package/dist/kernel/components/ui/dialog.d.ts +10 -10
- package/dist/kernel/components/ui/dialog.js +1 -1
- package/dist/kernel/components/ui/drawer.d.ts +12 -12
- 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 +4 -4
- package/dist/kernel/components/ui/kbd.js +1 -1
- package/dist/kernel/components/ui/link.d.ts +11 -5
- package/dist/kernel/components/ui/link.js +2 -2
- package/dist/kernel/components/ui/menu.d.ts +22 -22
- package/dist/kernel/components/ui/menu.js +1 -1
- package/dist/kernel/components/ui/mod-key.d.ts +2 -3
- package/dist/kernel/components/ui/mod-key.js +2 -2
- package/dist/kernel/components/ui/navigation-menu.d.ts +15 -15
- package/dist/kernel/components/ui/navigation-menu.js +1 -1
- package/dist/kernel/components/ui/popover.d.ts +11 -11
- package/dist/kernel/components/ui/popover.js +1 -1
- package/dist/kernel/components/ui/progress.d.ts +7 -7
- package/dist/kernel/components/ui/progress.js +1 -1
- package/dist/kernel/components/ui/scroll-area.d.ts +9 -10
- package/dist/kernel/components/ui/scroll-area.js +1 -1
- package/dist/kernel/components/ui/select.d.ts +16 -16
- package/dist/kernel/components/ui/select.js +1 -1
- package/dist/kernel/components/ui/separator.d.ts +3 -3
- package/dist/kernel/components/ui/separator.js +1 -1
- package/dist/kernel/components/ui/table.d.ts +7 -7
- package/dist/kernel/components/ui/table.js +1 -1
- package/dist/kernel/components/ui/tabs.d.ts +12 -12
- package/dist/kernel/components/ui/tabs.js +1 -1
- package/dist/kernel/components/ui/tag.d.ts +3 -3
- package/dist/kernel/components/ui/tag.js +1 -1
- package/dist/kernel/components/ui/text.d.ts +4 -4
- package/dist/kernel/components/ui/text.js +1 -1
- package/dist/kernel/components/ui/toast.d.ts +11 -11
- package/dist/kernel/components/ui/toast.js +1 -1
- package/dist/kernel/components/ui/tooltip.d.ts +9 -9
- package/dist/kernel/components/ui/tooltip.js +1 -1
- package/dist/kernel/defaults.registry.d.ts +4 -17
- package/dist/kernel/defaults.registry.js +4 -19
- package/dist/kernel/routes/agent/markdown.d.ts +7 -0
- package/dist/kernel/routes/agent/markdown.js +229 -54
- 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 -2
- package/dist/kernel/routes/metadata/feed.js +119 -88
- package/dist/kernel/routes/metadata/llms.d.ts +3 -23
- package/dist/kernel/routes/metadata/llms.js +2 -103
- package/dist/kernel/routes/metadata/og-image.js +1 -1
- package/dist/kernel/routes/metadata/robots.d.ts +5 -3
- package/dist/kernel/routes/metadata/robots.js +4 -25
- package/dist/kernel/routes/metadata/sitemap.d.ts +36 -3
- package/dist/kernel/routes/metadata/sitemap.js +277 -49
- 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 +5 -5
- package/dist/kernel/routes/pages/group.js +11 -5
- package/dist/kernel/routes/pages/leaf.d.ts +38 -6
- package/dist/kernel/routes/pages/leaf.js +21 -12
- package/dist/kernel/routes/pages/root.d.ts +5 -5
- package/dist/kernel/routes/pages/root.js +21 -6
- package/dist/keyboard-shortcuts.d.ts +2 -2
- package/dist/keyboard-shortcuts.js +1 -1
- package/dist/manifest-types-CcVPH_jh.d.ts +83 -0
- package/dist/resolvers/manifest-resolver.d.ts +2 -2
- package/dist/resolvers/manifest-resolver.js +65 -35
- package/dist/route-metadata-og-image-BeKKFHg7.d.ts +58 -0
- package/dist/search.d.ts +2 -9
- package/dist/search.js +9 -16
- package/dist/sidebar-types-CMrMM0Nj.d.ts +105 -0
- package/dist/theme-scope.d.ts +2 -2
- package/dist/theme-scope.js +1 -1
- package/dist/types-BbqmOzLC.d.ts +168 -0
- package/dist/types-TjH1ek0X.d.ts +22 -0
- package/dist/types-sM2g9nW0.d.ts +12 -0
- package/dist/types.d.ts +117 -91
- 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-EN2GW4FR.js +16 -0
- package/dist/validate-publish-os-source-OEWQDB7B.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 +85 -0
- package/init/seed/minimal/publish.os/blog/layout.tsx +13 -0
- package/init/seed/minimal/publish.os/blog/page.tsx +91 -0
- package/init/seed/minimal/publish.os/components/blog/copy-link.tsx +64 -0
- package/init/seed/minimal/publish.os/components/blog/frontmatter.ts +41 -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 +17 -2
- package/init/seed/minimal/publish.os/theme.css +3 -3
- package/init/seed/minimal/seed.json +12 -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 +48 -23
- package/release/app/phosphor/package.json +4 -4
- package/release/app/phosphor/pnpm-lock.yaml.template +123 -184
- package/release/compiler/package.json +5 -3
- package/release/compiler/pnpm-lock.yaml.template +153 -183
- 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/sidebar-types-DKpR27II.d.ts +0 -25
- package/dist/types-BzkZty3r.d.ts +0 -147
- package/dist/types-CJWRG05y.d.ts +0 -76
- package/dist/types-CUtrppxt.d.ts +0 -69
- 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,6 +1,6 @@
|
|
|
1
1
|
// src/components/mdx/hr.tsx
|
|
2
|
-
import { Separator } from "@
|
|
3
|
-
import { jsx } from "
|
|
2
|
+
import { Separator } from "@components/ui/separator";
|
|
3
|
+
import { jsx } from "@publish.os/nextjs/jsx-runtime";
|
|
4
4
|
function Hr({ className, ...props }) {
|
|
5
5
|
return /* @__PURE__ */ jsx(Separator, { className, ...props });
|
|
6
6
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as react from 'react';
|
|
3
2
|
import { ReactNode } from 'react';
|
|
4
3
|
|
|
5
|
-
declare function ImageZoom({ children, enabled, }: {
|
|
4
|
+
declare function ImageZoom({ children, enabled, src, }: {
|
|
6
5
|
children: ReactNode;
|
|
7
6
|
enabled: boolean;
|
|
8
|
-
|
|
7
|
+
src?: string;
|
|
8
|
+
}): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react.JSX.Element | null | undefined;
|
|
9
9
|
|
|
10
10
|
export { ImageZoom };
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
// src/components/mdx/image/image-zoom.tsx
|
|
4
4
|
import Zoom from "react-medium-image-zoom";
|
|
5
|
-
import { jsx } from "
|
|
5
|
+
import { jsx } from "@publish.os/nextjs/jsx-runtime";
|
|
6
6
|
function ImageZoom({
|
|
7
7
|
children,
|
|
8
|
-
enabled
|
|
8
|
+
enabled,
|
|
9
|
+
src
|
|
9
10
|
}) {
|
|
10
|
-
return enabled ? /* @__PURE__ */ jsx(Zoom, { zoomMargin: 40, children }) : children;
|
|
11
|
+
return enabled ? /* @__PURE__ */ jsx(Zoom, { zoomImg: src ? { src } : void 0, zoomMargin: 40, children }) : children;
|
|
11
12
|
}
|
|
12
13
|
export {
|
|
13
14
|
ImageZoom
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
|
|
3
3
|
type ImageProps = Omit<React.ComponentPropsWithoutRef<"img">, "height" | "sizes" | "width"> & {
|
|
4
4
|
aspect?: number | `${number}/${number}`;
|
|
@@ -16,6 +16,6 @@ type ImageProps = Omit<React.ComponentPropsWithoutRef<"img">, "height" | "sizes"
|
|
|
16
16
|
width?: number;
|
|
17
17
|
zoom?: boolean;
|
|
18
18
|
};
|
|
19
|
-
declare function Image({ alt, aspect, caption, className, decorative, fill, frame, height, intrinsicHeight, intrinsicWidth, optimized, priority, quality, sizes, src, width, zoom, ...props }: ImageProps):
|
|
19
|
+
declare function Image({ alt, aspect, caption, className, decorative: authoredDecorative, fill: authoredFill, frame, height, intrinsicHeight, intrinsicWidth, optimized: authoredOptimized, priority: authoredPriority, quality, sizes, src, width, zoom: authoredZoom, ...props }: ImageProps): react.JSX.Element | null;
|
|
20
20
|
|
|
21
21
|
export { Image, type ImageProps };
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
// src/components/mdx/image/image.tsx
|
|
2
|
-
import { FigureCaption } from "@
|
|
3
|
-
import { ImageZoom } from "@
|
|
2
|
+
import { FigureCaption } from "@components/mdx/components/figure-caption";
|
|
3
|
+
import { ImageZoom } from "@components/mdx/components/image-zoom";
|
|
4
4
|
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
5
5
|
import NextImage from "next/image";
|
|
6
|
-
import { jsx, jsxs } from "
|
|
6
|
+
import { jsx, jsxs } from "@publish.os/nextjs/jsx-runtime";
|
|
7
|
+
function resolveImageBoolean(value) {
|
|
8
|
+
if (value === !0 || value === "true") return !0;
|
|
9
|
+
if (value === !1 || value === "false") return !1;
|
|
10
|
+
}
|
|
7
11
|
function parseAspect(value) {
|
|
8
12
|
if (typeof value == "number" && Number.isFinite(value) && value > 0)
|
|
9
13
|
return value;
|
|
@@ -41,7 +45,7 @@ function renderImage({
|
|
|
41
45
|
sizes,
|
|
42
46
|
width
|
|
43
47
|
}) {
|
|
44
|
-
if (optimized && (fill || width && height)) {
|
|
48
|
+
if (optimized && imageProps.src && (fill || width && height)) {
|
|
45
49
|
let maxWidth = fill ? "var(--publish-content-width, 72rem)" : `${width}px`;
|
|
46
50
|
return /* @__PURE__ */ jsx(
|
|
47
51
|
NextImage,
|
|
@@ -50,7 +54,8 @@ function renderImage({
|
|
|
50
54
|
priority,
|
|
51
55
|
quality,
|
|
52
56
|
sizes: sizes ?? `(max-width: 768px) 100vw, min(${maxWidth}, 100vw)`,
|
|
53
|
-
...imageProps
|
|
57
|
+
...imageProps,
|
|
58
|
+
src: imageProps.src
|
|
54
59
|
}
|
|
55
60
|
);
|
|
56
61
|
}
|
|
@@ -74,30 +79,30 @@ function Image({
|
|
|
74
79
|
aspect,
|
|
75
80
|
caption,
|
|
76
81
|
className,
|
|
77
|
-
decorative
|
|
78
|
-
fill
|
|
82
|
+
decorative: authoredDecorative,
|
|
83
|
+
fill: authoredFill,
|
|
79
84
|
frame = "default",
|
|
80
85
|
height,
|
|
81
86
|
intrinsicHeight,
|
|
82
87
|
intrinsicWidth,
|
|
83
|
-
optimized
|
|
84
|
-
priority,
|
|
88
|
+
optimized: authoredOptimized,
|
|
89
|
+
priority: authoredPriority,
|
|
85
90
|
quality,
|
|
86
91
|
sizes,
|
|
87
92
|
src,
|
|
88
93
|
width,
|
|
89
|
-
zoom
|
|
94
|
+
zoom: authoredZoom,
|
|
90
95
|
...props
|
|
91
96
|
}) {
|
|
92
|
-
if (!src) return null;
|
|
93
|
-
let layout = resolveImageLayout({
|
|
97
|
+
if (!src && !props.srcSet) return null;
|
|
98
|
+
let decorative = resolveImageBoolean(authoredDecorative) ?? !1, fill = resolveImageBoolean(authoredFill) ?? !1, optimized = resolveImageBoolean(authoredOptimized) ?? !1, priority = resolveImageBoolean(authoredPriority), zoom = resolveImageBoolean(authoredZoom) ?? !0, layout = resolveImageLayout({
|
|
94
99
|
aspect,
|
|
95
100
|
fill,
|
|
96
101
|
height,
|
|
97
102
|
intrinsicHeight,
|
|
98
103
|
intrinsicWidth,
|
|
99
104
|
width
|
|
100
|
-
}), imageAlt = decorative ? "" : alt ?? "", framed = frame
|
|
105
|
+
}), imageAlt = decorative ? "" : alt ?? "", framed = resolveImageBoolean(frame) ?? frame !== "none", stringSrc = src ? String(src) : void 0, useNextImage = !!(optimized && stringSrc?.startsWith("/")), imageClassName = cn(
|
|
101
106
|
"block h-full w-full transition-opacity duration-200",
|
|
102
107
|
fill ? "object-cover" : "object-contain",
|
|
103
108
|
zoom && "cursor-zoom-in hover:opacity-90",
|
|
@@ -125,13 +130,13 @@ function Image({
|
|
|
125
130
|
framed && "rounded-media border border-stroke-2 bg-surface-2"
|
|
126
131
|
),
|
|
127
132
|
style: layout.style,
|
|
128
|
-
children: /* @__PURE__ */ jsx(ImageZoom, { enabled: zoom, children: image })
|
|
133
|
+
children: /* @__PURE__ */ jsx(ImageZoom, { enabled: zoom, src: stringSrc, children: image })
|
|
129
134
|
}
|
|
130
135
|
);
|
|
131
|
-
return caption ? /* @__PURE__ */ jsxs("figure", { className: "not-markdown-prose my-8", children: [
|
|
136
|
+
return caption ? /* @__PURE__ */ jsxs("figure", { className: "not-markdown-prose my-8 w-full", children: [
|
|
132
137
|
content,
|
|
133
|
-
/* @__PURE__ */ jsx(FigureCaption, {
|
|
134
|
-
] }) : /* @__PURE__ */ jsx("div", { className: "not-markdown-prose my-6 flex justify-center", children: content });
|
|
138
|
+
/* @__PURE__ */ jsx(FigureCaption, { children: caption })
|
|
139
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "not-markdown-prose my-6 flex w-full justify-center", children: content });
|
|
135
140
|
}
|
|
136
141
|
export {
|
|
137
142
|
Image
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
|
|
3
3
|
type InlineCodeProps = React.ComponentPropsWithoutRef<"code">;
|
|
4
|
-
declare function InlineCode({ className, ...props }: InlineCodeProps):
|
|
4
|
+
declare function InlineCode({ className, ...props }: InlineCodeProps): react.JSX.Element;
|
|
5
5
|
|
|
6
6
|
export { InlineCode, type InlineCodeProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/components/mdx/inline-code.tsx
|
|
2
2
|
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
3
|
-
import { jsx } from "
|
|
3
|
+
import { jsx } from "@publish.os/nextjs/jsx-runtime";
|
|
4
4
|
function InlineCode({ className, ...props }) {
|
|
5
5
|
return /* @__PURE__ */ jsx(
|
|
6
6
|
"code",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
2
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
4
|
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
import { HTMLAttributes } from 'react';
|
|
5
5
|
|
|
6
6
|
declare const kbdVariants: (props?: ({
|
|
7
7
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
@@ -10,6 +10,6 @@ declare const kbdVariants: (props?: ({
|
|
|
10
10
|
type KbdProps$1 = HTMLAttributes<HTMLElement> & VariantProps<typeof kbdVariants>;
|
|
11
11
|
|
|
12
12
|
type KbdProps = Omit<KbdProps$1, "size">;
|
|
13
|
-
declare function Kbd({ className, ...props }: KbdProps):
|
|
13
|
+
declare function Kbd({ className, ...props }: KbdProps): react.JSX.Element;
|
|
14
14
|
|
|
15
15
|
export { Kbd, type KbdProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/components/mdx/kbd.tsx
|
|
2
|
-
import { Kbd as UiKbd } from "@
|
|
2
|
+
import { Kbd as UiKbd } from "@components/ui/kbd";
|
|
3
3
|
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
4
|
-
import { jsx } from "
|
|
4
|
+
import { jsx } from "@publish.os/nextjs/jsx-runtime";
|
|
5
5
|
function Kbd({ className, ...props }) {
|
|
6
6
|
return /* @__PURE__ */ jsx(UiKbd, { ...props, size: null, className: cn("text-[0.75em]", className) });
|
|
7
7
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode, AnchorHTMLAttributes } from 'react';
|
|
2
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
4
|
import { VariantProps } from 'class-variance-authority';
|
|
4
5
|
import { LinkProps as LinkProps$1 } from 'next/link';
|
|
5
|
-
import { ReactNode, AnchorHTMLAttributes } from 'react';
|
|
6
6
|
|
|
7
7
|
declare const buttonVariants: (props?: ({
|
|
8
|
-
variant?: "solid" | "soft" | "outline" | "ghost" | null | undefined;
|
|
9
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
10
|
-
iconOnly?: boolean | null | undefined;
|
|
8
|
+
readonly variant?: "solid" | "soft" | "outline" | "ghost" | null | undefined;
|
|
9
|
+
readonly size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
10
|
+
readonly iconOnly?: boolean | null | undefined;
|
|
11
11
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
12
|
type ButtonVariantProps = VariantProps<typeof buttonVariants>;
|
|
13
13
|
|
|
@@ -36,6 +36,6 @@ type LinkProps = {
|
|
|
36
36
|
} & Omit<LinkVariantProps, "color" | "variant"> & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "color" | "href">;
|
|
37
37
|
|
|
38
38
|
type MdxLinkProps = LinkProps;
|
|
39
|
-
declare function Link({ color, href, size, variant, ...props }: MdxLinkProps):
|
|
39
|
+
declare function Link({ color, href, size, variant, ...props }: MdxLinkProps): react.JSX.Element;
|
|
40
40
|
|
|
41
41
|
export { Link, type MdxLinkProps };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// src/components/mdx/link.tsx
|
|
2
2
|
import {
|
|
3
3
|
Link as UiLink
|
|
4
|
-
} from "@
|
|
5
|
-
import { jsx } from "
|
|
4
|
+
} from "@components/ui/link";
|
|
5
|
+
import { jsx } from "@publish.os/nextjs/jsx-runtime";
|
|
6
6
|
function Link({
|
|
7
7
|
color = "accent",
|
|
8
8
|
href = "#",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
|
|
3
|
-
declare function Paragraph({ children, className, ...props }: React.ComponentPropsWithoutRef<"p">):
|
|
3
|
+
declare function Paragraph({ children, className, ...props }: React.ComponentPropsWithoutRef<"p">): react.JSX.Element;
|
|
4
4
|
|
|
5
5
|
export { Paragraph };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/components/mdx/paragraph.tsx
|
|
2
2
|
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
3
3
|
import { Children, isValidElement } from "react";
|
|
4
|
-
import { Fragment, jsx } from "
|
|
4
|
+
import { Fragment, jsx } from "@publish.os/nextjs/jsx-runtime";
|
|
5
5
|
function isBlockMediaChild(child) {
|
|
6
6
|
if (!isValidElement(child)) return !1;
|
|
7
7
|
let props = child.props;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
|
|
3
3
|
type StrikethroughProps = React.ComponentPropsWithoutRef<"del">;
|
|
4
|
-
declare function Strikethrough({ className, ...props }: StrikethroughProps):
|
|
4
|
+
declare function Strikethrough({ className, ...props }: StrikethroughProps): react.JSX.Element;
|
|
5
5
|
|
|
6
6
|
export { Strikethrough, type StrikethroughProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/components/mdx/strikethrough.tsx
|
|
2
2
|
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
3
|
-
import { jsx } from "
|
|
3
|
+
import { jsx } from "@publish.os/nextjs/jsx-runtime";
|
|
4
4
|
function Strikethrough({ className, ...props }) {
|
|
5
5
|
return /* @__PURE__ */ jsx(
|
|
6
6
|
"del",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
|
|
3
|
-
declare function Table(props: React.ComponentPropsWithoutRef<"table">):
|
|
4
|
-
declare function TableHeadGroup(props: React.ComponentPropsWithoutRef<"thead">):
|
|
5
|
-
declare function TableBodyGroup(props: React.ComponentPropsWithoutRef<"tbody">):
|
|
6
|
-
declare function TableRowGroup(props: React.ComponentPropsWithoutRef<"tr">):
|
|
7
|
-
declare function TableHeaderCell(props: React.ComponentPropsWithoutRef<"th">):
|
|
8
|
-
declare function TableDataCell(props: React.ComponentPropsWithoutRef<"td">):
|
|
3
|
+
declare function Table(props: React.ComponentPropsWithoutRef<"table">): react.JSX.Element;
|
|
4
|
+
declare function TableHeadGroup(props: React.ComponentPropsWithoutRef<"thead">): react.JSX.Element;
|
|
5
|
+
declare function TableBodyGroup(props: React.ComponentPropsWithoutRef<"tbody">): react.JSX.Element;
|
|
6
|
+
declare function TableRowGroup(props: React.ComponentPropsWithoutRef<"tr">): react.JSX.Element;
|
|
7
|
+
declare function TableHeaderCell(props: React.ComponentPropsWithoutRef<"th">): react.JSX.Element;
|
|
8
|
+
declare function TableDataCell(props: React.ComponentPropsWithoutRef<"td">): react.JSX.Element;
|
|
9
9
|
|
|
10
10
|
export { Table, TableBodyGroup, TableDataCell, TableHeadGroup, TableHeaderCell, TableRowGroup };
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
TableHeader,
|
|
7
7
|
TableRow,
|
|
8
8
|
Table as UiTable
|
|
9
|
-
} from "@
|
|
10
|
-
import { jsx } from "
|
|
9
|
+
} from "@components/ui/table";
|
|
10
|
+
import { jsx } from "@publish.os/nextjs/jsx-runtime";
|
|
11
11
|
function Table(props) {
|
|
12
12
|
return /* @__PURE__ */ jsx(UiTable, { ...props });
|
|
13
13
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
|
|
3
3
|
type TaskListProps = React.ComponentPropsWithoutRef<"ul">;
|
|
4
4
|
type TaskListInputProps = React.ComponentPropsWithoutRef<"input">;
|
|
5
|
-
declare function TaskList({ className, ...props }: TaskListProps):
|
|
6
|
-
declare function TaskListInput({ checked, className, type, }: TaskListInputProps):
|
|
5
|
+
declare function TaskList({ className, ...props }: TaskListProps): react.JSX.Element;
|
|
6
|
+
declare function TaskListInput({ checked, className, type, }: TaskListInputProps): react.JSX.Element | null;
|
|
7
7
|
|
|
8
8
|
export { TaskList, TaskListInput, type TaskListInputProps, type TaskListProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/components/mdx/task-list.tsx
|
|
2
2
|
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
3
|
-
import { jsx } from "
|
|
3
|
+
import { jsx } from "@publish.os/nextjs/jsx-runtime";
|
|
4
4
|
function TaskList({ className, ...props }) {
|
|
5
5
|
return /* @__PURE__ */ jsx(
|
|
6
6
|
"ul",
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
3
|
|
|
3
4
|
type VideoEmbed = {
|
|
4
5
|
allow: string;
|
|
5
6
|
src: string;
|
|
6
7
|
title: string;
|
|
7
8
|
};
|
|
8
|
-
|
|
9
|
+
/** Native playback options and media events applied after the Play button. */
|
|
10
|
+
type NativeVideoProps = Pick<ComponentPropsWithoutRef<"video">, "autoPlay" | "controls" | "controlsList" | "crossOrigin" | "disablePictureInPicture" | "disableRemotePlayback" | "loop" | "muted" | "playsInline" | "preload" | "onAbort" | "onCanPlay" | "onCanPlayThrough" | "onDurationChange" | "onEmptied" | "onEncrypted" | "onEnded" | "onError" | "onLoadedData" | "onLoadedMetadata" | "onLoadStart" | "onPause" | "onPlay" | "onPlaying" | "onProgress" | "onRateChange" | "onResize" | "onSeeked" | "onSeeking" | "onStalled" | "onSuspend" | "onTimeUpdate" | "onVolumeChange" | "onWaiting">;
|
|
11
|
+
declare function VideoPlayer({ className, embed, height, nativeProps, poster, src, title, width, }: {
|
|
9
12
|
className?: string;
|
|
10
13
|
embed?: VideoEmbed;
|
|
11
14
|
height?: number;
|
|
15
|
+
nativeProps?: NativeVideoProps;
|
|
12
16
|
poster?: string;
|
|
13
17
|
src: string;
|
|
14
18
|
title: string;
|
|
15
19
|
width?: number;
|
|
16
|
-
}):
|
|
20
|
+
}): react.JSX.Element;
|
|
17
21
|
|
|
18
|
-
export { type VideoEmbed, VideoPlayer };
|
|
22
|
+
export { type NativeVideoProps, type VideoEmbed, VideoPlayer };
|
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
5
5
|
import { usePathname } from "next/navigation";
|
|
6
6
|
import { useCallback, useEffect, useId, useState } from "react";
|
|
7
|
-
import { jsx, jsxs } from "
|
|
7
|
+
import { jsx, jsxs } from "@publish.os/nextjs/jsx-runtime";
|
|
8
8
|
var VIDEO_PLAY_EVENT = "publishos:video-play";
|
|
9
9
|
function VideoPlayer({
|
|
10
10
|
className,
|
|
11
11
|
embed,
|
|
12
12
|
height,
|
|
13
|
+
nativeProps,
|
|
13
14
|
poster,
|
|
14
15
|
src,
|
|
15
16
|
title,
|
|
@@ -65,10 +66,13 @@ function VideoPlayer({
|
|
|
65
66
|
),
|
|
66
67
|
controls: !0,
|
|
67
68
|
playsInline: !0,
|
|
68
|
-
poster,
|
|
69
69
|
preload: "metadata",
|
|
70
|
+
...nativeProps,
|
|
71
|
+
height,
|
|
72
|
+
poster,
|
|
70
73
|
src,
|
|
71
74
|
title,
|
|
75
|
+
width,
|
|
72
76
|
children: /* @__PURE__ */ jsx("track", { kind: "captions" })
|
|
73
77
|
},
|
|
74
78
|
src
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { NativeVideoProps } from './video-player.js';
|
|
2
3
|
|
|
3
|
-
type VideoProps =
|
|
4
|
+
type VideoProps = NativeVideoProps & {
|
|
4
5
|
caption?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
5
7
|
frame?: boolean | "default" | "none";
|
|
6
8
|
height?: number | string;
|
|
7
9
|
poster?: string;
|
|
8
|
-
provider?: "self-hosted" | "youtube" | "vimeo" | "loom" | "wistia" | "cloudflare-stream";
|
|
9
10
|
src?: string;
|
|
10
11
|
title?: string;
|
|
11
12
|
width?: number | string;
|
|
12
13
|
};
|
|
13
|
-
declare function Video({ caption, className, frame, height, poster, src, title, width, }: VideoProps):
|
|
14
|
+
declare function Video({ caption, className, frame, height, poster, src, title, width, ...nativeProps }: VideoProps): react.JSX.Element | null;
|
|
14
15
|
|
|
15
16
|
export { Video, type VideoProps };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// src/components/mdx/video/video.tsx
|
|
2
|
-
import { FigureCaption } from "@
|
|
2
|
+
import { FigureCaption } from "@components/mdx/components/figure-caption";
|
|
3
3
|
import {
|
|
4
4
|
VideoPlayer
|
|
5
|
-
} from "@
|
|
5
|
+
} from "@components/mdx/components/video-player";
|
|
6
6
|
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
7
|
-
import { jsx, jsxs } from "
|
|
7
|
+
import { jsx, jsxs } from "@publish.os/nextjs/jsx-runtime";
|
|
8
8
|
function toNumber(value) {
|
|
9
9
|
if (typeof value == "number" && Number.isFinite(value)) return value;
|
|
10
10
|
if (typeof value == "string" && value.trim() !== "") {
|
|
@@ -76,7 +76,8 @@ function Video({
|
|
|
76
76
|
poster,
|
|
77
77
|
src,
|
|
78
78
|
title,
|
|
79
|
-
width
|
|
79
|
+
width,
|
|
80
|
+
...nativeProps
|
|
80
81
|
}) {
|
|
81
82
|
if (!src) return null;
|
|
82
83
|
let videoTitle = title?.trim() || "Video", numericWidth = toNumber(width), numericHeight = toNumber(height), framed = frame !== !1 && frame !== "none", embed = resolveEmbed(src, videoTitle), frameStyle = {
|
|
@@ -96,6 +97,7 @@ function Video({
|
|
|
96
97
|
{
|
|
97
98
|
embed,
|
|
98
99
|
height: numericHeight,
|
|
100
|
+
nativeProps,
|
|
99
101
|
poster,
|
|
100
102
|
src,
|
|
101
103
|
title: videoTitle,
|
|
@@ -106,7 +108,7 @@ function Video({
|
|
|
106
108
|
);
|
|
107
109
|
return caption ? /* @__PURE__ */ jsxs("figure", { className: "not-markdown-prose my-8", children: [
|
|
108
110
|
player,
|
|
109
|
-
/* @__PURE__ */ jsx(FigureCaption, {
|
|
111
|
+
/* @__PURE__ */ jsx(FigureCaption, { children: caption })
|
|
110
112
|
] }) : /* @__PURE__ */ jsx("div", { className: "not-markdown-prose my-6", children: player });
|
|
111
113
|
}
|
|
112
114
|
export {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { MdxErrorBoundaryProps } from '
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { M as MdxErrorBoundaryProps } from '../../../types-sM2g9nW0.js';
|
|
3
3
|
import 'mdx/types.js';
|
|
4
|
-
import 'react';
|
|
5
4
|
|
|
6
|
-
declare function MDXErrorBoundary({ errorMessage, pageId, slug, children, }: MdxErrorBoundaryProps):
|
|
5
|
+
declare function MDXErrorBoundary({ errorMessage, pageId, slug, children, }: MdxErrorBoundaryProps): react.JSX.Element;
|
|
7
6
|
|
|
8
7
|
export { MDXErrorBoundary };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
// src/components/mdx/error-boundary.tsx
|
|
4
|
-
import { MDXErrorFallback } from "@
|
|
4
|
+
import { MDXErrorFallback } from "@components/mdx/error-fallback";
|
|
5
5
|
import { catchError } from "next/error";
|
|
6
|
-
import { jsx } from "
|
|
6
|
+
import { jsx } from "@publish.os/nextjs/jsx-runtime";
|
|
7
7
|
function MDXRenderErrorFallback(props, { error }) {
|
|
8
8
|
return /* @__PURE__ */ jsx(
|
|
9
9
|
MDXErrorFallback,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
|
|
3
3
|
declare function MDXErrorFallback({ errorMessage, pageId, slug, }: {
|
|
4
4
|
errorMessage?: string;
|
|
5
5
|
pageId?: string;
|
|
6
6
|
slug?: string;
|
|
7
|
-
}):
|
|
7
|
+
}): react.JSX.Element;
|
|
8
8
|
|
|
9
9
|
export { MDXErrorFallback };
|
|
@@ -1,18 +1,55 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { ReactNode, AnchorHTMLAttributes } from 'react';
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode, AnchorHTMLAttributes, ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
import { a as MDXComponents } from '../../../types-sM2g9nW0.js';
|
|
5
4
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
|
-
import { a as ButtonVariantProps } from '../../../button-
|
|
5
|
+
import { a as ButtonVariantProps } from '../../../button-D6Xp2HBm.js';
|
|
7
6
|
import { VariantProps } from 'class-variance-authority';
|
|
8
7
|
import { LinkProps as LinkProps$1 } from 'next/link';
|
|
9
8
|
import 'mdx/types.js';
|
|
10
9
|
|
|
11
|
-
type
|
|
10
|
+
type OgImageMetadata = string | {
|
|
11
|
+
src: string;
|
|
12
|
+
alt?: string;
|
|
13
|
+
};
|
|
14
|
+
type OgMetadata = {
|
|
15
|
+
title?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
image?: OgImageMetadata;
|
|
18
|
+
};
|
|
19
|
+
type PageStatus = "published" | "draft";
|
|
20
|
+
type PageMetadata = {
|
|
21
|
+
openGraph?: OgMetadata;
|
|
22
|
+
robots?: {
|
|
23
|
+
index?: boolean;
|
|
24
|
+
follow?: boolean;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
type PageFrontmatter<TCustom extends Record<string, unknown> = Record<string, unknown>> = TCustom & {
|
|
28
|
+
title: string;
|
|
29
|
+
description: string;
|
|
30
|
+
slug: string;
|
|
31
|
+
status: PageStatus;
|
|
32
|
+
metadata: PageMetadata;
|
|
33
|
+
};
|
|
34
|
+
type PageData<TCustom extends Record<string, unknown> = Record<string, unknown>> = {
|
|
35
|
+
fileID: string;
|
|
36
|
+
group: string;
|
|
37
|
+
path: string;
|
|
38
|
+
frontmatter: PageFrontmatter<TCustom>;
|
|
39
|
+
body: string;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
type FigureCaptionProps = React.ComponentProps<"figcaption">;
|
|
43
|
+
declare function FigureCaption({ className, ...props }: FigureCaptionProps): react.JSX.Element;
|
|
44
|
+
|
|
45
|
+
type FigureProps = React.ComponentProps<"figure"> & {
|
|
46
|
+
/** A fallback caption after the children. An authored caption takes precedence. */
|
|
12
47
|
caption?: ReactNode;
|
|
13
|
-
frame?: boolean | "default" | "none";
|
|
14
48
|
};
|
|
15
|
-
declare function Figure({ caption, children, className, ...props }: FigureProps):
|
|
49
|
+
declare function Figure({ caption, children, className, ...props }: FigureProps): react.JSX.Element;
|
|
50
|
+
declare namespace Figure {
|
|
51
|
+
var Caption: typeof FigureCaption;
|
|
52
|
+
}
|
|
16
53
|
|
|
17
54
|
type ImageProps = Omit<React.ComponentPropsWithoutRef<"img">, "height" | "sizes" | "width"> & {
|
|
18
55
|
aspect?: number | `${number}/${number}`;
|
|
@@ -30,7 +67,7 @@ type ImageProps = Omit<React.ComponentPropsWithoutRef<"img">, "height" | "sizes"
|
|
|
30
67
|
width?: number;
|
|
31
68
|
zoom?: boolean;
|
|
32
69
|
};
|
|
33
|
-
declare function Image({ alt, aspect, caption, className, decorative, fill, frame, height, intrinsicHeight, intrinsicWidth, optimized, priority, quality, sizes, src, width, zoom, ...props }: ImageProps):
|
|
70
|
+
declare function Image({ alt, aspect, caption, className, decorative: authoredDecorative, fill: authoredFill, frame, height, intrinsicHeight, intrinsicWidth, optimized: authoredOptimized, priority: authoredPriority, quality, sizes, src, width, zoom: authoredZoom, ...props }: ImageProps): react.JSX.Element | null;
|
|
34
71
|
|
|
35
72
|
declare const linkVariants: (props?: ({
|
|
36
73
|
color?: "default" | "accent" | null | undefined;
|
|
@@ -57,27 +94,31 @@ type LinkProps = {
|
|
|
57
94
|
} & Omit<LinkVariantProps, "color" | "variant"> & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "color" | "href">;
|
|
58
95
|
|
|
59
96
|
type MdxLinkProps = LinkProps;
|
|
60
|
-
declare function Link({ color, href, size, variant, ...props }: MdxLinkProps):
|
|
97
|
+
declare function Link({ color, href, size, variant, ...props }: MdxLinkProps): react.JSX.Element;
|
|
98
|
+
|
|
99
|
+
/** Native playback options and media events applied after the Play button. */
|
|
100
|
+
type NativeVideoProps = Pick<ComponentPropsWithoutRef<"video">, "autoPlay" | "controls" | "controlsList" | "crossOrigin" | "disablePictureInPicture" | "disableRemotePlayback" | "loop" | "muted" | "playsInline" | "preload" | "onAbort" | "onCanPlay" | "onCanPlayThrough" | "onDurationChange" | "onEmptied" | "onEncrypted" | "onEnded" | "onError" | "onLoadedData" | "onLoadedMetadata" | "onLoadStart" | "onPause" | "onPlay" | "onPlaying" | "onProgress" | "onRateChange" | "onResize" | "onSeeked" | "onSeeking" | "onStalled" | "onSuspend" | "onTimeUpdate" | "onVolumeChange" | "onWaiting">;
|
|
61
101
|
|
|
62
|
-
type VideoProps =
|
|
102
|
+
type VideoProps = NativeVideoProps & {
|
|
63
103
|
caption?: React.ReactNode;
|
|
104
|
+
className?: string;
|
|
64
105
|
frame?: boolean | "default" | "none";
|
|
65
106
|
height?: number | string;
|
|
66
107
|
poster?: string;
|
|
67
|
-
provider?: "self-hosted" | "youtube" | "vimeo" | "loom" | "wistia" | "cloudflare-stream";
|
|
68
108
|
src?: string;
|
|
69
109
|
title?: string;
|
|
70
110
|
width?: number | string;
|
|
71
111
|
};
|
|
72
|
-
declare function Video({ caption, className, frame, height, poster, src, title, width, }: VideoProps):
|
|
112
|
+
declare function Video({ caption, className, frame, height, poster, src, title, width, ...nativeProps }: VideoProps): react.JSX.Element | null;
|
|
73
113
|
|
|
74
114
|
type MDXProps = {
|
|
75
115
|
components?: MDXComponents;
|
|
76
116
|
page: PageData;
|
|
77
117
|
};
|
|
78
|
-
declare function renderMdx({ components, page, siteComponents, }: MDXProps & {
|
|
118
|
+
declare function renderMdx({ components, page, siteComponents, importedComponents, }: MDXProps & {
|
|
79
119
|
siteComponents?: MDXComponents;
|
|
80
|
-
|
|
81
|
-
|
|
120
|
+
importedComponents?: MDXComponents;
|
|
121
|
+
}): Promise<react.JSX.Element>;
|
|
122
|
+
declare function MDX(props: MDXProps): Promise<react.JSX.Element>;
|
|
82
123
|
|
|
83
124
|
export { Figure, Image, Link, MDX, MDXComponents, type MDXProps, Video, renderMdx };
|