@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,18 +1,22 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
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_runtime.JSX.Element;
|
|
17
21
|
|
|
18
|
-
export { type VideoEmbed, VideoPlayer };
|
|
22
|
+
export { type NativeVideoProps, type VideoEmbed, VideoPlayer };
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
// src/components/mdx/video-player.tsx
|
|
3
|
+
// src/components/mdx/video/video-player.tsx
|
|
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
|
|
@@ -102,7 +106,7 @@ function VideoPlayer({
|
|
|
102
106
|
)
|
|
103
107
|
}
|
|
104
108
|
),
|
|
105
|
-
/* @__PURE__ */ jsx("span", { "aria-hidden": !0, className: "absolute inset-0 grid place-items-center", children: /* @__PURE__ */ jsx("span", { className: "border-shadow-3 flex size-14 items-center justify-center rounded-full border border-media-control-stroke bg-media-control-surface text-media-control-foreground transition-transform duration-200 group-hover:scale-105", children: /* @__PURE__ */ jsx("span", { className: "ml-1 block h-0 w-0 border-y-[9px] border-y-transparent border-l-
|
|
109
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": !0, className: "absolute inset-0 grid place-items-center", children: /* @__PURE__ */ jsx("span", { className: "border-shadow-3 flex size-14 items-center justify-center rounded-full border border-media-control-stroke bg-media-control-surface text-media-control-foreground transition-transform duration-200 group-hover:scale-105", children: /* @__PURE__ */ jsx("span", { className: "ml-1 block h-0 w-0 border-y-[9px] border-y-transparent border-l-14 border-l-current" }) }) })
|
|
106
110
|
]
|
|
107
111
|
}
|
|
108
112
|
);
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { NativeVideoProps } from './video-player.js';
|
|
3
|
+
import 'react';
|
|
2
4
|
|
|
3
|
-
type VideoProps =
|
|
5
|
+
type VideoProps = NativeVideoProps & {
|
|
4
6
|
caption?: React.ReactNode;
|
|
7
|
+
className?: string;
|
|
5
8
|
frame?: boolean | "default" | "none";
|
|
6
9
|
height?: number | string;
|
|
7
10
|
poster?: string;
|
|
8
|
-
provider?: "self-hosted" | "youtube" | "vimeo" | "loom" | "wistia" | "cloudflare-stream";
|
|
9
11
|
src?: string;
|
|
10
12
|
title?: string;
|
|
11
13
|
width?: number | string;
|
|
12
14
|
};
|
|
13
|
-
declare function Video({ caption, className, frame, height, poster, src, title, width, }: VideoProps): react_jsx_runtime.JSX.Element | null;
|
|
15
|
+
declare function Video({ caption, className, frame, height, poster, src, title, width, ...nativeProps }: VideoProps): react_jsx_runtime.JSX.Element | null;
|
|
14
16
|
|
|
15
17
|
export { Video, type VideoProps };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
// src/components/mdx/video.tsx
|
|
2
|
-
import { FigureCaption } from "@
|
|
1
|
+
// src/components/mdx/video/video.tsx
|
|
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,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,16 +1,24 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { a as MDXComponents } from '../../../types-sM2g9nW0.js';
|
|
3
|
-
import {
|
|
3
|
+
import { P as PageData } from '../../../types-CJWRG05y.js';
|
|
4
|
+
import { ReactNode, AnchorHTMLAttributes, ComponentPropsWithoutRef } from 'react';
|
|
4
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
|
-
import {
|
|
6
|
+
import { a as ButtonVariantProps } from '../../../button-BdCScEKi.js';
|
|
6
7
|
import { VariantProps } from 'class-variance-authority';
|
|
8
|
+
import { LinkProps as LinkProps$1 } from 'next/link';
|
|
7
9
|
import 'mdx/types.js';
|
|
8
10
|
|
|
9
|
-
type
|
|
11
|
+
type FigureCaptionProps = React.ComponentProps<"figcaption">;
|
|
12
|
+
declare function FigureCaption({ className, ...props }: FigureCaptionProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
type FigureProps = React.ComponentProps<"figure"> & {
|
|
15
|
+
/** A fallback caption after the children. An authored caption takes precedence. */
|
|
10
16
|
caption?: ReactNode;
|
|
11
|
-
frame?: boolean | "default" | "none";
|
|
12
17
|
};
|
|
13
18
|
declare function Figure({ caption, children, className, ...props }: FigureProps): react_jsx_runtime.JSX.Element;
|
|
19
|
+
declare namespace Figure {
|
|
20
|
+
var Caption: typeof FigureCaption;
|
|
21
|
+
}
|
|
14
22
|
|
|
15
23
|
type ImageProps = Omit<React.ComponentPropsWithoutRef<"img">, "height" | "sizes" | "width"> & {
|
|
16
24
|
aspect?: number | `${number}/${number}`;
|
|
@@ -28,10 +36,10 @@ type ImageProps = Omit<React.ComponentPropsWithoutRef<"img">, "height" | "sizes"
|
|
|
28
36
|
width?: number;
|
|
29
37
|
zoom?: boolean;
|
|
30
38
|
};
|
|
31
|
-
declare function Image({ alt, aspect, caption, className, decorative, fill, frame, height, intrinsicHeight, intrinsicWidth, optimized, priority, quality, sizes, src, width, zoom, ...props }: ImageProps): react_jsx_runtime.JSX.Element | null;
|
|
39
|
+
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_runtime.JSX.Element | null;
|
|
32
40
|
|
|
33
41
|
declare const linkVariants: (props?: ({
|
|
34
|
-
color?: "
|
|
42
|
+
color?: "default" | "accent" | null | undefined;
|
|
35
43
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
36
44
|
variant?: "inline" | "standalone" | null | undefined;
|
|
37
45
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
@@ -49,6 +57,7 @@ type LinkProps = {
|
|
|
49
57
|
href?: string;
|
|
50
58
|
iconOnly?: ButtonVariantProps["iconOnly"];
|
|
51
59
|
leftIcon?: ReactNode;
|
|
60
|
+
prefetch?: LinkProps$1["prefetch"];
|
|
52
61
|
rightIcon?: ReactNode;
|
|
53
62
|
variant?: LinkVariant;
|
|
54
63
|
} & Omit<LinkVariantProps, "color" | "variant"> & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "color" | "href">;
|
|
@@ -56,24 +65,29 @@ type LinkProps = {
|
|
|
56
65
|
type MdxLinkProps = LinkProps;
|
|
57
66
|
declare function Link({ color, href, size, variant, ...props }: MdxLinkProps): react_jsx_runtime.JSX.Element;
|
|
58
67
|
|
|
59
|
-
|
|
68
|
+
/** Native playback options and media events applied after the Play button. */
|
|
69
|
+
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">;
|
|
70
|
+
|
|
71
|
+
type VideoProps = NativeVideoProps & {
|
|
60
72
|
caption?: React.ReactNode;
|
|
73
|
+
className?: string;
|
|
61
74
|
frame?: boolean | "default" | "none";
|
|
62
75
|
height?: number | string;
|
|
63
76
|
poster?: string;
|
|
64
|
-
provider?: "self-hosted" | "youtube" | "vimeo" | "loom" | "wistia" | "cloudflare-stream";
|
|
65
77
|
src?: string;
|
|
66
78
|
title?: string;
|
|
67
79
|
width?: number | string;
|
|
68
80
|
};
|
|
69
|
-
declare function Video({ caption, className, frame, height, poster, src, title, width, }: VideoProps): react_jsx_runtime.JSX.Element | null;
|
|
81
|
+
declare function Video({ caption, className, frame, height, poster, src, title, width, ...nativeProps }: VideoProps): react_jsx_runtime.JSX.Element | null;
|
|
70
82
|
|
|
71
83
|
type MDXProps = {
|
|
72
84
|
components?: MDXComponents;
|
|
73
|
-
|
|
74
|
-
pageId?: string;
|
|
75
|
-
slug?: string;
|
|
85
|
+
page: PageData;
|
|
76
86
|
};
|
|
77
|
-
declare function
|
|
87
|
+
declare function renderMdx({ components, page, siteComponents, importedComponents, }: MDXProps & {
|
|
88
|
+
siteComponents?: MDXComponents;
|
|
89
|
+
importedComponents?: MDXComponents;
|
|
90
|
+
}): Promise<react_jsx_runtime.JSX.Element>;
|
|
91
|
+
declare function MDX(props: MDXProps): Promise<react_jsx_runtime.JSX.Element>;
|
|
78
92
|
|
|
79
|
-
export { Figure, Image, Link, MDX, MDXComponents, type MDXProps, Video };
|
|
93
|
+
export { Figure, Image, Link, MDX, MDXComponents, type MDXProps, Video, renderMdx };
|