@publish.os/nextjs 0.0.1-alpha.5 → 0.0.1-alpha.6

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.
Files changed (214) hide show
  1. package/README.md +1 -1
  2. package/dist/config/createNextConfig.js +3 -3
  3. package/dist/index.js +7 -5
  4. package/dist/kernel/components/blocks/color-palette.js +35 -4
  5. package/dist/kernel/components/blocks/logo-block.js +1 -1
  6. package/dist/kernel/components/blocks/nav-breadcrumb.js +2 -12
  7. package/dist/kernel/components/mdx/components/image.js +1 -1
  8. package/dist/kernel/components/ui/breadcrumb-trail.d.ts +3 -1
  9. package/dist/kernel/components/ui/breadcrumb-trail.js +1 -0
  10. package/dist/kernel/components/ui/breadcrumb.d.ts +1 -5
  11. package/dist/kernel/components/ui/breadcrumb.js +1 -16
  12. package/dist/kernel/components/ui/menu.js +5 -5
  13. package/dist/kernel/components/ui/navigation-menu.js +2 -2
  14. package/dist/kernel/components/ui/popover.js +5 -11
  15. package/dist/kernel/components/ui/select.js +5 -5
  16. package/dist/kernel/components/ui/text.js +109 -106
  17. package/dist/kernel/components/ui/tooltip.js +2 -2
  18. package/dist/kernel/defaults.registry.d.ts +60 -69
  19. package/dist/kernel/defaults.registry.js +59 -67
  20. package/dist/kernel/routes/agent/markdown.js +2 -2
  21. package/dist/kernel/routes/metadata/feed.js +2 -2
  22. package/dist/kernel/routes/metadata/llms.js +4 -2
  23. package/dist/kernel/routes/metadata/og-image.d.ts +1 -1
  24. package/dist/kernel/routes/metadata/robots.js +2 -2
  25. package/dist/kernel/routes/metadata/sitemap.js +2 -2
  26. package/dist/utils/cn.d.ts +1 -1
  27. package/package.json +2 -6
  28. package/release/package.json +3 -2
  29. package/release/release.json +5 -5
  30. package/release/{pnpm-lock.yaml → runtime-pnpm-lock.yaml} +135 -34
  31. package/dist/cache/tags.cjs +0 -79
  32. package/dist/cache/tags.d.cts +0 -13
  33. package/dist/config/createNextConfig.cjs +0 -52
  34. package/dist/config/createNextConfig.d.cts +0 -8
  35. package/dist/config.cjs +0 -78
  36. package/dist/config.d.cts +0 -101
  37. package/dist/config.d.ts +0 -101
  38. package/dist/config.js +0 -48
  39. package/dist/index.cjs +0 -1266
  40. package/dist/index.d.cts +0 -18
  41. package/dist/kernel/components/blocks/AgentActions.cjs +0 -425
  42. package/dist/kernel/components/blocks/AgentActions.d.cts +0 -52
  43. package/dist/kernel/components/blocks/animated-icon-swap.cjs +0 -101
  44. package/dist/kernel/components/blocks/animated-icon-swap.d.cts +0 -16
  45. package/dist/kernel/components/blocks/color-palette.cjs +0 -413
  46. package/dist/kernel/components/blocks/color-palette.d.cts +0 -7
  47. package/dist/kernel/components/blocks/design-system-preview.cjs +0 -593
  48. package/dist/kernel/components/blocks/design-system-preview.d.cts +0 -29
  49. package/dist/kernel/components/blocks/link-playground.cjs +0 -816
  50. package/dist/kernel/components/blocks/link-playground.d.cts +0 -5
  51. package/dist/kernel/components/blocks/logo-block.cjs +0 -156
  52. package/dist/kernel/components/blocks/logo-block.d.cts +0 -21
  53. package/dist/kernel/components/blocks/nav-breadcrumb.cjs +0 -122
  54. package/dist/kernel/components/blocks/nav-breadcrumb.d.cts +0 -11
  55. package/dist/kernel/components/blocks/navbar.cjs +0 -154
  56. package/dist/kernel/components/blocks/navbar.d.cts +0 -16
  57. package/dist/kernel/components/blocks/navigation-progress-playground.cjs +0 -735
  58. package/dist/kernel/components/blocks/navigation-progress-playground.d.cts +0 -5
  59. package/dist/kernel/components/blocks/navigation-progress.cjs +0 -270
  60. package/dist/kernel/components/blocks/navigation-progress.d.cts +0 -16
  61. package/dist/kernel/components/blocks/next-prev.cjs +0 -142
  62. package/dist/kernel/components/blocks/next-prev.d.cts +0 -11
  63. package/dist/kernel/components/blocks/page-list.cjs +0 -59
  64. package/dist/kernel/components/blocks/page-list.d.cts +0 -11
  65. package/dist/kernel/components/blocks/search.cjs +0 -717
  66. package/dist/kernel/components/blocks/search.d.cts +0 -77
  67. package/dist/kernel/components/blocks/sidebar-node.cjs +0 -309
  68. package/dist/kernel/components/blocks/sidebar-node.d.cts +0 -8
  69. package/dist/kernel/components/blocks/sidebar.cjs +0 -317
  70. package/dist/kernel/components/blocks/sidebar.d.cts +0 -33
  71. package/dist/kernel/components/blocks/theme-toggle.cjs +0 -31
  72. package/dist/kernel/components/blocks/theme-toggle.d.cts +0 -6
  73. package/dist/kernel/components/blocks/toc.cjs +0 -356
  74. package/dist/kernel/components/blocks/toc.d.cts +0 -10
  75. package/dist/kernel/components/mdx/components/blockquote.cjs +0 -66
  76. package/dist/kernel/components/mdx/components/blockquote.d.cts +0 -6
  77. package/dist/kernel/components/mdx/components/callout.cjs +0 -137
  78. package/dist/kernel/components/mdx/components/callout.d.cts +0 -18
  79. package/dist/kernel/components/mdx/components/code-block.cjs +0 -39
  80. package/dist/kernel/components/mdx/components/code-block.d.cts +0 -9
  81. package/dist/kernel/components/mdx/components/figure-caption.cjs +0 -63
  82. package/dist/kernel/components/mdx/components/figure-caption.d.cts +0 -6
  83. package/dist/kernel/components/mdx/components/figure.cjs +0 -78
  84. package/dist/kernel/components/mdx/components/figure.d.cts +0 -10
  85. package/dist/kernel/components/mdx/components/footnotes.cjs +0 -66
  86. package/dist/kernel/components/mdx/components/footnotes.d.cts +0 -6
  87. package/dist/kernel/components/mdx/components/heading-copy-link.cjs +0 -108
  88. package/dist/kernel/components/mdx/components/heading-copy-link.d.cts +0 -23
  89. package/dist/kernel/components/mdx/components/heading.cjs +0 -166
  90. package/dist/kernel/components/mdx/components/heading.d.cts +0 -8
  91. package/dist/kernel/components/mdx/components/hr.cjs +0 -34
  92. package/dist/kernel/components/mdx/components/hr.d.cts +0 -9
  93. package/dist/kernel/components/mdx/components/image-zoom.cjs +0 -49
  94. package/dist/kernel/components/mdx/components/image-zoom.d.cts +0 -10
  95. package/dist/kernel/components/mdx/components/image.cjs +0 -192
  96. package/dist/kernel/components/mdx/components/image.d.cts +0 -21
  97. package/dist/kernel/components/mdx/components/inline-code.cjs +0 -66
  98. package/dist/kernel/components/mdx/components/inline-code.d.cts +0 -6
  99. package/dist/kernel/components/mdx/components/kbd.cjs +0 -34
  100. package/dist/kernel/components/mdx/components/kbd.d.cts +0 -10
  101. package/dist/kernel/components/mdx/components/link.cjs +0 -49
  102. package/dist/kernel/components/mdx/components/link.d.cts +0 -11
  103. package/dist/kernel/components/mdx/components/paragraph.cjs +0 -87
  104. package/dist/kernel/components/mdx/components/paragraph.d.cts +0 -5
  105. package/dist/kernel/components/mdx/components/pre.cjs +0 -66
  106. package/dist/kernel/components/mdx/components/pre.d.cts +0 -6
  107. package/dist/kernel/components/mdx/components/strikethrough.cjs +0 -63
  108. package/dist/kernel/components/mdx/components/strikethrough.d.cts +0 -6
  109. package/dist/kernel/components/mdx/components/table.cjs +0 -59
  110. package/dist/kernel/components/mdx/components/table.d.cts +0 -10
  111. package/dist/kernel/components/mdx/components/task-list.cjs +0 -88
  112. package/dist/kernel/components/mdx/components/task-list.d.cts +0 -8
  113. package/dist/kernel/components/mdx/components/video-player.cjs +0 -173
  114. package/dist/kernel/components/mdx/components/video-player.d.cts +0 -18
  115. package/dist/kernel/components/mdx/components/video.cjs +0 -185
  116. package/dist/kernel/components/mdx/components/video.d.cts +0 -15
  117. package/dist/kernel/components/mdx/error-boundary.cjs +0 -62
  118. package/dist/kernel/components/mdx/error-boundary.d.cts +0 -8
  119. package/dist/kernel/components/mdx/error-fallback.cjs +0 -58
  120. package/dist/kernel/components/mdx/error-fallback.d.cts +0 -9
  121. package/dist/kernel/components/mdx/mdx.cjs +0 -141
  122. package/dist/kernel/components/mdx/mdx.d.cts +0 -22
  123. package/dist/kernel/components/mdx/rehype-heading-ids.cjs +0 -113
  124. package/dist/kernel/components/mdx/rehype-heading-ids.d.cts +0 -10
  125. package/dist/kernel/components/mdx/types.cjs +0 -18
  126. package/dist/kernel/components/mdx/types.d.cts +0 -18
  127. package/dist/kernel/components/ui/accordion.cjs +0 -104
  128. package/dist/kernel/components/ui/accordion.d.cts +0 -16
  129. package/dist/kernel/components/ui/breadcrumb-trail.cjs +0 -238
  130. package/dist/kernel/components/ui/breadcrumb-trail.d.cts +0 -13
  131. package/dist/kernel/components/ui/breadcrumb.cjs +0 -399
  132. package/dist/kernel/components/ui/breadcrumb.d.cts +0 -52
  133. package/dist/kernel/components/ui/button-group.cjs +0 -143
  134. package/dist/kernel/components/ui/button-group.d.cts +0 -19
  135. package/dist/kernel/components/ui/button.cjs +0 -139
  136. package/dist/kernel/components/ui/button.d.cts +0 -22
  137. package/dist/kernel/components/ui/card.cjs +0 -133
  138. package/dist/kernel/components/ui/card.d.cts +0 -17
  139. package/dist/kernel/components/ui/dialog.cjs +0 -149
  140. package/dist/kernel/components/ui/dialog.d.cts +0 -22
  141. package/dist/kernel/components/ui/drawer.cjs +0 -163
  142. package/dist/kernel/components/ui/drawer.d.cts +0 -24
  143. package/dist/kernel/components/ui/input.cjs +0 -96
  144. package/dist/kernel/components/ui/input.d.cts +0 -18
  145. package/dist/kernel/components/ui/kbd.cjs +0 -105
  146. package/dist/kernel/components/ui/kbd.d.cts +0 -13
  147. package/dist/kernel/components/ui/link.cjs +0 -253
  148. package/dist/kernel/components/ui/link.d.cts +0 -31
  149. package/dist/kernel/components/ui/menu.cjs +0 -301
  150. package/dist/kernel/components/ui/menu.d.cts +0 -70
  151. package/dist/kernel/components/ui/meta-key.cjs +0 -34
  152. package/dist/kernel/components/ui/meta-key.d.cts +0 -12
  153. package/dist/kernel/components/ui/navigation-menu.cjs +0 -253
  154. package/dist/kernel/components/ui/navigation-menu.d.cts +0 -47
  155. package/dist/kernel/components/ui/popover.cjs +0 -168
  156. package/dist/kernel/components/ui/popover.d.cts +0 -24
  157. package/dist/kernel/components/ui/progress.cjs +0 -112
  158. package/dist/kernel/components/ui/progress.d.cts +0 -16
  159. package/dist/kernel/components/ui/scroll-area.cjs +0 -413
  160. package/dist/kernel/components/ui/scroll-area.d.cts +0 -58
  161. package/dist/kernel/components/ui/select.cjs +0 -244
  162. package/dist/kernel/components/ui/select.d.cts +0 -40
  163. package/dist/kernel/components/ui/separator.cjs +0 -73
  164. package/dist/kernel/components/ui/separator.d.cts +0 -8
  165. package/dist/kernel/components/ui/table.cjs +0 -131
  166. package/dist/kernel/components/ui/table.d.cts +0 -11
  167. package/dist/kernel/components/ui/tabs.cjs +0 -450
  168. package/dist/kernel/components/ui/tabs.d.cts +0 -82
  169. package/dist/kernel/components/ui/tag.cjs +0 -104
  170. package/dist/kernel/components/ui/tag.d.cts +0 -14
  171. package/dist/kernel/components/ui/text.cjs +0 -184
  172. package/dist/kernel/components/ui/text.d.cts +0 -17
  173. package/dist/kernel/components/ui/theme-toggle.cjs +0 -108
  174. package/dist/kernel/components/ui/theme-toggle.d.cts +0 -10
  175. package/dist/kernel/components/ui/toast.cjs +0 -154
  176. package/dist/kernel/components/ui/toast.d.cts +0 -26
  177. package/dist/kernel/components/ui/tooltip.cjs +0 -127
  178. package/dist/kernel/components/ui/tooltip.d.cts +0 -20
  179. package/dist/kernel/defaults.registry.cjs +0 -541
  180. package/dist/kernel/defaults.registry.d.cts +0 -469
  181. package/dist/kernel/routes/agent/markdown.cjs +0 -202
  182. package/dist/kernel/routes/agent/markdown.d.cts +0 -58
  183. package/dist/kernel/routes/layouts/group.cjs +0 -181
  184. package/dist/kernel/routes/layouts/group.d.cts +0 -20
  185. package/dist/kernel/routes/metadata/feed.cjs +0 -293
  186. package/dist/kernel/routes/metadata/feed.d.cts +0 -20
  187. package/dist/kernel/routes/metadata/llms.cjs +0 -239
  188. package/dist/kernel/routes/metadata/llms.d.cts +0 -26
  189. package/dist/kernel/routes/metadata/og-image.cjs +0 -630
  190. package/dist/kernel/routes/metadata/og-image.d.cts +0 -62
  191. package/dist/kernel/routes/metadata/robots.cjs +0 -148
  192. package/dist/kernel/routes/metadata/robots.d.cts +0 -6
  193. package/dist/kernel/routes/metadata/sitemap.cjs +0 -192
  194. package/dist/kernel/routes/metadata/sitemap.d.cts +0 -8
  195. package/dist/kernel/routes/pages/group.cjs +0 -263
  196. package/dist/kernel/routes/pages/group.d.cts +0 -17
  197. package/dist/kernel/routes/pages/leaf.cjs +0 -421
  198. package/dist/kernel/routes/pages/leaf.d.cts +0 -36
  199. package/dist/kernel/routes/pages/root.cjs +0 -229
  200. package/dist/kernel/routes/pages/root.d.cts +0 -16
  201. package/dist/keyboard-shortcuts.cjs +0 -345
  202. package/dist/keyboard-shortcuts.d.cts +0 -34
  203. package/dist/resolvers/manifest-resolver.cjs +0 -111
  204. package/dist/resolvers/manifest-resolver.d.cts +0 -13
  205. package/dist/search.cjs +0 -411
  206. package/dist/search.d.cts +0 -20
  207. package/dist/types.cjs +0 -30
  208. package/dist/types.d.cts +0 -269
  209. package/dist/utils/cn.cjs +0 -49
  210. package/dist/utils/cn.d.cts +0 -15
  211. package/dist/utils/heading-ids.cjs +0 -119
  212. package/dist/utils/heading-ids.d.cts +0 -15
  213. package/dist/utils/pretty-date.cjs +0 -55
  214. package/dist/utils/pretty-date.d.cts +0 -6
@@ -1,59 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/kernel/components/mdx/components/table.tsx
21
- var table_exports = {};
22
- __export(table_exports, {
23
- Table: () => Table,
24
- TableBodyGroup: () => TableBodyGroup,
25
- TableDataCell: () => TableDataCell,
26
- TableHeadGroup: () => TableHeadGroup,
27
- TableHeaderCell: () => TableHeaderCell,
28
- TableRowGroup: () => TableRowGroup
29
- });
30
- module.exports = __toCommonJS(table_exports);
31
- var import_table = require("../../ui/table.js");
32
- var import_jsx_runtime = require("react/jsx-runtime");
33
- function Table(props) {
34
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table.Table, { ...props });
35
- }
36
- function TableHeadGroup(props) {
37
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table.TableHeader, { ...props });
38
- }
39
- function TableBodyGroup(props) {
40
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table.TableBody, { ...props });
41
- }
42
- function TableRowGroup(props) {
43
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table.TableRow, { ...props });
44
- }
45
- function TableHeaderCell(props) {
46
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table.TableHead, { ...props });
47
- }
48
- function TableDataCell(props) {
49
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table.TableCell, { ...props });
50
- }
51
- // Annotate the CommonJS export names for ESM import in node:
52
- 0 && (module.exports = {
53
- Table,
54
- TableBodyGroup,
55
- TableDataCell,
56
- TableHeadGroup,
57
- TableHeaderCell,
58
- TableRowGroup
59
- });
@@ -1,10 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- declare function Table(props: React.ComponentPropsWithoutRef<"table">): react_jsx_runtime.JSX.Element;
4
- declare function TableHeadGroup(props: React.ComponentPropsWithoutRef<"thead">): react_jsx_runtime.JSX.Element;
5
- declare function TableBodyGroup(props: React.ComponentPropsWithoutRef<"tbody">): react_jsx_runtime.JSX.Element;
6
- declare function TableRowGroup(props: React.ComponentPropsWithoutRef<"tr">): react_jsx_runtime.JSX.Element;
7
- declare function TableHeaderCell(props: React.ComponentPropsWithoutRef<"th">): react_jsx_runtime.JSX.Element;
8
- declare function TableDataCell(props: React.ComponentPropsWithoutRef<"td">): react_jsx_runtime.JSX.Element;
9
-
10
- export { Table, TableBodyGroup, TableDataCell, TableHeadGroup, TableHeaderCell, TableRowGroup };
@@ -1,88 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/kernel/components/mdx/components/task-list.tsx
21
- var task_list_exports = {};
22
- __export(task_list_exports, {
23
- TaskList: () => TaskList,
24
- TaskListInput: () => TaskListInput
25
- });
26
- module.exports = __toCommonJS(task_list_exports);
27
-
28
- // src/utils/cn.ts
29
- var import_clsx = require("clsx");
30
- var import_tailwind_merge = require("tailwind-merge");
31
- var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
32
- extend: {
33
- classGroups: {
34
- z: [
35
- "z-content",
36
- "z-nav",
37
- "z-overlay",
38
- "z-modal",
39
- "z-search",
40
- "z-toast",
41
- "z-progress"
42
- ]
43
- }
44
- }
45
- });
46
- function cn(...inputs) {
47
- return twMerge((0, import_clsx.clsx)(inputs));
48
- }
49
-
50
- // src/kernel/components/mdx/components/task-list.tsx
51
- var import_jsx_runtime = require("react/jsx-runtime");
52
- function TaskList({ className, ...props }) {
53
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
54
- "ul",
55
- {
56
- className: cn(
57
- "my-5 space-y-2 pl-6 text-base leading-7 text-foreground-2 [&>li]:pl-1",
58
- className
59
- ),
60
- ...props
61
- }
62
- );
63
- }
64
- function TaskListInput({
65
- checked,
66
- className,
67
- type
68
- }) {
69
- if (type !== "checkbox") return null;
70
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
71
- "span",
72
- {
73
- "aria-hidden": "true",
74
- className: cn(
75
- "mr-2 inline-flex size-4 translate-y-0.5 items-center justify-center rounded-checkbox border border-stroke-2 bg-surface-1",
76
- checked && "border-accent-solid bg-accent-solid text-accent-foreground",
77
- className
78
- ),
79
- "data-checked": checked ? "" : void 0,
80
- children: checked ? "x" : null
81
- }
82
- );
83
- }
84
- // Annotate the CommonJS export names for ESM import in node:
85
- 0 && (module.exports = {
86
- TaskList,
87
- TaskListInput
88
- });
@@ -1,8 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- type TaskListProps = React.ComponentPropsWithoutRef<"ul">;
4
- type TaskListInputProps = React.ComponentPropsWithoutRef<"input">;
5
- declare function TaskList({ className, ...props }: TaskListProps): react_jsx_runtime.JSX.Element;
6
- declare function TaskListInput({ checked, className, type, }: TaskListInputProps): react_jsx_runtime.JSX.Element | null;
7
-
8
- export { TaskList, TaskListInput, type TaskListInputProps, type TaskListProps };
@@ -1,173 +0,0 @@
1
- "use strict";
2
- "use client";
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/kernel/components/mdx/components/video-player.tsx
22
- var video_player_exports = {};
23
- __export(video_player_exports, {
24
- VideoPlayer: () => VideoPlayer
25
- });
26
- module.exports = __toCommonJS(video_player_exports);
27
-
28
- // src/utils/cn.ts
29
- var import_clsx = require("clsx");
30
- var import_tailwind_merge = require("tailwind-merge");
31
- var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
32
- extend: {
33
- classGroups: {
34
- z: [
35
- "z-content",
36
- "z-nav",
37
- "z-overlay",
38
- "z-modal",
39
- "z-search",
40
- "z-toast",
41
- "z-progress"
42
- ]
43
- }
44
- }
45
- });
46
- function cn(...inputs) {
47
- return twMerge((0, import_clsx.clsx)(inputs));
48
- }
49
-
50
- // src/kernel/components/mdx/components/video-player.tsx
51
- var import_navigation = require("next/navigation");
52
- var import_react = require("react");
53
- var import_jsx_runtime = require("react/jsx-runtime");
54
- var VIDEO_PLAY_EVENT = "publishos:video-play";
55
- function VideoPlayer({
56
- className,
57
- embed,
58
- height,
59
- poster,
60
- src,
61
- title,
62
- width
63
- }) {
64
- const instanceId = (0, import_react.useId)();
65
- const pathname = (0, import_navigation.usePathname)();
66
- const [playing, setPlaying] = (0, import_react.useState)(false);
67
- const aspectRatio = width && height ? `${width} / ${height}` : "16 / 9";
68
- const mediaKey = embed?.src ?? src;
69
- const shellStyle = poster ? {
70
- aspectRatio,
71
- backgroundImage: `url("${poster}")`,
72
- backgroundPosition: "center",
73
- backgroundSize: "cover"
74
- } : { aspectRatio };
75
- const buttonStyle = {
76
- ...shellStyle,
77
- appearance: "none",
78
- border: 0,
79
- borderRadius: "inherit",
80
- padding: 0
81
- };
82
- (0, import_react.useEffect)(() => {
83
- if (mediaKey || pathname) {
84
- setPlaying(false);
85
- }
86
- }, [mediaKey, pathname]);
87
- (0, import_react.useEffect)(() => {
88
- function handlePlay(event) {
89
- const detail = event.detail;
90
- if (detail?.id !== instanceId) {
91
- setPlaying(false);
92
- }
93
- }
94
- window.addEventListener(VIDEO_PLAY_EVENT, handlePlay);
95
- return () => window.removeEventListener(VIDEO_PLAY_EVENT, handlePlay);
96
- }, [instanceId]);
97
- const startPlaying = (0, import_react.useCallback)(() => {
98
- window.dispatchEvent(
99
- new CustomEvent(VIDEO_PLAY_EVENT, { detail: { id: instanceId } })
100
- );
101
- setPlaying(true);
102
- }, [instanceId]);
103
- if (playing) {
104
- if (embed) {
105
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
106
- "iframe",
107
- {
108
- allow: embed.allow,
109
- allowFullScreen: true,
110
- className: cn("block h-full w-full border-0 bg-black", className),
111
- referrerPolicy: "strict-origin-when-cross-origin",
112
- sandbox: "allow-scripts allow-same-origin allow-presentation allow-popups",
113
- src: embed.src,
114
- title: embed.title
115
- },
116
- embed.src
117
- );
118
- }
119
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
120
- "video",
121
- {
122
- autoPlay: true,
123
- className: cn("block h-full w-full border-0 bg-black", className),
124
- controls: true,
125
- playsInline: true,
126
- poster,
127
- preload: "metadata",
128
- src,
129
- title,
130
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("track", { kind: "captions" })
131
- },
132
- src
133
- );
134
- }
135
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
136
- "button",
137
- {
138
- "aria-label": `Play video: ${title}`,
139
- className: cn(
140
- "group relative block h-full w-full appearance-none overflow-hidden border-0 bg-surface-3 p-0 text-foreground-1 outline-none",
141
- "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent-8",
142
- className
143
- ),
144
- onClick: startPlaying,
145
- style: buttonStyle,
146
- type: "button",
147
- children: [
148
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
149
- "span",
150
- {
151
- className: cn(!poster && "absolute inset-0 bg-surface-3"),
152
- "aria-hidden": true
153
- }
154
- ),
155
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
156
- "span",
157
- {
158
- "aria-hidden": true,
159
- className: cn(
160
- "absolute inset-0 transition-colors duration-200",
161
- poster ? "bg-black/20 group-hover:bg-black/30" : "bg-[radial-gradient(circle_at_center,_rgb(255_255_255_/_8%),_transparent_45%)]"
162
- )
163
- }
164
- ),
165
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-hidden": true, className: "absolute inset-0 grid place-items-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "flex size-14 items-center justify-center rounded-full border border-white/40 bg-black/70 text-white shadow-lg transition-transform duration-200 group-hover:scale-105", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ml-1 block h-0 w-0 border-y-[9px] border-y-transparent border-l-[14px] border-l-current" }) }) })
166
- ]
167
- }
168
- );
169
- }
170
- // Annotate the CommonJS export names for ESM import in node:
171
- 0 && (module.exports = {
172
- VideoPlayer
173
- });
@@ -1,18 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- type VideoEmbed = {
4
- allow: string;
5
- src: string;
6
- title: string;
7
- };
8
- declare function VideoPlayer({ className, embed, height, poster, src, title, width, }: {
9
- className?: string;
10
- embed?: VideoEmbed;
11
- height?: number;
12
- poster?: string;
13
- src: string;
14
- title: string;
15
- width?: number;
16
- }): react_jsx_runtime.JSX.Element;
17
-
18
- export { type VideoEmbed, VideoPlayer };
@@ -1,185 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/kernel/components/mdx/components/video.tsx
21
- var video_exports = {};
22
- __export(video_exports, {
23
- Video: () => Video
24
- });
25
- module.exports = __toCommonJS(video_exports);
26
- var import_figure_caption = require("./figure-caption.js");
27
- var import_video_player = require("./video-player.js");
28
-
29
- // src/utils/cn.ts
30
- var import_clsx = require("clsx");
31
- var import_tailwind_merge = require("tailwind-merge");
32
- var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
33
- extend: {
34
- classGroups: {
35
- z: [
36
- "z-content",
37
- "z-nav",
38
- "z-overlay",
39
- "z-modal",
40
- "z-search",
41
- "z-toast",
42
- "z-progress"
43
- ]
44
- }
45
- }
46
- });
47
- function cn(...inputs) {
48
- return twMerge((0, import_clsx.clsx)(inputs));
49
- }
50
-
51
- // src/kernel/components/mdx/components/video.tsx
52
- var import_jsx_runtime = require("react/jsx-runtime");
53
- function toNumber(value) {
54
- if (typeof value === "number" && Number.isFinite(value)) return value;
55
- if (typeof value === "string" && value.trim() !== "") {
56
- const parsed = Number(value);
57
- if (Number.isFinite(parsed)) return parsed;
58
- }
59
- return void 0;
60
- }
61
- function youtubeId(url) {
62
- if (url.hostname === "youtu.be") return url.pathname.replace(/^\/+/, "");
63
- if (url.hostname.endsWith("youtube.com")) {
64
- if (url.pathname.startsWith("/embed/")) {
65
- return url.pathname.split("/")[2];
66
- }
67
- return url.searchParams.get("v") ?? void 0;
68
- }
69
- return void 0;
70
- }
71
- function resolveEmbed(src, title) {
72
- let url;
73
- try {
74
- url = new URL(src);
75
- } catch {
76
- return void 0;
77
- }
78
- const id = youtubeId(url);
79
- if (id) {
80
- return {
81
- allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",
82
- src: `https://www.youtube-nocookie.com/embed/${encodeURIComponent(id)}?autoplay=1`,
83
- title
84
- };
85
- }
86
- if (url.hostname.endsWith("vimeo.com")) {
87
- const id2 = url.pathname.split("/").filter(Boolean).at(-1);
88
- if (id2) {
89
- return {
90
- allow: "autoplay; fullscreen; picture-in-picture",
91
- src: `https://player.vimeo.com/video/${encodeURIComponent(id2)}?autoplay=1`,
92
- title
93
- };
94
- }
95
- }
96
- if (url.hostname.endsWith("loom.com")) {
97
- const parts = url.pathname.split("/").filter(Boolean);
98
- const id2 = parts.at(-1);
99
- if (id2) {
100
- return {
101
- allow: "autoplay; fullscreen",
102
- src: `https://www.loom.com/embed/${encodeURIComponent(id2)}?autoplay=1`,
103
- title
104
- };
105
- }
106
- }
107
- if (url.hostname.endsWith("wistia.com")) {
108
- const parts = url.pathname.split("/").filter(Boolean);
109
- const id2 = parts.at(-1);
110
- if (id2) {
111
- return {
112
- allow: "autoplay; fullscreen",
113
- src: `https://fast.wistia.net/embed/iframe/${encodeURIComponent(id2)}?autoPlay=true`,
114
- title
115
- };
116
- }
117
- }
118
- if (url.hostname === "watch.cloudflarestream.com" || url.hostname === "iframe.videodelivery.net") {
119
- const id2 = url.pathname.split("/").filter(Boolean).at(-1);
120
- if (id2) {
121
- return {
122
- allow: "accelerometer; autoplay; encrypted-media; picture-in-picture",
123
- src: `https://iframe.videodelivery.net/${encodeURIComponent(id2)}?autoplay=true`,
124
- title
125
- };
126
- }
127
- }
128
- return void 0;
129
- }
130
- function Video({
131
- caption,
132
- className,
133
- frame = "default",
134
- height,
135
- poster,
136
- src,
137
- title,
138
- width
139
- }) {
140
- if (!src) return null;
141
- const videoTitle = title?.trim() || "Video";
142
- const numericWidth = toNumber(width);
143
- const numericHeight = toNumber(height);
144
- const framed = frame !== false && frame !== "none";
145
- const embed = resolveEmbed(src, videoTitle);
146
- const reservedWidth = numericWidth ?? 1280;
147
- const reservedHeight = numericHeight ?? 720;
148
- const frameStyle = {
149
- aspectRatio: `${reservedWidth} / ${reservedHeight}`,
150
- width: numericWidth ? `min(100%, ${numericWidth}px)` : "100%"
151
- };
152
- const player = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
153
- "div",
154
- {
155
- className: cn(
156
- "not-markdown-prose relative mx-auto max-w-full overflow-hidden bg-surface-3",
157
- framed && "rounded-media border border-stroke-2",
158
- className
159
- ),
160
- style: frameStyle,
161
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
162
- import_video_player.VideoPlayer,
163
- {
164
- embed,
165
- height: numericHeight,
166
- poster,
167
- src,
168
- title: videoTitle,
169
- width: numericWidth
170
- }
171
- )
172
- }
173
- );
174
- if (caption) {
175
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("figure", { className: "not-markdown-prose my-8", children: [
176
- player,
177
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_figure_caption.FigureCaption, { className: "mx-auto max-w-prose text-center", children: caption })
178
- ] });
179
- }
180
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "not-markdown-prose my-6", children: player });
181
- }
182
- // Annotate the CommonJS export names for ESM import in node:
183
- 0 && (module.exports = {
184
- Video
185
- });
@@ -1,15 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- type VideoProps = Omit<React.ComponentPropsWithoutRef<"video">, "height" | "poster" | "src" | "title" | "width"> & {
4
- caption?: React.ReactNode;
5
- frame?: boolean | "default" | "none";
6
- height?: number | string;
7
- poster?: string;
8
- provider?: "self-hosted" | "youtube" | "vimeo" | "loom" | "wistia" | "cloudflare-stream";
9
- src?: string;
10
- title?: string;
11
- width?: number | string;
12
- };
13
- declare function Video({ caption, className, frame, height, poster, src, title, width, }: VideoProps): react_jsx_runtime.JSX.Element | null;
14
-
15
- export { Video, type VideoProps };
@@ -1,62 +0,0 @@
1
- "use strict";
2
- "use client";
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/kernel/components/mdx/error-boundary.tsx
22
- var error_boundary_exports = {};
23
- __export(error_boundary_exports, {
24
- MDXErrorBoundary: () => MDXErrorBoundary
25
- });
26
- module.exports = __toCommonJS(error_boundary_exports);
27
- var import_error_fallback = require("./error-fallback.js");
28
- var import_error = require("next/error");
29
- var import_jsx_runtime = require("react/jsx-runtime");
30
- function MDXRenderErrorFallback(props, { error }) {
31
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
32
- import_error_fallback.MDXErrorFallback,
33
- {
34
- errorMessage: props.errorMessage ?? error.message,
35
- pageId: props.pageId,
36
- slug: props.slug
37
- }
38
- );
39
- }
40
- var MDXRenderErrorBoundary = (0, import_error.unstable_catchError)(MDXRenderErrorFallback);
41
- function MDXErrorBoundary({
42
- errorMessage,
43
- pageId,
44
- slug,
45
- children
46
- }) {
47
- if (errorMessage) {
48
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
49
- import_error_fallback.MDXErrorFallback,
50
- {
51
- errorMessage,
52
- pageId,
53
- slug
54
- }
55
- );
56
- }
57
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MDXRenderErrorBoundary, { pageId, slug, children });
58
- }
59
- // Annotate the CommonJS export names for ESM import in node:
60
- 0 && (module.exports = {
61
- MDXErrorBoundary
62
- });
@@ -1,8 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { MdxErrorBoundaryProps } from './types.cjs';
3
- import 'mdx/types.js';
4
- import 'react';
5
-
6
- declare function MDXErrorBoundary({ errorMessage, pageId, slug, children, }: MdxErrorBoundaryProps): react_jsx_runtime.JSX.Element;
7
-
8
- export { MDXErrorBoundary };