@publish.os/nextjs 0.0.1-alpha.91 → 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 -2
- package/compiler-assets/nextjs/defaults/group/page.tsx +7 -6
- package/compiler-assets/nextjs/defaults/project/next.config.mjs +2 -1
- 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 +9 -1
- package/compiler-assets/nextjs/shims/generated-leaf-page.tsx +3 -0
- package/compiler-assets/nextjs/shims/proxy.ts +156 -54
- package/dist/{build-operation-5QMLXF7N.js → build-operation-CJDUL4OW.js} +5 -5
- package/dist/{chunk-GBPLER5H.js → chunk-3T4HVDSC.js} +2 -2
- package/dist/{chunk-UYGCOWRF.js → chunk-DX7PXFCM.js} +860 -50
- package/dist/{chunk-F3AGNDF4.js → chunk-DZ3VWEV5.js} +860 -575
- package/dist/{chunk-OXOFRXEI.js → chunk-NHSLTARU.js} +1284 -1164
- package/dist/{chunk-ORIUWJBQ.js → chunk-SBMDONTV.js} +3 -2
- package/dist/compiler.js +42 -23
- package/dist/components/blocks/agent-actions.d.ts +7 -7
- package/dist/components/blocks/agent-actions.js +1 -32
- package/dist/components/blocks/toc.d.ts +7 -7
- package/dist/components/ui/button.d.ts +1 -2
- package/dist/{compose-CVBJRAF6.js → compose-44GJSMXD.js} +2 -2
- package/dist/config/createNextConfig.js +2 -0
- package/dist/{dev-operation-OSHHWRWK.js → dev-operation-WNECBHZ5.js} +17 -7
- package/dist/{ide-support-CU6Z5PVR.js → ide-support-TG74L4FF.js} +3 -3
- package/dist/index.d.ts +143 -126
- package/dist/index.js +25 -0
- package/dist/kernel/components/blocks/AgentActions.d.ts +7 -7
- package/dist/kernel/components/blocks/AgentActions.js +1 -32
- package/dist/kernel/components/blocks/agent-actions.d.ts +1 -2
- package/dist/kernel/components/blocks/agent-actions.js +1 -32
- package/dist/kernel/components/blocks/animated-icon-swap.d.ts +2 -2
- package/dist/kernel/components/blocks/color-palette.d.ts +2 -2
- package/dist/kernel/components/blocks/logo-block.d.ts +2 -2
- package/dist/kernel/components/blocks/nav-breadcrumb.d.ts +6 -5
- package/dist/kernel/components/blocks/nav-breadcrumb.js +19 -13
- package/dist/kernel/components/blocks/navbar.d.ts +5 -4
- package/dist/kernel/components/blocks/navbar.js +62 -42
- package/dist/kernel/components/blocks/navigation-progress.d.ts +2 -2
- package/dist/kernel/components/blocks/next-prev.d.ts +4 -4
- package/dist/kernel/components/blocks/next-prev.js +29 -6
- package/dist/kernel/components/blocks/page-list.d.ts +4 -4
- package/dist/kernel/components/blocks/page-list.js +30 -7
- package/dist/kernel/components/blocks/search.d.ts +9 -15
- package/dist/kernel/components/blocks/sidebar-node.d.ts +3 -5
- package/dist/kernel/components/blocks/sidebar-node.js +12 -2
- package/dist/kernel/components/blocks/sidebar.d.ts +6 -7
- package/dist/kernel/components/blocks/sidebar.js +132 -26
- package/dist/kernel/components/blocks/theme-toggle.d.ts +3 -4
- package/dist/kernel/components/blocks/toc-client.d.ts +7 -7
- package/dist/kernel/components/blocks/toc.d.ts +3 -3
- package/dist/kernel/components/mdx/components/blockquote.d.ts +2 -2
- package/dist/kernel/components/mdx/components/callout.d.ts +3 -3
- package/dist/kernel/components/mdx/components/code-block.d.ts +2 -2
- package/dist/kernel/components/mdx/components/copy-code-button.d.ts +2 -2
- package/dist/kernel/components/mdx/components/figure-caption.d.ts +2 -2
- package/dist/kernel/components/mdx/components/figure.d.ts +3 -3
- package/dist/kernel/components/mdx/components/footnotes.d.ts +2 -2
- package/dist/kernel/components/mdx/components/heading-copy-link.d.ts +2 -2
- package/dist/kernel/components/mdx/components/heading.d.ts +2 -2
- package/dist/kernel/components/mdx/components/hr.d.ts +4 -4
- package/dist/kernel/components/mdx/components/image-zoom.d.ts +3 -3
- package/dist/kernel/components/mdx/components/image-zoom.js +3 -2
- package/dist/kernel/components/mdx/components/image.d.ts +2 -2
- package/dist/kernel/components/mdx/components/image.js +1 -1
- package/dist/kernel/components/mdx/components/inline-code.d.ts +2 -2
- package/dist/kernel/components/mdx/components/kbd.d.ts +3 -3
- package/dist/kernel/components/mdx/components/link.d.ts +3 -3
- package/dist/kernel/components/mdx/components/paragraph.d.ts +2 -2
- package/dist/kernel/components/mdx/components/strikethrough.d.ts +2 -2
- package/dist/kernel/components/mdx/components/table.d.ts +7 -7
- package/dist/kernel/components/mdx/components/task-list.d.ts +3 -3
- package/dist/kernel/components/mdx/components/video-player.d.ts +2 -2
- package/dist/kernel/components/mdx/components/video.d.ts +2 -3
- package/dist/kernel/components/mdx/error-boundary.d.ts +2 -3
- package/dist/kernel/components/mdx/error-fallback.d.ts +2 -2
- package/dist/kernel/components/mdx/mdx.d.ts +42 -11
- package/dist/kernel/components/mdx/mdx.js +1 -1
- package/dist/kernel/components/next-image.d.ts +3 -3
- package/dist/kernel/components/ui/accordion.d.ts +7 -7
- package/dist/kernel/components/ui/breadcrumb-trail.d.ts +2 -3
- package/dist/kernel/components/ui/breadcrumb.d.ts +13 -13
- package/dist/kernel/components/ui/button-group.d.ts +5 -5
- package/dist/kernel/components/ui/button.d.ts +3 -3
- package/dist/kernel/components/ui/card.d.ts +7 -7
- package/dist/kernel/components/ui/dialog.d.ts +10 -10
- package/dist/kernel/components/ui/drawer.d.ts +12 -12
- package/dist/kernel/components/ui/kbd.d.ts +3 -3
- package/dist/kernel/components/ui/link.d.ts +3 -3
- package/dist/kernel/components/ui/menu.d.ts +22 -22
- package/dist/kernel/components/ui/mod-key.d.ts +2 -3
- package/dist/kernel/components/ui/navigation-menu.d.ts +15 -15
- package/dist/kernel/components/ui/popover.d.ts +11 -11
- package/dist/kernel/components/ui/progress.d.ts +7 -7
- package/dist/kernel/components/ui/scroll-area.d.ts +1 -2
- package/dist/kernel/components/ui/select.d.ts +16 -16
- package/dist/kernel/components/ui/separator.d.ts +3 -3
- package/dist/kernel/components/ui/table.d.ts +7 -7
- package/dist/kernel/components/ui/tabs.d.ts +12 -12
- package/dist/kernel/components/ui/tag.d.ts +3 -3
- package/dist/kernel/components/ui/text.d.ts +4 -4
- package/dist/kernel/components/ui/toast.d.ts +11 -11
- package/dist/kernel/components/ui/tooltip.d.ts +9 -9
- package/dist/kernel/defaults.registry.d.ts +2 -2
- package/dist/kernel/defaults.registry.js +2 -2
- package/dist/kernel/routes/agent/markdown.d.ts +4 -0
- package/dist/kernel/routes/agent/markdown.js +11 -7
- package/dist/kernel/routes/layouts/group.d.ts +1 -1
- package/dist/kernel/routes/metadata/feed.d.ts +1 -2
- package/dist/kernel/routes/metadata/feed.js +34 -29
- package/dist/kernel/routes/metadata/llms.d.ts +3 -31
- package/dist/kernel/routes/metadata/llms.js +2 -200
- 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 +15 -1
- package/dist/kernel/routes/metadata/sitemap.js +200 -112
- package/dist/kernel/routes/not-found.js +1 -1
- package/dist/kernel/routes/pages/group.d.ts +3 -3
- package/dist/kernel/routes/pages/group.js +10 -4
- package/dist/kernel/routes/pages/leaf.d.ts +9 -4
- package/dist/kernel/routes/pages/leaf.js +16 -8
- package/dist/kernel/routes/pages/root.d.ts +3 -3
- package/dist/kernel/routes/pages/root.js +20 -5
- package/dist/keyboard-shortcuts.d.ts +2 -2
- 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/search.d.ts +2 -9
- package/dist/search.js +2 -7
- package/dist/sidebar-types-CMrMM0Nj.d.ts +105 -0
- package/dist/theme-scope.d.ts +2 -2
- package/dist/types-BbqmOzLC.d.ts +168 -0
- package/dist/types-TjH1ek0X.d.ts +22 -0
- package/dist/types.d.ts +116 -91
- package/dist/{validate-local-source-SV44DBQT.js → validate-local-source-EN2GW4FR.js} +3 -3
- package/dist/{validate-publish-os-source-NZJF3TB2.js → validate-publish-os-source-OEWQDB7B.js} +2 -2
- package/init/seed/minimal/publish.os/blog/index.tsx +25 -22
- package/init/seed/minimal/publish.os/blog/page.tsx +31 -16
- package/init/seed/minimal/publish.os/components/blog/copy-link.tsx +1 -1
- package/init/seed/minimal/publish.os/components/blog/frontmatter.ts +41 -0
- package/init/seed/minimal/publish.os/publish.os.config.json +13 -2
- package/init/seed/minimal/seed.json +1 -0
- package/init/seed/scratch/publish.os/publish.os.config.json +1 -1
- package/package.json +4 -4
- package/release/app/phosphor/package.json +1 -1
- package/release/app/phosphor/pnpm-lock.yaml.template +53 -127
- package/release/compiler/pnpm-lock.yaml.template +49 -123
- package/release/release.json +4 -4
- package/dist/sidebar-types-DKpR27II.d.ts +0 -25
- package/dist/types-CJWRG05y.d.ts +0 -76
- package/dist/types-CUtrppxt.d.ts +0 -69
- package/dist/types-J2w_puPF.d.ts +0 -128
- package/dist/{button-BdCScEKi.d.ts → button-D6Xp2HBm.d.ts} +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Popover as Popover$1 } from '@base-ui/react/popover';
|
|
1
|
+
import * as react from 'react';
|
|
3
2
|
import { ComponentPropsWithRef } from 'react';
|
|
3
|
+
import { Popover as Popover$1 } from '@base-ui/react/popover';
|
|
4
4
|
|
|
5
5
|
type PopoverProps = ComponentPropsWithRef<typeof Popover$1.Root>;
|
|
6
6
|
type PopoverTriggerProps = ComponentPropsWithRef<typeof Popover$1.Trigger>;
|
|
@@ -11,14 +11,14 @@ type PopoverTitleProps = ComponentPropsWithRef<typeof Popover$1.Title>;
|
|
|
11
11
|
type PopoverDescriptionProps = ComponentPropsWithRef<typeof Popover$1.Description>;
|
|
12
12
|
type PopoverCloseProps = ComponentPropsWithRef<typeof Popover$1.Close>;
|
|
13
13
|
type PopoverArrowProps = ComponentPropsWithRef<typeof Popover$1.Arrow>;
|
|
14
|
-
declare function Popover(props: PopoverProps):
|
|
15
|
-
declare function PopoverTrigger({ className, ...props }: PopoverTriggerProps):
|
|
16
|
-
declare function PopoverPortal(props: PopoverPortalProps):
|
|
17
|
-
declare function PopoverPositioner({ className, sideOffset, ...props }: PopoverPositionerProps):
|
|
18
|
-
declare function PopoverPopup({ className, ...props }: PopoverPopupProps):
|
|
19
|
-
declare function PopoverTitle({ className, ...props }: PopoverTitleProps):
|
|
20
|
-
declare function PopoverDescription({ className, ...props }: PopoverDescriptionProps):
|
|
21
|
-
declare function PopoverClose({ className, ...props }: PopoverCloseProps):
|
|
22
|
-
declare function PopoverArrow({ className, ...props }: PopoverArrowProps):
|
|
14
|
+
declare function Popover(props: PopoverProps): react.JSX.Element;
|
|
15
|
+
declare function PopoverTrigger({ className, ...props }: PopoverTriggerProps): react.JSX.Element;
|
|
16
|
+
declare function PopoverPortal(props: PopoverPortalProps): react.JSX.Element;
|
|
17
|
+
declare function PopoverPositioner({ className, sideOffset, ...props }: PopoverPositionerProps): react.JSX.Element;
|
|
18
|
+
declare function PopoverPopup({ className, ...props }: PopoverPopupProps): react.JSX.Element;
|
|
19
|
+
declare function PopoverTitle({ className, ...props }: PopoverTitleProps): react.JSX.Element;
|
|
20
|
+
declare function PopoverDescription({ className, ...props }: PopoverDescriptionProps): react.JSX.Element;
|
|
21
|
+
declare function PopoverClose({ className, ...props }: PopoverCloseProps): react.JSX.Element;
|
|
22
|
+
declare function PopoverArrow({ className, ...props }: PopoverArrowProps): react.JSX.Element;
|
|
23
23
|
|
|
24
24
|
export { Popover, PopoverArrow, type PopoverArrowProps, PopoverClose, type PopoverCloseProps, PopoverDescription, type PopoverDescriptionProps, PopoverPopup, type PopoverPopupProps, PopoverPortal, type PopoverPortalProps, PopoverPositioner, type PopoverPositionerProps, type PopoverProps, PopoverTitle, type PopoverTitleProps, PopoverTrigger, type PopoverTriggerProps };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Progress as Progress$1 } from '@base-ui/react/progress';
|
|
1
|
+
import * as react from 'react';
|
|
3
2
|
import { ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
import { Progress as Progress$1 } from '@base-ui/react/progress';
|
|
4
4
|
|
|
5
5
|
type ProgressProps = ComponentPropsWithoutRef<typeof Progress$1.Root>;
|
|
6
6
|
type ProgressTrackProps = ComponentPropsWithoutRef<typeof Progress$1.Track>;
|
|
7
7
|
type ProgressIndicatorProps = ComponentPropsWithoutRef<typeof Progress$1.Indicator>;
|
|
8
8
|
type ProgressLabelProps = ComponentPropsWithoutRef<typeof Progress$1.Label>;
|
|
9
9
|
type ProgressValueProps = ComponentPropsWithoutRef<typeof Progress$1.Value>;
|
|
10
|
-
declare function Progress(props: ProgressProps):
|
|
11
|
-
declare function ProgressTrack({ className, ...props }: ProgressTrackProps):
|
|
12
|
-
declare function ProgressIndicator({ className, ...props }: ProgressIndicatorProps):
|
|
13
|
-
declare function ProgressLabel({ className, ...props }: ProgressLabelProps):
|
|
14
|
-
declare function ProgressValue({ className, ...props }: ProgressValueProps):
|
|
10
|
+
declare function Progress(props: ProgressProps): react.JSX.Element;
|
|
11
|
+
declare function ProgressTrack({ className, ...props }: ProgressTrackProps): react.JSX.Element;
|
|
12
|
+
declare function ProgressIndicator({ className, ...props }: ProgressIndicatorProps): react.JSX.Element;
|
|
13
|
+
declare function ProgressLabel({ className, ...props }: ProgressLabelProps): react.JSX.Element;
|
|
14
|
+
declare function ProgressValue({ className, ...props }: ProgressValueProps): react.JSX.Element;
|
|
15
15
|
|
|
16
16
|
export { Progress, ProgressIndicator, type ProgressIndicatorProps, ProgressLabel, type ProgressLabelProps, type ProgressProps, ProgressTrack, type ProgressTrackProps, ProgressValue, type ProgressValueProps };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as react from 'react';
|
|
3
2
|
import { ComponentPropsWithoutRef, ReactNode, Ref, ComponentRef } from 'react';
|
|
4
3
|
import * as _base_ui_react from '@base-ui/react';
|
|
@@ -48,7 +47,7 @@ type ScrollAreaProps = ScrollAreaRootProps & ScrollAreaVariantProps & {
|
|
|
48
47
|
viewportRef?: Ref<ComponentRef<typeof ScrollArea$1.Viewport>>;
|
|
49
48
|
};
|
|
50
49
|
declare const ScrollAreaRoot: react.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.ScrollAreaRootProps, "ref"> & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
51
|
-
declare function ScrollArea({ border, borderEndClassName, borderStartClassName, children, className, contentClassName, contentProps, corner, cornerClassName, cornerProps, mask, orientation, scrollbar, scrollbarClassName, scrollbarProps, thumbClassName, thumbProps, variant, viewportClassName, viewportProps, viewportRef, ...props }: ScrollAreaProps):
|
|
50
|
+
declare function ScrollArea({ border, borderEndClassName, borderStartClassName, children, className, contentClassName, contentProps, corner, cornerClassName, cornerProps, mask, orientation, scrollbar, scrollbarClassName, scrollbarProps, thumbClassName, thumbProps, variant, viewportClassName, viewportProps, viewportRef, ...props }: ScrollAreaProps): react.JSX.Element;
|
|
52
51
|
declare const ScrollAreaViewport: react.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.ScrollAreaViewportProps, "ref"> & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
53
52
|
declare const ScrollAreaContent: react.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.ScrollAreaContentProps, "ref"> & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
54
53
|
declare const ScrollAreaScrollbar: react.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.ScrollAreaScrollbarProps, "ref"> & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
4
|
import { Select as Select$1 } from '@base-ui/react/select';
|
|
4
5
|
import { VariantProps } from 'class-variance-authority';
|
|
5
|
-
import { ComponentPropsWithRef } from 'react';
|
|
6
6
|
|
|
7
7
|
type SelectRootProps = ComponentPropsWithRef<typeof Select$1.Root>;
|
|
8
8
|
type SelectLabelProps = ComponentPropsWithRef<typeof Select$1.Label>;
|
|
@@ -22,19 +22,19 @@ type SelectItemIndicatorProps = ComponentPropsWithRef<typeof Select$1.ItemIndica
|
|
|
22
22
|
type SelectItemTextProps = ComponentPropsWithRef<typeof Select$1.ItemText>;
|
|
23
23
|
type SelectGroupProps = ComponentPropsWithRef<typeof Select$1.Group>;
|
|
24
24
|
type SelectGroupLabelProps = ComponentPropsWithRef<typeof Select$1.GroupLabel>;
|
|
25
|
-
declare function Select(props: SelectRootProps):
|
|
26
|
-
declare function SelectLabel({ className, ...props }: SelectLabelProps):
|
|
27
|
-
declare function SelectTrigger({ className, size, ...props }: SelectTriggerProps):
|
|
28
|
-
declare function SelectValue({ className, ...props }: SelectValueProps):
|
|
29
|
-
declare function SelectIcon({ children, className, ...props }: SelectIconProps):
|
|
30
|
-
declare function SelectPortal(props: SelectPortalProps):
|
|
31
|
-
declare function SelectPositioner({ className, sideOffset, ...props }: SelectPositionerProps):
|
|
32
|
-
declare function SelectPopup({ className, ...props }: SelectPopupProps):
|
|
33
|
-
declare function SelectList({ className, ...props }: SelectListProps):
|
|
34
|
-
declare function SelectItem({ className, ...props }: SelectItemProps):
|
|
35
|
-
declare function SelectItemIndicator({ children, className, ...props }: SelectItemIndicatorProps):
|
|
36
|
-
declare function SelectItemText({ className, ...props }: SelectItemTextProps):
|
|
37
|
-
declare function SelectGroup({ className, ...props }: SelectGroupProps):
|
|
38
|
-
declare function SelectGroupLabel({ className, ...props }: SelectGroupLabelProps):
|
|
25
|
+
declare function Select(props: SelectRootProps): react.JSX.Element;
|
|
26
|
+
declare function SelectLabel({ className, ...props }: SelectLabelProps): react.JSX.Element;
|
|
27
|
+
declare function SelectTrigger({ className, size, ...props }: SelectTriggerProps): react.JSX.Element;
|
|
28
|
+
declare function SelectValue({ className, ...props }: SelectValueProps): react.JSX.Element;
|
|
29
|
+
declare function SelectIcon({ children, className, ...props }: SelectIconProps): react.JSX.Element;
|
|
30
|
+
declare function SelectPortal(props: SelectPortalProps): react.JSX.Element;
|
|
31
|
+
declare function SelectPositioner({ className, sideOffset, ...props }: SelectPositionerProps): react.JSX.Element;
|
|
32
|
+
declare function SelectPopup({ className, ...props }: SelectPopupProps): react.JSX.Element;
|
|
33
|
+
declare function SelectList({ className, ...props }: SelectListProps): react.JSX.Element;
|
|
34
|
+
declare function SelectItem({ className, ...props }: SelectItemProps): react.JSX.Element;
|
|
35
|
+
declare function SelectItemIndicator({ children, className, ...props }: SelectItemIndicatorProps): react.JSX.Element;
|
|
36
|
+
declare function SelectItemText({ className, ...props }: SelectItemTextProps): react.JSX.Element;
|
|
37
|
+
declare function SelectGroup({ className, ...props }: SelectGroupProps): react.JSX.Element;
|
|
38
|
+
declare function SelectGroupLabel({ className, ...props }: SelectGroupLabelProps): react.JSX.Element;
|
|
39
39
|
|
|
40
40
|
export { Select, SelectGroup, SelectGroupLabel, type SelectGroupLabelProps, type SelectGroupProps, SelectIcon, type SelectIconProps, SelectItem, SelectItemIndicator, type SelectItemIndicatorProps, type SelectItemProps, SelectItemText, type SelectItemTextProps, SelectLabel, type SelectLabelProps, SelectList, type SelectListProps, SelectPopup, type SelectPopupProps, SelectPortal, type SelectPortalProps, SelectPositioner, type SelectPositionerProps, type SelectRootProps, SelectTrigger, type SelectTriggerProps, type SelectTriggerVariantProps, SelectValue, type SelectValueProps, selectTriggerVariants };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Separator as Separator$1 } from '@base-ui/react/separator';
|
|
1
|
+
import * as react from 'react';
|
|
3
2
|
import { ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
import { Separator as Separator$1 } from '@base-ui/react/separator';
|
|
4
4
|
|
|
5
5
|
type SeparatorProps = ComponentPropsWithoutRef<typeof Separator$1>;
|
|
6
|
-
declare function Separator({ className, orientation, ...props }: SeparatorProps):
|
|
6
|
+
declare function Separator({ className, orientation, ...props }: SeparatorProps): react.JSX.Element;
|
|
7
7
|
|
|
8
8
|
export { Separator, type SeparatorProps };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import { ComponentPropsWithoutRef } from 'react';
|
|
3
3
|
|
|
4
|
-
declare function Table({ className, ...props }: ComponentPropsWithoutRef<"table">):
|
|
5
|
-
declare function TableHeader({ className, ...props }: ComponentPropsWithoutRef<"thead">):
|
|
6
|
-
declare function TableBody({ className, ...props }: ComponentPropsWithoutRef<"tbody">):
|
|
7
|
-
declare function TableRow({ className, ...props }: ComponentPropsWithoutRef<"tr">):
|
|
8
|
-
declare function TableHead({ className, style, ...props }: ComponentPropsWithoutRef<"th">):
|
|
9
|
-
declare function TableCell({ className, style, ...props }: ComponentPropsWithoutRef<"td">):
|
|
4
|
+
declare function Table({ className, ...props }: ComponentPropsWithoutRef<"table">): react.JSX.Element;
|
|
5
|
+
declare function TableHeader({ className, ...props }: ComponentPropsWithoutRef<"thead">): react.JSX.Element;
|
|
6
|
+
declare function TableBody({ className, ...props }: ComponentPropsWithoutRef<"tbody">): react.JSX.Element;
|
|
7
|
+
declare function TableRow({ className, ...props }: ComponentPropsWithoutRef<"tr">): react.JSX.Element;
|
|
8
|
+
declare function TableHead({ className, style, ...props }: ComponentPropsWithoutRef<"th">): react.JSX.Element;
|
|
9
|
+
declare function TableCell({ className, style, ...props }: ComponentPropsWithoutRef<"td">): react.JSX.Element;
|
|
10
10
|
|
|
11
11
|
export { Table, TableBody, TableCell, TableHead, TableHeader, TableRow };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
4
|
import { Tabs as Tabs$1 } from '@base-ui/react/tabs';
|
|
4
5
|
import { VariantProps } from 'class-variance-authority';
|
|
5
6
|
import { LinkProps } from 'next/link';
|
|
6
|
-
import { ComponentPropsWithoutRef } from 'react';
|
|
7
7
|
|
|
8
8
|
declare const tabsListVariants: (props?: ({
|
|
9
9
|
variant?: "base" | "button" | "underline" | null | undefined;
|
|
@@ -56,11 +56,11 @@ type TabsIndicatorProps = ComponentPropsWithoutRef<typeof Tabs$1.Indicator> & Ta
|
|
|
56
56
|
*/
|
|
57
57
|
indicatorColor?: TabsIndicatorColor;
|
|
58
58
|
};
|
|
59
|
-
declare function Tabs({ children, className, indicatorAnimation, indicatorColor, style, variant, ...props }: TabsProps):
|
|
60
|
-
declare function TabsList({ className, variant, ...props }: TabsListProps):
|
|
61
|
-
declare function TabsTab({ className, variant, ...props }: TabsTabProps):
|
|
62
|
-
declare function TabsPanel({ className, ...props }: TabsPanelProps):
|
|
63
|
-
declare function TabsIndicator({ className, indicatorAnimation, indicatorColor, render, style, variant, ...props }: TabsIndicatorProps):
|
|
59
|
+
declare function Tabs({ children, className, indicatorAnimation, indicatorColor, style, variant, ...props }: TabsProps): react.JSX.Element;
|
|
60
|
+
declare function TabsList({ className, variant, ...props }: TabsListProps): react.JSX.Element;
|
|
61
|
+
declare function TabsTab({ className, variant, ...props }: TabsTabProps): react.JSX.Element;
|
|
62
|
+
declare function TabsPanel({ className, ...props }: TabsPanelProps): react.JSX.Element;
|
|
63
|
+
declare function TabsIndicator({ className, indicatorAnimation, indicatorColor, render, style, variant, ...props }: TabsIndicatorProps): react.JSX.Element;
|
|
64
64
|
type NavigationTabsProps = TabsProps;
|
|
65
65
|
type NavigationTabsListProps = TabsListProps;
|
|
66
66
|
type NavigationTabsIndicatorProps = TabsIndicatorProps;
|
|
@@ -73,10 +73,10 @@ type NavigationTabsLinkProps = Omit<TabsTabProps, "nativeButton" | "render"> & P
|
|
|
73
73
|
*/
|
|
74
74
|
render?: TabsTabProps["render"];
|
|
75
75
|
};
|
|
76
|
-
declare function NavigationTabs(props: NavigationTabsProps):
|
|
77
|
-
declare function NavigationTabsList(props: NavigationTabsListProps):
|
|
78
|
-
declare function NavigationTabsIndicator(props: NavigationTabsIndicatorProps):
|
|
79
|
-
declare function NavigationTabsLink({ active, children, href, rel, render, target, ...props }: NavigationTabsLinkProps):
|
|
80
|
-
declare function NavigationTabsTab(props: NavigationTabsLinkProps):
|
|
76
|
+
declare function NavigationTabs(props: NavigationTabsProps): react.JSX.Element;
|
|
77
|
+
declare function NavigationTabsList(props: NavigationTabsListProps): react.JSX.Element;
|
|
78
|
+
declare function NavigationTabsIndicator(props: NavigationTabsIndicatorProps): react.JSX.Element;
|
|
79
|
+
declare function NavigationTabsLink({ active, children, href, rel, render, target, ...props }: NavigationTabsLinkProps): react.JSX.Element;
|
|
80
|
+
declare function NavigationTabsTab(props: NavigationTabsLinkProps): react.JSX.Element;
|
|
81
81
|
|
|
82
82
|
export { NavigationTabs, NavigationTabsIndicator, type NavigationTabsIndicatorProps, NavigationTabsLink, type NavigationTabsLinkProps, NavigationTabsList, type NavigationTabsListProps, type NavigationTabsProps, NavigationTabsTab, Tabs, TabsIndicator, type TabsIndicatorAnimation, type TabsIndicatorColor, type TabsIndicatorProps, TabsList, type TabsListProps, TabsPanel, type TabsPanelProps, type TabsProps, TabsTab, type TabsTabProps, type TabsVariant, type TabsVariantProps, tabsIndicatorVariants, tabsListVariants, tabsTabVariants };
|
|
@@ -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 tagVariants: (props?: ({
|
|
7
7
|
borderStyle?: "dotted" | "solid" | null | undefined;
|
|
@@ -9,6 +9,6 @@ declare const tagVariants: (props?: ({
|
|
|
9
9
|
variant?: "solid" | "outline" | "soft" | null | undefined;
|
|
10
10
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
11
|
type TagProps = HTMLAttributes<HTMLSpanElement> & VariantProps<typeof tagVariants>;
|
|
12
|
-
declare function Tag({ borderStyle, className, tone, variant, ...props }: TagProps):
|
|
12
|
+
declare function Tag({ borderStyle, className, tone, variant, ...props }: TagProps): react.JSX.Element;
|
|
13
13
|
|
|
14
14
|
export { Tag, type TagProps, tagVariants };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ElementType, ComponentPropsWithoutRef } 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 { ElementType, ComponentPropsWithoutRef } from 'react';
|
|
5
5
|
|
|
6
6
|
declare const textVariants: (props?: ({
|
|
7
7
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | null | undefined;
|
|
8
8
|
variant?: "body" | "label" | "overline" | "headline" | null | undefined;
|
|
9
|
-
weight?: "
|
|
9
|
+
weight?: "bold" | "medium" | "default" | "semibold" | null | undefined;
|
|
10
10
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
11
|
type TextProps<T extends ElementType = "p"> = {
|
|
12
12
|
as?: T;
|
|
13
13
|
className?: string;
|
|
14
14
|
} & VariantProps<typeof textVariants> & Omit<ComponentPropsWithoutRef<T>, "as" | "className" | "color">;
|
|
15
|
-
declare function Text<T extends ElementType = "p">({ as, className, size, variant, weight, ...props }: TextProps<T>):
|
|
15
|
+
declare function Text<T extends ElementType = "p">({ as, className, size, variant, weight, ...props }: TextProps<T>): react.JSX.Element;
|
|
16
16
|
|
|
17
17
|
export { Text, type TextProps, textVariants };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Toast as Toast$1 } from '@base-ui/react/toast';
|
|
1
|
+
import * as react from 'react';
|
|
3
2
|
import { ComponentPropsWithRef } from 'react';
|
|
3
|
+
import { Toast as Toast$1 } from '@base-ui/react/toast';
|
|
4
4
|
|
|
5
5
|
declare const createToastManager: typeof Toast$1.createToastManager;
|
|
6
6
|
declare const useToastManager: typeof Toast$1.useToastManager;
|
|
@@ -13,14 +13,14 @@ type ToastDescriptionProps = ComponentPropsWithRef<typeof Toast$1.Description>;
|
|
|
13
13
|
type ToastCloseProps = ComponentPropsWithRef<typeof Toast$1.Close>;
|
|
14
14
|
type ToastPortalProps = ComponentPropsWithRef<typeof Toast$1.Portal>;
|
|
15
15
|
type ToastPositionerProps = ComponentPropsWithRef<typeof Toast$1.Positioner>;
|
|
16
|
-
declare function ToastProvider(props: ToastProviderProps):
|
|
17
|
-
declare function ToastViewport({ className, ...props }: ToastViewportProps):
|
|
18
|
-
declare function Toast({ className, ...props }: ToastProps):
|
|
19
|
-
declare function ToastContent({ className, ...props }: ToastContentProps):
|
|
20
|
-
declare function ToastTitle({ className, ...props }: ToastTitleProps):
|
|
21
|
-
declare function ToastDescription({ className, ...props }: ToastDescriptionProps):
|
|
22
|
-
declare function ToastClose({ className, ...props }: ToastCloseProps):
|
|
23
|
-
declare function ToastPortal(props: ToastPortalProps):
|
|
24
|
-
declare function ToastPositioner({ className, ...props }: ToastPositionerProps):
|
|
16
|
+
declare function ToastProvider(props: ToastProviderProps): react.JSX.Element;
|
|
17
|
+
declare function ToastViewport({ className, ...props }: ToastViewportProps): react.JSX.Element;
|
|
18
|
+
declare function Toast({ className, ...props }: ToastProps): react.JSX.Element;
|
|
19
|
+
declare function ToastContent({ className, ...props }: ToastContentProps): react.JSX.Element;
|
|
20
|
+
declare function ToastTitle({ className, ...props }: ToastTitleProps): react.JSX.Element;
|
|
21
|
+
declare function ToastDescription({ className, ...props }: ToastDescriptionProps): react.JSX.Element;
|
|
22
|
+
declare function ToastClose({ className, ...props }: ToastCloseProps): react.JSX.Element;
|
|
23
|
+
declare function ToastPortal(props: ToastPortalProps): react.JSX.Element;
|
|
24
|
+
declare function ToastPositioner({ className, ...props }: ToastPositionerProps): react.JSX.Element;
|
|
25
25
|
|
|
26
26
|
export { Toast, ToastClose, type ToastCloseProps, ToastContent, type ToastContentProps, ToastDescription, type ToastDescriptionProps, ToastPortal, type ToastPortalProps, ToastPositioner, type ToastPositionerProps, type ToastProps, ToastProvider, type ToastProviderProps, ToastTitle, type ToastTitleProps, ToastViewport, type ToastViewportProps, createToastManager, useToastManager };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
|
|
1
|
+
import * as react from 'react';
|
|
3
2
|
import { ComponentPropsWithRef } from 'react';
|
|
3
|
+
import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
|
|
4
4
|
|
|
5
5
|
type TooltipProviderProps = ComponentPropsWithRef<typeof Tooltip$1.Provider>;
|
|
6
6
|
type TooltipProps = ComponentPropsWithRef<typeof Tooltip$1.Root>;
|
|
@@ -9,12 +9,12 @@ type TooltipPortalProps = ComponentPropsWithRef<typeof Tooltip$1.Portal>;
|
|
|
9
9
|
type TooltipPositionerProps = ComponentPropsWithRef<typeof Tooltip$1.Positioner>;
|
|
10
10
|
type TooltipPopupProps = ComponentPropsWithRef<typeof Tooltip$1.Popup>;
|
|
11
11
|
type TooltipArrowProps = ComponentPropsWithRef<typeof Tooltip$1.Arrow>;
|
|
12
|
-
declare function TooltipProvider(props: TooltipProviderProps):
|
|
13
|
-
declare function Tooltip(props: TooltipProps):
|
|
14
|
-
declare function TooltipTrigger({ className, ...props }: TooltipTriggerProps):
|
|
15
|
-
declare function TooltipPortal(props: TooltipPortalProps):
|
|
16
|
-
declare function TooltipPositioner({ className, sideOffset, ...props }: TooltipPositionerProps):
|
|
17
|
-
declare function TooltipPopup({ className, ...props }: TooltipPopupProps):
|
|
18
|
-
declare function TooltipArrow({ className, ...props }: TooltipArrowProps):
|
|
12
|
+
declare function TooltipProvider(props: TooltipProviderProps): react.JSX.Element;
|
|
13
|
+
declare function Tooltip(props: TooltipProps): react.JSX.Element;
|
|
14
|
+
declare function TooltipTrigger({ className, ...props }: TooltipTriggerProps): react.JSX.Element;
|
|
15
|
+
declare function TooltipPortal(props: TooltipPortalProps): react.JSX.Element;
|
|
16
|
+
declare function TooltipPositioner({ className, sideOffset, ...props }: TooltipPositionerProps): react.JSX.Element;
|
|
17
|
+
declare function TooltipPopup({ className, ...props }: TooltipPopupProps): react.JSX.Element;
|
|
18
|
+
declare function TooltipArrow({ className, ...props }: TooltipArrowProps): react.JSX.Element;
|
|
19
19
|
|
|
20
20
|
export { Tooltip, TooltipArrow, type TooltipArrowProps, TooltipPopup, type TooltipPopupProps, TooltipPortal, type TooltipPortalProps, TooltipPositioner, type TooltipPositionerProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, type TooltipTriggerProps };
|
|
@@ -226,7 +226,7 @@ declare const kernelDefaultsRegistry: {
|
|
|
226
226
|
readonly category: "block";
|
|
227
227
|
readonly name: "Sidebar";
|
|
228
228
|
readonly status: "available";
|
|
229
|
-
readonly description: "
|
|
229
|
+
readonly description: "Navigation hierarchy with stable layout width, scroll area, focused views, and collapsible groups. Uses the copied SidebarNode primitive for node markup.";
|
|
230
230
|
readonly kernelImport: "@publish.os/nextjs/kernel/components/blocks/sidebar";
|
|
231
231
|
readonly projectPath: "publish.os/components/blocks/sidebar.tsx";
|
|
232
232
|
readonly contract: "SidebarProps";
|
|
@@ -249,7 +249,7 @@ declare const kernelDefaultsRegistry: {
|
|
|
249
249
|
readonly category: "block";
|
|
250
250
|
readonly name: "NavBreadcrumb";
|
|
251
251
|
readonly status: "available";
|
|
252
|
-
readonly description: "Breadcrumb trail derived from the
|
|
252
|
+
readonly description: "Breadcrumb trail derived from the resolved navigation hierarchy.";
|
|
253
253
|
readonly kernelImport: "@publish.os/nextjs/kernel/components/blocks/nav-breadcrumb";
|
|
254
254
|
readonly projectPath: "publish.os/components/blocks/nav-breadcrumb.tsx";
|
|
255
255
|
}, {
|
|
@@ -240,7 +240,7 @@ var kernelDefaultsRegistry = {
|
|
|
240
240
|
category: "block",
|
|
241
241
|
name: "Sidebar",
|
|
242
242
|
status: "available",
|
|
243
|
-
description: "
|
|
243
|
+
description: "Navigation hierarchy with stable layout width, scroll area, focused views, and collapsible groups. Uses the copied SidebarNode primitive for node markup.",
|
|
244
244
|
kernelImport: "@publish.os/nextjs/kernel/components/blocks/sidebar",
|
|
245
245
|
projectPath: "publish.os/components/blocks/sidebar.tsx",
|
|
246
246
|
contract: "SidebarProps"
|
|
@@ -266,7 +266,7 @@ var kernelDefaultsRegistry = {
|
|
|
266
266
|
category: "block",
|
|
267
267
|
name: "NavBreadcrumb",
|
|
268
268
|
status: "available",
|
|
269
|
-
description: "Breadcrumb trail derived from the
|
|
269
|
+
description: "Breadcrumb trail derived from the resolved navigation hierarchy.",
|
|
270
270
|
kernelImport: "@publish.os/nextjs/kernel/components/blocks/nav-breadcrumb",
|
|
271
271
|
projectPath: "publish.os/components/blocks/nav-breadcrumb.tsx"
|
|
272
272
|
},
|
|
@@ -54,7 +54,7 @@ function normalizePublicPath(pathname) {
|
|
|
54
54
|
}
|
|
55
55
|
if (decoded === "." || decoded === ".." || /[/\\]/u.test(decoded) || /%[\da-f]{2}/iu.test(decoded) || UNSAFE_PATH_CHARACTERS.test(decoded))
|
|
56
56
|
return;
|
|
57
|
-
segments.push(decoded);
|
|
57
|
+
segments.push(decoded.normalize("NFC"));
|
|
58
58
|
}
|
|
59
59
|
return `/${segments.join("/")}`;
|
|
60
60
|
}
|
|
@@ -228,20 +228,24 @@ function debugMarkdownResponse(details) {
|
|
|
228
228
|
log.debug("[agent-route]", "md-response", details);
|
|
229
229
|
}
|
|
230
230
|
function normalizeArtifactPath(parts) {
|
|
231
|
-
return parts?.length ? parts.some((part) => part === ".." || part.includes("\0")) ? null : `/${parts.join("/")}`.replace(/\/+/g, "/") : "/index.md";
|
|
231
|
+
return parts?.length ? parts.some((part) => part === ".." || part.includes("\0")) ? null : `/${parts.join("/")}`.replace(/\/+/g, "/").normalize("NFC") : "/index.md";
|
|
232
232
|
}
|
|
233
233
|
function findArtifactKey(artifacts, artifactPath) {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
if (artifacts[suffixedPath]) return suffixedPath;
|
|
234
|
+
let suffixedPath = `${artifactPath}.md`;
|
|
235
|
+
return artifacts[suffixedPath] ? suffixedPath : artifacts[artifactPath] ? artifactPath : void 0;
|
|
237
236
|
}
|
|
238
237
|
function findArtifact(artifacts, artifactPath) {
|
|
239
|
-
return artifacts[artifactPath] ?? artifacts[
|
|
238
|
+
return artifacts[artifactPath] ?? artifacts[`${artifactPath}.md`];
|
|
240
239
|
}
|
|
241
240
|
function markdownHeaders(artifact) {
|
|
241
|
+
let robots = [
|
|
242
|
+
artifact.robots?.index === void 0 ? void 0 : artifact.robots.index ? "index" : "noindex",
|
|
243
|
+
artifact.robots?.follow === void 0 ? void 0 : artifact.robots.follow ? "follow" : "nofollow"
|
|
244
|
+
].filter(Boolean).join(", ");
|
|
242
245
|
return {
|
|
243
246
|
headers: {
|
|
244
|
-
link: `<${artifact.markdownPath}>; rel="alternate"; type="text/markdown", </llms.txt>; rel="llms-txt"; type="text/plain"
|
|
247
|
+
link: `<${new URL(artifact.markdownPath, "https://publish.invalid").pathname}>; rel="alternate"; type="text/markdown", </llms.txt>; rel="llms-txt"; type="text/plain"`,
|
|
248
|
+
...robots ? { "x-robots-tag": robots } : {}
|
|
245
249
|
},
|
|
246
250
|
contentType: "text/markdown; charset=utf-8"
|
|
247
251
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactElement, ReactNode } from 'react';
|
|
3
|
-
import { M as ManifestLike, L as LayoutProps } from '../../../types-
|
|
3
|
+
import { M as ManifestLike, L as LayoutProps } from '../../../types-BbqmOzLC.js';
|
|
4
4
|
|
|
5
5
|
type LayoutComponent = (props: LayoutProps) => ReactElement | Promise<ReactElement>;
|
|
6
6
|
type GroupLayoutConfig = {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { M as ManifestLike } from '../../../types-BbqmOzLC.js';
|
|
2
2
|
|
|
3
3
|
type FeedScope = "site" | "group" | "self";
|
|
4
4
|
type FeedRouteOptions = {
|
|
5
5
|
scope?: FeedScope;
|
|
6
6
|
group?: string;
|
|
7
7
|
limit?: number;
|
|
8
|
-
status?: PageStatus[];
|
|
9
8
|
};
|
|
10
9
|
type PrecomputedFeedOutput = {
|
|
11
10
|
body: string;
|
|
@@ -2,10 +2,22 @@
|
|
|
2
2
|
import { tags } from "@publish.os/nextjs/cache/tags";
|
|
3
3
|
import { cacheLife, cacheTag } from "next/cache";
|
|
4
4
|
|
|
5
|
+
// src/lib/runtime/metadata/authored-date.ts
|
|
6
|
+
function authoredDate(value) {
|
|
7
|
+
if (typeof value != "string" || !/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2}))?$/.test(
|
|
8
|
+
value
|
|
9
|
+
))
|
|
10
|
+
return;
|
|
11
|
+
let day = value.slice(0, 10), midnight = /* @__PURE__ */ new Date(`${day}T00:00:00.000Z`);
|
|
12
|
+
if (!(!Number.isFinite(midnight.getTime()) || midnight.toISOString().slice(0, 10) !== day))
|
|
13
|
+
return Number.isFinite(Date.parse(value)) ? value : void 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
5
16
|
// src/lib/runtime/metadata/canonical-url.ts
|
|
6
17
|
function canonicalUrl(manifest, path, group) {
|
|
7
18
|
let origin = (group && manifest.groups[group]?.origin) ?? manifest.site.origin;
|
|
8
|
-
if (!origin)
|
|
19
|
+
if (!origin)
|
|
20
|
+
return /^[a-z][a-z\d+.-]*:/i.test(path) ? path : new URL(path, "https://publish.invalid").pathname;
|
|
9
21
|
try {
|
|
10
22
|
return new URL(path, `${origin}/`).toString();
|
|
11
23
|
} catch {
|
|
@@ -14,21 +26,10 @@ function canonicalUrl(manifest, path, group) {
|
|
|
14
26
|
}
|
|
15
27
|
|
|
16
28
|
// src/lib/runtime/metadata/feed-serialization.ts
|
|
29
|
+
var siteBuildTime = process.env.PUBLISHOS_SITE_BUILD_TIME ?? (/* @__PURE__ */ new Date()).toISOString();
|
|
17
30
|
function xmlEscape(value) {
|
|
18
31
|
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
19
32
|
}
|
|
20
|
-
function latestDate(pages) {
|
|
21
|
-
let timestamp = Math.max(
|
|
22
|
-
0,
|
|
23
|
-
...pages.map((page) => {
|
|
24
|
-
let date = page.publishedAt ?? page.updatedAt;
|
|
25
|
-
if (!date) return -1 / 0;
|
|
26
|
-
let parsed = Date.parse(date);
|
|
27
|
-
return Number.isNaN(parsed) ? -1 / 0 : parsed;
|
|
28
|
-
})
|
|
29
|
-
);
|
|
30
|
-
return new Date(timestamp).toISOString();
|
|
31
|
-
}
|
|
32
33
|
function serializeRssFeed(input) {
|
|
33
34
|
let description = input.description ?? input.title, items = input.pages.map((page) => {
|
|
34
35
|
let publishedAt = page.publishedAt, pubDate = publishedAt ? `
|
|
@@ -53,8 +54,10 @@ ${items}
|
|
|
53
54
|
`;
|
|
54
55
|
}
|
|
55
56
|
function serializeAtomFeed(input) {
|
|
56
|
-
let
|
|
57
|
-
|
|
57
|
+
let buildTime = input.buildTime ?? siteBuildTime, effectiveDates = input.pages.map(
|
|
58
|
+
(page) => new Date(page.updatedAt ?? page.publishedAt ?? buildTime).toISOString()
|
|
59
|
+
), entries = input.pages.map((page, index) => {
|
|
60
|
+
let updated = effectiveDates[index] ?? buildTime, summary = page.description ? `
|
|
58
61
|
<summary>${xmlEscape(page.description)}</summary>` : "";
|
|
59
62
|
return ` <entry>
|
|
60
63
|
<title>${xmlEscape(page.title)}</title>
|
|
@@ -63,12 +66,15 @@ function serializeAtomFeed(input) {
|
|
|
63
66
|
<updated>${xmlEscape(updated)}</updated>${summary}
|
|
64
67
|
</entry>`;
|
|
65
68
|
}).join(`
|
|
66
|
-
`)
|
|
69
|
+
`), latest = effectiveDates.length ? new Date(
|
|
70
|
+
Math.max(...effectiveDates.map((date) => Date.parse(date)))
|
|
71
|
+
).toISOString() : buildTime;
|
|
67
72
|
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
68
73
|
<feed xmlns="http://www.w3.org/2005/Atom">
|
|
69
74
|
<title>${xmlEscape(input.title)}</title>
|
|
70
75
|
<id>${xmlEscape(input.homeUrl)}</id>
|
|
71
|
-
<
|
|
76
|
+
<author><name>${xmlEscape(input.author ?? input.title)}</name></author>
|
|
77
|
+
<updated>${xmlEscape(latest)}</updated>
|
|
72
78
|
${entries}
|
|
73
79
|
</feed>
|
|
74
80
|
`;
|
|
@@ -86,8 +92,8 @@ function serializeJsonFeed(input) {
|
|
|
86
92
|
title: page.title,
|
|
87
93
|
summary: page.description,
|
|
88
94
|
content_text: page.body,
|
|
89
|
-
date_published: page.publishedAt,
|
|
90
|
-
date_modified: page.updatedAt,
|
|
95
|
+
date_published: page.publishedAt ? new Date(page.publishedAt).toISOString() : void 0,
|
|
96
|
+
date_modified: page.updatedAt ? new Date(page.updatedAt).toISOString() : void 0,
|
|
91
97
|
tags: page.tags
|
|
92
98
|
}))
|
|
93
99
|
},
|
|
@@ -119,28 +125,27 @@ function createCachedTextResponse(options) {
|
|
|
119
125
|
|
|
120
126
|
// src/route-metadata-feed.ts
|
|
121
127
|
function pageTimestamp(page) {
|
|
122
|
-
let value =
|
|
128
|
+
let value = authoredDate(page.frontmatter.publishedAt) ?? authoredDate(page.frontmatter.updatedAt);
|
|
123
129
|
return value ? Date.parse(value) : -1 / 0;
|
|
124
130
|
}
|
|
125
|
-
function validDate(value) {
|
|
126
|
-
return value && !Number.isNaN(Date.parse(value)) ? value : void 0;
|
|
127
|
-
}
|
|
128
131
|
function pageInScope(page, options) {
|
|
129
132
|
return options.scope === "site" || !options.group ? !0 : options.scope === "self" ? page.group === options.group : page.group === options.group || page.group.startsWith(`${options.group}/`);
|
|
130
133
|
}
|
|
131
134
|
function feedPages(manifest, options) {
|
|
132
|
-
let
|
|
135
|
+
let pages = manifest.pages.filter((page) => page.frontmatter.status === "published").filter((page) => pageInScope(page, options)).sort((a, b) => pageTimestamp(b) - pageTimestamp(a));
|
|
133
136
|
return options.limit ? pages.slice(0, options.limit) : pages;
|
|
134
137
|
}
|
|
135
138
|
function feedInput(manifest, options = {}) {
|
|
136
139
|
let serializedPages = feedPages(manifest, options).map((page) => ({
|
|
137
140
|
url: canonicalUrl(manifest, page.path, page.group),
|
|
138
|
-
title: page.title,
|
|
139
|
-
publishedAt:
|
|
140
|
-
updatedAt:
|
|
141
|
-
description: page.description,
|
|
141
|
+
title: page.frontmatter.title,
|
|
142
|
+
publishedAt: authoredDate(page.frontmatter.publishedAt),
|
|
143
|
+
updatedAt: authoredDate(page.frontmatter.updatedAt),
|
|
144
|
+
description: page.frontmatter.description,
|
|
142
145
|
body: page.body,
|
|
143
|
-
tags: page.tags
|
|
146
|
+
tags: Array.isArray(page.frontmatter.tags) ? page.frontmatter.tags.filter(
|
|
147
|
+
(tag) => typeof tag == "string"
|
|
148
|
+
) : []
|
|
144
149
|
})), group = options.group, homePath = group ? manifest.groups[group]?.path ?? "/" : "/";
|
|
145
150
|
return {
|
|
146
151
|
// Public route factories use the site name; generated group feeds use the group title.
|
|
@@ -1,34 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import { M as ManifestLike } from '../../../types-J2w_puPF.js';
|
|
3
|
-
import '../not-found.js';
|
|
4
|
-
|
|
5
|
-
type LlmsRouteOptions = {
|
|
6
|
-
scope?: "site" | "group" | "self";
|
|
7
|
-
group?: string;
|
|
8
|
-
limit?: number;
|
|
9
|
-
includeDescriptions?: boolean;
|
|
10
|
-
links?: Array<{
|
|
11
|
-
title: string;
|
|
12
|
-
path: string;
|
|
13
|
-
group?: string;
|
|
14
|
-
}>;
|
|
15
|
-
otherGroupLinks?: Array<{
|
|
16
|
-
title: string;
|
|
17
|
-
path: string;
|
|
18
|
-
group?: string;
|
|
19
|
-
}>;
|
|
20
|
-
};
|
|
21
|
-
type LlmsFullRouteOptions = {
|
|
22
|
-
maxBytes?: number;
|
|
23
|
-
indexPath?: string | false;
|
|
24
|
-
sitemapPath?: string | false;
|
|
25
|
-
};
|
|
26
|
-
type PrecomputedLlmsTxtOutput = {
|
|
1
|
+
type LlmsTxtOutput = {
|
|
27
2
|
body: string;
|
|
28
3
|
};
|
|
29
|
-
declare function createLlmsTxtRoute(
|
|
30
|
-
declare function createPrecomputedLlmsTxtRoute(output: PrecomputedLlmsTxtOutput): () => Response;
|
|
31
|
-
declare function llmsFullTxtResponse(manifest: ManifestLike, artifacts: MarkdownRouteArtifacts, options?: LlmsFullRouteOptions): Promise<Response>;
|
|
32
|
-
declare function createLlmsFullTxtRoute(manifest: ManifestLike, artifacts: MarkdownRouteArtifacts, options?: LlmsFullRouteOptions): () => Promise<Response>;
|
|
4
|
+
declare function createLlmsTxtRoute(output: LlmsTxtOutput): () => Response;
|
|
33
5
|
|
|
34
|
-
export { type
|
|
6
|
+
export { type LlmsTxtOutput, createLlmsTxtRoute };
|