@publish.os/nextjs 0.0.1-alpha.4 → 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.
- package/README.md +1 -1
- package/dist/config/createNextConfig.js +3 -3
- package/dist/index.js +7 -5
- package/dist/kernel/components/blocks/color-palette.js +35 -4
- package/dist/kernel/components/blocks/design-system-preview.js +18 -17
- package/dist/kernel/components/blocks/link-playground.js +3 -3
- package/dist/kernel/components/blocks/logo-block.js +1 -1
- package/dist/kernel/components/blocks/nav-breadcrumb.js +2 -12
- package/dist/kernel/components/blocks/navbar.js +1 -1
- package/dist/kernel/components/blocks/navigation-progress-playground.js +2 -2
- package/dist/kernel/components/mdx/components/image.js +1 -1
- package/dist/kernel/components/ui/breadcrumb-trail.d.ts +3 -1
- package/dist/kernel/components/ui/breadcrumb-trail.js +1 -0
- package/dist/kernel/components/ui/breadcrumb.d.ts +1 -5
- package/dist/kernel/components/ui/breadcrumb.js +1 -16
- package/dist/kernel/components/ui/button-group.d.ts +2 -2
- package/dist/kernel/components/ui/button-group.js +2 -3
- package/dist/kernel/components/ui/button.d.ts +3 -4
- package/dist/kernel/components/ui/button.js +4 -12
- package/dist/kernel/components/ui/card.d.ts +1 -1
- package/dist/kernel/components/ui/menu.js +5 -5
- package/dist/kernel/components/ui/navigation-menu.js +2 -2
- package/dist/kernel/components/ui/popover.js +5 -11
- package/dist/kernel/components/ui/select.js +5 -5
- package/dist/kernel/components/ui/tag.d.ts +14 -0
- package/dist/kernel/components/ui/tag.js +76 -0
- package/dist/kernel/components/ui/text.d.ts +1 -1
- package/dist/kernel/components/ui/text.js +109 -106
- package/dist/kernel/components/ui/theme-toggle.js +1 -1
- package/dist/kernel/components/ui/tooltip.js +2 -2
- package/dist/kernel/defaults.registry.d.ts +63 -72
- package/dist/kernel/defaults.registry.js +62 -70
- package/dist/kernel/routes/agent/markdown.js +2 -2
- package/dist/kernel/routes/metadata/feed.js +2 -2
- package/dist/kernel/routes/metadata/llms.js +4 -2
- package/dist/kernel/routes/metadata/og-image.d.ts +1 -1
- package/dist/kernel/routes/metadata/robots.js +2 -2
- package/dist/kernel/routes/metadata/sitemap.js +2 -2
- package/dist/utils/cn.d.ts +1 -1
- package/package.json +4 -9
- package/release/package.json +4 -3
- package/release/release.json +5 -5
- package/release/{pnpm-lock.yaml → runtime-pnpm-lock.yaml} +348 -224
- package/dist/cache/tags.cjs +0 -79
- package/dist/cache/tags.d.cts +0 -13
- package/dist/config/createNextConfig.cjs +0 -52
- package/dist/config/createNextConfig.d.cts +0 -8
- package/dist/config.cjs +0 -78
- package/dist/config.d.cts +0 -101
- package/dist/config.d.ts +0 -101
- package/dist/config.js +0 -48
- package/dist/index.cjs +0 -1266
- package/dist/index.d.cts +0 -18
- package/dist/kernel/components/blocks/AgentActions.cjs +0 -425
- package/dist/kernel/components/blocks/AgentActions.d.cts +0 -52
- package/dist/kernel/components/blocks/animated-icon-swap.cjs +0 -101
- package/dist/kernel/components/blocks/animated-icon-swap.d.cts +0 -16
- package/dist/kernel/components/blocks/color-palette.cjs +0 -413
- package/dist/kernel/components/blocks/color-palette.d.cts +0 -7
- package/dist/kernel/components/blocks/design-system-preview.cjs +0 -592
- package/dist/kernel/components/blocks/design-system-preview.d.cts +0 -29
- package/dist/kernel/components/blocks/link-playground.cjs +0 -816
- package/dist/kernel/components/blocks/link-playground.d.cts +0 -5
- package/dist/kernel/components/blocks/logo-block.cjs +0 -156
- package/dist/kernel/components/blocks/logo-block.d.cts +0 -21
- package/dist/kernel/components/blocks/nav-breadcrumb.cjs +0 -122
- package/dist/kernel/components/blocks/nav-breadcrumb.d.cts +0 -11
- package/dist/kernel/components/blocks/navbar.cjs +0 -154
- package/dist/kernel/components/blocks/navbar.d.cts +0 -16
- package/dist/kernel/components/blocks/navigation-progress-playground.cjs +0 -735
- package/dist/kernel/components/blocks/navigation-progress-playground.d.cts +0 -5
- package/dist/kernel/components/blocks/navigation-progress.cjs +0 -270
- package/dist/kernel/components/blocks/navigation-progress.d.cts +0 -16
- package/dist/kernel/components/blocks/next-prev.cjs +0 -142
- package/dist/kernel/components/blocks/next-prev.d.cts +0 -11
- package/dist/kernel/components/blocks/page-list.cjs +0 -59
- package/dist/kernel/components/blocks/page-list.d.cts +0 -11
- package/dist/kernel/components/blocks/search.cjs +0 -717
- package/dist/kernel/components/blocks/search.d.cts +0 -77
- package/dist/kernel/components/blocks/sidebar-node.cjs +0 -309
- package/dist/kernel/components/blocks/sidebar-node.d.cts +0 -8
- package/dist/kernel/components/blocks/sidebar.cjs +0 -317
- package/dist/kernel/components/blocks/sidebar.d.cts +0 -33
- package/dist/kernel/components/blocks/theme-toggle.cjs +0 -31
- package/dist/kernel/components/blocks/theme-toggle.d.cts +0 -6
- package/dist/kernel/components/blocks/toc.cjs +0 -356
- package/dist/kernel/components/blocks/toc.d.cts +0 -10
- package/dist/kernel/components/mdx/components/blockquote.cjs +0 -66
- package/dist/kernel/components/mdx/components/blockquote.d.cts +0 -6
- package/dist/kernel/components/mdx/components/callout.cjs +0 -137
- package/dist/kernel/components/mdx/components/callout.d.cts +0 -18
- package/dist/kernel/components/mdx/components/code-block.cjs +0 -39
- package/dist/kernel/components/mdx/components/code-block.d.cts +0 -9
- package/dist/kernel/components/mdx/components/figure-caption.cjs +0 -63
- package/dist/kernel/components/mdx/components/figure-caption.d.cts +0 -6
- package/dist/kernel/components/mdx/components/figure.cjs +0 -78
- package/dist/kernel/components/mdx/components/figure.d.cts +0 -10
- package/dist/kernel/components/mdx/components/footnotes.cjs +0 -66
- package/dist/kernel/components/mdx/components/footnotes.d.cts +0 -6
- package/dist/kernel/components/mdx/components/heading-copy-link.cjs +0 -108
- package/dist/kernel/components/mdx/components/heading-copy-link.d.cts +0 -23
- package/dist/kernel/components/mdx/components/heading.cjs +0 -166
- package/dist/kernel/components/mdx/components/heading.d.cts +0 -8
- package/dist/kernel/components/mdx/components/hr.cjs +0 -34
- package/dist/kernel/components/mdx/components/hr.d.cts +0 -9
- package/dist/kernel/components/mdx/components/image-zoom.cjs +0 -49
- package/dist/kernel/components/mdx/components/image-zoom.d.cts +0 -10
- package/dist/kernel/components/mdx/components/image.cjs +0 -192
- package/dist/kernel/components/mdx/components/image.d.cts +0 -21
- package/dist/kernel/components/mdx/components/inline-code.cjs +0 -66
- package/dist/kernel/components/mdx/components/inline-code.d.cts +0 -6
- package/dist/kernel/components/mdx/components/kbd.cjs +0 -34
- package/dist/kernel/components/mdx/components/kbd.d.cts +0 -10
- package/dist/kernel/components/mdx/components/link.cjs +0 -49
- package/dist/kernel/components/mdx/components/link.d.cts +0 -11
- package/dist/kernel/components/mdx/components/paragraph.cjs +0 -87
- package/dist/kernel/components/mdx/components/paragraph.d.cts +0 -5
- package/dist/kernel/components/mdx/components/pre.cjs +0 -66
- package/dist/kernel/components/mdx/components/pre.d.cts +0 -6
- package/dist/kernel/components/mdx/components/strikethrough.cjs +0 -63
- package/dist/kernel/components/mdx/components/strikethrough.d.cts +0 -6
- package/dist/kernel/components/mdx/components/table.cjs +0 -59
- package/dist/kernel/components/mdx/components/table.d.cts +0 -10
- package/dist/kernel/components/mdx/components/task-list.cjs +0 -88
- package/dist/kernel/components/mdx/components/task-list.d.cts +0 -8
- package/dist/kernel/components/mdx/components/video-player.cjs +0 -173
- package/dist/kernel/components/mdx/components/video-player.d.cts +0 -18
- package/dist/kernel/components/mdx/components/video.cjs +0 -185
- package/dist/kernel/components/mdx/components/video.d.cts +0 -15
- package/dist/kernel/components/mdx/error-boundary.cjs +0 -62
- package/dist/kernel/components/mdx/error-boundary.d.cts +0 -8
- package/dist/kernel/components/mdx/error-fallback.cjs +0 -58
- package/dist/kernel/components/mdx/error-fallback.d.cts +0 -9
- package/dist/kernel/components/mdx/mdx.cjs +0 -141
- package/dist/kernel/components/mdx/mdx.d.cts +0 -22
- package/dist/kernel/components/mdx/rehype-heading-ids.cjs +0 -113
- package/dist/kernel/components/mdx/rehype-heading-ids.d.cts +0 -10
- package/dist/kernel/components/mdx/types.cjs +0 -18
- package/dist/kernel/components/mdx/types.d.cts +0 -18
- package/dist/kernel/components/ui/accordion.cjs +0 -104
- package/dist/kernel/components/ui/accordion.d.cts +0 -16
- package/dist/kernel/components/ui/badge.cjs +0 -75
- package/dist/kernel/components/ui/badge.d.cts +0 -12
- package/dist/kernel/components/ui/badge.d.ts +0 -12
- package/dist/kernel/components/ui/badge.js +0 -47
- package/dist/kernel/components/ui/breadcrumb-trail.cjs +0 -238
- package/dist/kernel/components/ui/breadcrumb-trail.d.cts +0 -13
- package/dist/kernel/components/ui/breadcrumb.cjs +0 -399
- package/dist/kernel/components/ui/breadcrumb.d.cts +0 -52
- package/dist/kernel/components/ui/button-group.cjs +0 -144
- package/dist/kernel/components/ui/button-group.d.cts +0 -19
- package/dist/kernel/components/ui/button.cjs +0 -147
- package/dist/kernel/components/ui/button.d.cts +0 -23
- package/dist/kernel/components/ui/card.cjs +0 -133
- package/dist/kernel/components/ui/card.d.cts +0 -17
- package/dist/kernel/components/ui/dialog.cjs +0 -149
- package/dist/kernel/components/ui/dialog.d.cts +0 -22
- package/dist/kernel/components/ui/drawer.cjs +0 -163
- package/dist/kernel/components/ui/drawer.d.cts +0 -24
- package/dist/kernel/components/ui/input.cjs +0 -96
- package/dist/kernel/components/ui/input.d.cts +0 -18
- package/dist/kernel/components/ui/kbd.cjs +0 -105
- package/dist/kernel/components/ui/kbd.d.cts +0 -13
- package/dist/kernel/components/ui/link.cjs +0 -253
- package/dist/kernel/components/ui/link.d.cts +0 -31
- package/dist/kernel/components/ui/menu.cjs +0 -301
- package/dist/kernel/components/ui/menu.d.cts +0 -70
- package/dist/kernel/components/ui/meta-key.cjs +0 -34
- package/dist/kernel/components/ui/meta-key.d.cts +0 -12
- package/dist/kernel/components/ui/navigation-menu.cjs +0 -253
- package/dist/kernel/components/ui/navigation-menu.d.cts +0 -47
- package/dist/kernel/components/ui/popover.cjs +0 -168
- package/dist/kernel/components/ui/popover.d.cts +0 -24
- package/dist/kernel/components/ui/progress.cjs +0 -112
- package/dist/kernel/components/ui/progress.d.cts +0 -16
- package/dist/kernel/components/ui/scroll-area.cjs +0 -413
- package/dist/kernel/components/ui/scroll-area.d.cts +0 -58
- package/dist/kernel/components/ui/select.cjs +0 -244
- package/dist/kernel/components/ui/select.d.cts +0 -40
- package/dist/kernel/components/ui/separator.cjs +0 -73
- package/dist/kernel/components/ui/separator.d.cts +0 -8
- package/dist/kernel/components/ui/table.cjs +0 -131
- package/dist/kernel/components/ui/table.d.cts +0 -11
- package/dist/kernel/components/ui/tabs.cjs +0 -450
- package/dist/kernel/components/ui/tabs.d.cts +0 -82
- package/dist/kernel/components/ui/text.cjs +0 -184
- package/dist/kernel/components/ui/text.d.cts +0 -17
- package/dist/kernel/components/ui/theme-toggle.cjs +0 -108
- package/dist/kernel/components/ui/theme-toggle.d.cts +0 -10
- package/dist/kernel/components/ui/toast.cjs +0 -154
- package/dist/kernel/components/ui/toast.d.cts +0 -26
- package/dist/kernel/components/ui/tooltip.cjs +0 -127
- package/dist/kernel/components/ui/tooltip.d.cts +0 -20
- package/dist/kernel/defaults.registry.cjs +0 -541
- package/dist/kernel/defaults.registry.d.cts +0 -469
- package/dist/kernel/routes/agent/markdown.cjs +0 -202
- package/dist/kernel/routes/agent/markdown.d.cts +0 -58
- package/dist/kernel/routes/layouts/group.cjs +0 -181
- package/dist/kernel/routes/layouts/group.d.cts +0 -20
- package/dist/kernel/routes/metadata/feed.cjs +0 -293
- package/dist/kernel/routes/metadata/feed.d.cts +0 -20
- package/dist/kernel/routes/metadata/llms.cjs +0 -239
- package/dist/kernel/routes/metadata/llms.d.cts +0 -26
- package/dist/kernel/routes/metadata/og-image.cjs +0 -630
- package/dist/kernel/routes/metadata/og-image.d.cts +0 -62
- package/dist/kernel/routes/metadata/robots.cjs +0 -148
- package/dist/kernel/routes/metadata/robots.d.cts +0 -6
- package/dist/kernel/routes/metadata/sitemap.cjs +0 -192
- package/dist/kernel/routes/metadata/sitemap.d.cts +0 -8
- package/dist/kernel/routes/pages/group.cjs +0 -263
- package/dist/kernel/routes/pages/group.d.cts +0 -17
- package/dist/kernel/routes/pages/leaf.cjs +0 -421
- package/dist/kernel/routes/pages/leaf.d.cts +0 -36
- package/dist/kernel/routes/pages/root.cjs +0 -229
- package/dist/kernel/routes/pages/root.d.cts +0 -16
- package/dist/keyboard-shortcuts.cjs +0 -345
- package/dist/keyboard-shortcuts.d.cts +0 -34
- package/dist/resolvers/manifest-resolver.cjs +0 -111
- package/dist/resolvers/manifest-resolver.d.cts +0 -13
- package/dist/search.cjs +0 -411
- package/dist/search.d.cts +0 -20
- package/dist/types.cjs +0 -30
- package/dist/types.d.cts +0 -269
- package/dist/utils/cn.cjs +0 -49
- package/dist/utils/cn.d.cts +0 -15
- package/dist/utils/heading-ids.cjs +0 -119
- package/dist/utils/heading-ids.d.cts +0 -15
- package/dist/utils/pretty-date.cjs +0 -55
- package/dist/utils/pretty-date.d.cts +0 -6
package/dist/types.d.cts
DELETED
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
|
|
3
|
-
type SearchInput = {
|
|
4
|
-
filters?: {
|
|
5
|
-
author?: string;
|
|
6
|
-
group?: string;
|
|
7
|
-
tag?: string;
|
|
8
|
-
};
|
|
9
|
-
limit?: number;
|
|
10
|
-
offset?: number;
|
|
11
|
-
q: string;
|
|
12
|
-
};
|
|
13
|
-
type SearchStatus = "idle" | "building" | "stale" | "ready" | "error";
|
|
14
|
-
type SearchSubResult = {
|
|
15
|
-
excerpt: string;
|
|
16
|
-
plainExcerpt: string;
|
|
17
|
-
title: string;
|
|
18
|
-
url: string;
|
|
19
|
-
};
|
|
20
|
-
type SearchResult = {
|
|
21
|
-
excerpt: string;
|
|
22
|
-
id: string;
|
|
23
|
-
meta: {
|
|
24
|
-
author?: string;
|
|
25
|
-
description?: string;
|
|
26
|
-
group?: string;
|
|
27
|
-
image?: string;
|
|
28
|
-
nodeId?: string;
|
|
29
|
-
path?: string;
|
|
30
|
-
publishedAt?: string;
|
|
31
|
-
section?: string;
|
|
32
|
-
tags?: string;
|
|
33
|
-
title?: string;
|
|
34
|
-
updatedAt?: string;
|
|
35
|
-
};
|
|
36
|
-
plainExcerpt: string;
|
|
37
|
-
score?: number;
|
|
38
|
-
subResults: SearchSubResult[];
|
|
39
|
-
title: string;
|
|
40
|
-
url: string;
|
|
41
|
-
};
|
|
42
|
-
type SearchOutput = {
|
|
43
|
-
items: SearchResult[];
|
|
44
|
-
message?: string;
|
|
45
|
-
nextOffset: number | null;
|
|
46
|
-
status: SearchStatus;
|
|
47
|
-
total: number;
|
|
48
|
-
};
|
|
49
|
-
type SearchBlockVariant = "desktop" | "mobile";
|
|
50
|
-
type SearchBlockState = {
|
|
51
|
-
displayResults: SearchResult[];
|
|
52
|
-
isTyping: boolean;
|
|
53
|
-
loading: boolean;
|
|
54
|
-
message?: string;
|
|
55
|
-
open: boolean;
|
|
56
|
-
query: string;
|
|
57
|
-
selectedValue: string;
|
|
58
|
-
status: SearchStatus;
|
|
59
|
-
total: number;
|
|
60
|
-
};
|
|
61
|
-
type SearchBlockActions = {
|
|
62
|
-
handleInputChange(value: string): void;
|
|
63
|
-
navigateToResult(result: SearchResult): void;
|
|
64
|
-
setOpen(open: boolean): void;
|
|
65
|
-
setQuery(value: string): void;
|
|
66
|
-
setSelectedValue(id: string): void;
|
|
67
|
-
};
|
|
68
|
-
type SearchBlockMeta = {
|
|
69
|
-
inputId: string;
|
|
70
|
-
inputRef: RefObject<HTMLInputElement | null>;
|
|
71
|
-
listId: string;
|
|
72
|
-
listRef: RefObject<HTMLDivElement | null>;
|
|
73
|
-
shortcut: string;
|
|
74
|
-
variant: SearchBlockVariant;
|
|
75
|
-
};
|
|
76
|
-
type SearchBlockContextValue = {
|
|
77
|
-
actions: SearchBlockActions;
|
|
78
|
-
meta: SearchBlockMeta;
|
|
79
|
-
state: SearchBlockState;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
type Heading = {
|
|
83
|
-
id: string;
|
|
84
|
-
depth: number;
|
|
85
|
-
text: string;
|
|
86
|
-
};
|
|
87
|
-
type SiteData = {
|
|
88
|
-
name: string;
|
|
89
|
-
description?: string;
|
|
90
|
-
url?: string;
|
|
91
|
-
og?: OgMetadata;
|
|
92
|
-
};
|
|
93
|
-
type OgImageMetadata = string | {
|
|
94
|
-
src: string;
|
|
95
|
-
alt?: string;
|
|
96
|
-
};
|
|
97
|
-
type OgMetadata = {
|
|
98
|
-
title?: string;
|
|
99
|
-
description?: string;
|
|
100
|
-
image?: OgImageMetadata;
|
|
101
|
-
};
|
|
102
|
-
type Author = {
|
|
103
|
-
id?: string;
|
|
104
|
-
name: string;
|
|
105
|
-
handle?: string;
|
|
106
|
-
avatar?: string;
|
|
107
|
-
url?: string;
|
|
108
|
-
};
|
|
109
|
-
type PageStatus = "published" | "draft" | "archived";
|
|
110
|
-
type PageFrontmatter = {
|
|
111
|
-
title: string;
|
|
112
|
-
slug?: string;
|
|
113
|
-
description?: string;
|
|
114
|
-
status?: PageStatus;
|
|
115
|
-
publishedAt?: string;
|
|
116
|
-
updatedAt?: string;
|
|
117
|
-
authors?: (string | Author)[];
|
|
118
|
-
tags?: string[];
|
|
119
|
-
[key: string]: unknown;
|
|
120
|
-
};
|
|
121
|
-
type PageData<TMeta extends Record<string, unknown> = Record<string, unknown>> = {
|
|
122
|
-
fileID: string;
|
|
123
|
-
group: string;
|
|
124
|
-
slug: string;
|
|
125
|
-
path: string;
|
|
126
|
-
title: string;
|
|
127
|
-
description?: string;
|
|
128
|
-
status: PageStatus;
|
|
129
|
-
publishedAt?: string;
|
|
130
|
-
updatedAt?: string;
|
|
131
|
-
authors: Author[];
|
|
132
|
-
tags: string[];
|
|
133
|
-
og?: OgMetadata;
|
|
134
|
-
meta: TMeta;
|
|
135
|
-
body: string;
|
|
136
|
-
};
|
|
137
|
-
type PageSummary<TMeta extends Record<string, unknown> = Record<string, unknown>> = Omit<PageData<TMeta>, "body"> & {
|
|
138
|
-
body?: string;
|
|
139
|
-
};
|
|
140
|
-
type PageNode = {
|
|
141
|
-
type: "page";
|
|
142
|
-
fileID: string;
|
|
143
|
-
title: string;
|
|
144
|
-
path: string;
|
|
145
|
-
group: string;
|
|
146
|
-
description?: string;
|
|
147
|
-
status: PageStatus;
|
|
148
|
-
publishedAt?: string;
|
|
149
|
-
updatedAt?: string;
|
|
150
|
-
authors: Author[];
|
|
151
|
-
tags?: string[];
|
|
152
|
-
og?: OgMetadata;
|
|
153
|
-
meta: Record<string, unknown>;
|
|
154
|
-
};
|
|
155
|
-
type SectionNode = {
|
|
156
|
-
type: "section";
|
|
157
|
-
id: string;
|
|
158
|
-
title: string;
|
|
159
|
-
path?: string;
|
|
160
|
-
group?: string;
|
|
161
|
-
children: TreeNode[];
|
|
162
|
-
};
|
|
163
|
-
type FolderNode = {
|
|
164
|
-
type: "folder";
|
|
165
|
-
id: string;
|
|
166
|
-
title: string;
|
|
167
|
-
path?: string;
|
|
168
|
-
group?: string;
|
|
169
|
-
children: TreeNode[];
|
|
170
|
-
};
|
|
171
|
-
type LinkNode = {
|
|
172
|
-
type: "link";
|
|
173
|
-
id: string;
|
|
174
|
-
title: string;
|
|
175
|
-
href: string;
|
|
176
|
-
};
|
|
177
|
-
type TreeNode = PageNode | SectionNode | FolderNode | LinkNode;
|
|
178
|
-
type NavPage = PageNode;
|
|
179
|
-
type NavLink = LinkNode;
|
|
180
|
-
type NavSection = SectionNode;
|
|
181
|
-
type NavFolder = FolderNode;
|
|
182
|
-
type NavItem = TreeNode;
|
|
183
|
-
type RouteRecord = {
|
|
184
|
-
fileID: string;
|
|
185
|
-
slug: string;
|
|
186
|
-
path: string;
|
|
187
|
-
group: string;
|
|
188
|
-
};
|
|
189
|
-
type ResolvedAttribution = {
|
|
190
|
-
enabled: false;
|
|
191
|
-
} | {
|
|
192
|
-
enabled: true;
|
|
193
|
-
variant: "publish-dev";
|
|
194
|
-
label?: string;
|
|
195
|
-
hrefLabel?: string;
|
|
196
|
-
href: string;
|
|
197
|
-
};
|
|
198
|
-
type GroupManifest = {
|
|
199
|
-
key: string;
|
|
200
|
-
title: string;
|
|
201
|
-
path: string;
|
|
202
|
-
ancestry?: string[];
|
|
203
|
-
meta?: Record<string, unknown>;
|
|
204
|
-
tree: TreeNode[];
|
|
205
|
-
pages: PageData[];
|
|
206
|
-
};
|
|
207
|
-
type ManifestLike = {
|
|
208
|
-
site: SiteData;
|
|
209
|
-
groups: Record<string, GroupManifest>;
|
|
210
|
-
routes: RouteRecord[];
|
|
211
|
-
pages: PageData[];
|
|
212
|
-
tree: TreeNode[];
|
|
213
|
-
attribution?: Record<string, ResolvedAttribution>;
|
|
214
|
-
contentHash: string;
|
|
215
|
-
};
|
|
216
|
-
type RootLayoutProps = {
|
|
217
|
-
children: React.ReactNode;
|
|
218
|
-
site: SiteData;
|
|
219
|
-
tree: TreeNode[];
|
|
220
|
-
currentPath?: string;
|
|
221
|
-
currentGroup?: GroupContext;
|
|
222
|
-
activeGroups?: readonly GroupContext[];
|
|
223
|
-
};
|
|
224
|
-
type RootPageProps = {
|
|
225
|
-
site: SiteData;
|
|
226
|
-
tree: TreeNode[];
|
|
227
|
-
};
|
|
228
|
-
type LayoutProps = {
|
|
229
|
-
children: React.ReactNode;
|
|
230
|
-
site: SiteData;
|
|
231
|
-
tree: TreeNode[];
|
|
232
|
-
node: TreeNode;
|
|
233
|
-
currentPath: string;
|
|
234
|
-
group: string;
|
|
235
|
-
};
|
|
236
|
-
type PageProps<TMeta extends Record<string, unknown> = Record<string, unknown>> = {
|
|
237
|
-
site: SiteData;
|
|
238
|
-
tree: TreeNode[];
|
|
239
|
-
node: TreeNode;
|
|
240
|
-
page: PageData<TMeta>;
|
|
241
|
-
currentPath: string;
|
|
242
|
-
group: string;
|
|
243
|
-
};
|
|
244
|
-
type IndexPageProps = {
|
|
245
|
-
site: SiteData;
|
|
246
|
-
tree: TreeNode[];
|
|
247
|
-
node: TreeNode;
|
|
248
|
-
currentPath: string;
|
|
249
|
-
group: string;
|
|
250
|
-
};
|
|
251
|
-
type ThemeMode = "system" | "light" | "dark";
|
|
252
|
-
type GroupForcedMode = "light" | "dark" | "none";
|
|
253
|
-
type GroupContext = {
|
|
254
|
-
key: string;
|
|
255
|
-
title: string;
|
|
256
|
-
path: string;
|
|
257
|
-
ancestry: readonly string[];
|
|
258
|
-
hasThemeCss: boolean;
|
|
259
|
-
hasFontScope: boolean;
|
|
260
|
-
defaultMode?: ThemeMode;
|
|
261
|
-
forcedMode?: GroupForcedMode;
|
|
262
|
-
resolvedForcedMode?: "light" | "dark";
|
|
263
|
-
escapesForcedMode?: boolean;
|
|
264
|
-
meta?: Record<string, unknown>;
|
|
265
|
-
};
|
|
266
|
-
|
|
267
|
-
declare const __publishOsTypesModule = true;
|
|
268
|
-
|
|
269
|
-
export { type Author, type FolderNode, type GroupContext, type GroupForcedMode, type GroupManifest, type Heading, type IndexPageProps, type LayoutProps, type LinkNode, type ManifestLike, type NavFolder, type NavItem, type NavLink, type NavPage, type NavSection, type OgImageMetadata, type OgMetadata, type PageData, type PageFrontmatter, type PageNode, type PageProps, type PageStatus, type PageSummary, type ResolvedAttribution, type RootLayoutProps, type RootPageProps, type RouteRecord, type SearchBlockActions, type SearchBlockContextValue, type SearchBlockMeta, type SearchBlockState, type SearchBlockVariant, type SearchInput, type SearchOutput, type SearchResult, type SearchStatus, type SearchSubResult, type SectionNode, type SiteData, type ThemeMode, type TreeNode, __publishOsTypesModule };
|
package/dist/utils/cn.cjs
DELETED
|
@@ -1,49 +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/utils/cn.ts
|
|
21
|
-
var cn_exports = {};
|
|
22
|
-
__export(cn_exports, {
|
|
23
|
-
cn: () => cn
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(cn_exports);
|
|
26
|
-
var import_clsx = require("clsx");
|
|
27
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
28
|
-
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
29
|
-
extend: {
|
|
30
|
-
classGroups: {
|
|
31
|
-
z: [
|
|
32
|
-
"z-content",
|
|
33
|
-
"z-nav",
|
|
34
|
-
"z-overlay",
|
|
35
|
-
"z-modal",
|
|
36
|
-
"z-search",
|
|
37
|
-
"z-toast",
|
|
38
|
-
"z-progress"
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
function cn(...inputs) {
|
|
44
|
-
return twMerge((0, import_clsx.clsx)(inputs));
|
|
45
|
-
}
|
|
46
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
-
0 && (module.exports = {
|
|
48
|
-
cn
|
|
49
|
-
});
|
package/dist/utils/cn.d.cts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ClassValue } from 'clsx';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Merges class names using clsx and tailwind-merge.
|
|
5
|
-
*
|
|
6
|
-
* Use this `cn` for all PublishOS runtime and tenant components
|
|
7
|
-
* to ensure proper class merging.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* cn("bg-surface-2", "bg-accent-1", "rounded-lg")
|
|
11
|
-
* // Result: "bg-accent-1 rounded-lg"
|
|
12
|
-
*/
|
|
13
|
-
declare function cn(...inputs: ClassValue[]): string;
|
|
14
|
-
|
|
15
|
-
export { cn };
|
|
@@ -1,119 +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/utils/heading-ids.ts
|
|
21
|
-
var heading_ids_exports = {};
|
|
22
|
-
__export(heading_ids_exports, {
|
|
23
|
-
cleanHeadingText: () => cleanHeadingText,
|
|
24
|
-
createHeadingIdGenerator: () => createHeadingIdGenerator,
|
|
25
|
-
extractMdxHeadings: () => extractMdxHeadings,
|
|
26
|
-
headingToHTMLId: () => headingToHTMLId,
|
|
27
|
-
urlIdToText: () => urlIdToText
|
|
28
|
-
});
|
|
29
|
-
module.exports = __toCommonJS(heading_ids_exports);
|
|
30
|
-
var import_react = require("react");
|
|
31
|
-
var SELF_CLOSING_TAG_RE = new RegExp("<[^>]+/>", "g");
|
|
32
|
-
var PAIRED_TAG_RE = /<\/?\w[^>]*>/g;
|
|
33
|
-
var MDX_BOLD_RE = /\*\*(.*?)\*\*/g;
|
|
34
|
-
var MDX_ITALIC_RE = /\*(.*?)\*/g;
|
|
35
|
-
var MDX_UNDERLINE_BOLD_RE = /__(.*?)__/g;
|
|
36
|
-
var MDX_UNDERLINE_ITALIC_RE = /_(.*?)_/g;
|
|
37
|
-
var MDX_STRIKETHROUGH_RE = /~~(.*?)~~/g;
|
|
38
|
-
var MDX_INLINE_CODE_RE = /`(.*?)`/g;
|
|
39
|
-
var MDX_LINK_RE = /\[(.*?)\]\(.*?\)/g;
|
|
40
|
-
var NON_ALPHANUMERIC_RE = /[^a-z0-9]+/g;
|
|
41
|
-
var LEADING_TRAILING_HYPHEN_RE = /^-+|-+$/g;
|
|
42
|
-
var LEADING_DIGIT_RE = /^(\d)/;
|
|
43
|
-
var HEADING_RE = /^(#{1,6})[ \t]+(.+?)\s*#*\s*$/gm;
|
|
44
|
-
var FENCED_CODE_RE = /```[\s\S]*?```|~~~[\s\S]*?~~~/g;
|
|
45
|
-
function extractText(node) {
|
|
46
|
-
if (typeof node === "string") return node;
|
|
47
|
-
if (typeof node === "number") return String(node);
|
|
48
|
-
if (node == null || typeof node === "boolean") return "";
|
|
49
|
-
if (Array.isArray(node)) {
|
|
50
|
-
return node.map(extractText).join("");
|
|
51
|
-
}
|
|
52
|
-
if ((0, import_react.isValidElement)(node)) {
|
|
53
|
-
const element = node;
|
|
54
|
-
return element.props.children === void 0 ? "" : extractText(element.props.children);
|
|
55
|
-
}
|
|
56
|
-
return "";
|
|
57
|
-
}
|
|
58
|
-
function cleanHeadingText(input) {
|
|
59
|
-
const text = typeof input === "string" ? input : extractText(input);
|
|
60
|
-
return text.replace(SELF_CLOSING_TAG_RE, "").replace(PAIRED_TAG_RE, "").replace(MDX_BOLD_RE, "$1").replace(MDX_ITALIC_RE, "$1").replace(MDX_UNDERLINE_BOLD_RE, "$1").replace(MDX_UNDERLINE_ITALIC_RE, "$1").replace(MDX_STRIKETHROUGH_RE, "$1").replace(MDX_INLINE_CODE_RE, "$1").replace(MDX_LINK_RE, "$1").trim();
|
|
61
|
-
}
|
|
62
|
-
function slugify(text) {
|
|
63
|
-
return text.toLowerCase().replace(NON_ALPHANUMERIC_RE, "-").replace(LEADING_TRAILING_HYPHEN_RE, "").replace(LEADING_DIGIT_RE, "id-$1");
|
|
64
|
-
}
|
|
65
|
-
function headingToHTMLId(input) {
|
|
66
|
-
try {
|
|
67
|
-
const id = slugify(cleanHeadingText(input));
|
|
68
|
-
return id || "empty-heading";
|
|
69
|
-
} catch {
|
|
70
|
-
return "empty-heading";
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
function createHeadingIdGenerator() {
|
|
74
|
-
const usedIds = /* @__PURE__ */ new Map();
|
|
75
|
-
return (input) => {
|
|
76
|
-
const baseId = headingToHTMLId(input);
|
|
77
|
-
if (baseId === "empty-heading") return baseId;
|
|
78
|
-
const count = usedIds.get(baseId) ?? 0;
|
|
79
|
-
usedIds.set(baseId, count + 1);
|
|
80
|
-
return count === 0 ? baseId : `${baseId}-${count}`;
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
function extractMdxHeadings(content = "", levels) {
|
|
84
|
-
const [minDepth, maxDepth] = levels;
|
|
85
|
-
const headingId = createHeadingIdGenerator();
|
|
86
|
-
const headings = [];
|
|
87
|
-
const searchableContent = content.replace(FENCED_CODE_RE, "");
|
|
88
|
-
HEADING_RE.lastIndex = 0;
|
|
89
|
-
while (true) {
|
|
90
|
-
const match = HEADING_RE.exec(searchableContent);
|
|
91
|
-
if (!match) break;
|
|
92
|
-
const marker = match[1];
|
|
93
|
-
const rawText = match[2];
|
|
94
|
-
if (!marker || !rawText) continue;
|
|
95
|
-
const level = marker.length;
|
|
96
|
-
const text = cleanHeadingText(rawText);
|
|
97
|
-
const id = headingId(rawText);
|
|
98
|
-
if (!text || id === "empty-heading") continue;
|
|
99
|
-
if (level < minDepth || level > maxDepth) continue;
|
|
100
|
-
headings.push({ id, level, text });
|
|
101
|
-
}
|
|
102
|
-
return headings;
|
|
103
|
-
}
|
|
104
|
-
function urlIdToText(urlId) {
|
|
105
|
-
try {
|
|
106
|
-
if (typeof urlId !== "string") return "";
|
|
107
|
-
return urlId.replace(/^id-/, "").replace(/-/g, " ").replace(/\b\w/g, (char) => char.toUpperCase());
|
|
108
|
-
} catch {
|
|
109
|
-
return "";
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
113
|
-
0 && (module.exports = {
|
|
114
|
-
cleanHeadingText,
|
|
115
|
-
createHeadingIdGenerator,
|
|
116
|
-
extractMdxHeadings,
|
|
117
|
-
headingToHTMLId,
|
|
118
|
-
urlIdToText
|
|
119
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
type HeadingIdGenerator = (input: ReactNode) => string;
|
|
4
|
-
type MdxHeadingItem = {
|
|
5
|
-
id: string;
|
|
6
|
-
level: number;
|
|
7
|
-
text: string;
|
|
8
|
-
};
|
|
9
|
-
declare function cleanHeadingText(input: ReactNode): string;
|
|
10
|
-
declare function headingToHTMLId(input: ReactNode): string;
|
|
11
|
-
declare function createHeadingIdGenerator(): HeadingIdGenerator;
|
|
12
|
-
declare function extractMdxHeadings(content: string | undefined, levels: [number, number]): MdxHeadingItem[];
|
|
13
|
-
declare function urlIdToText(urlId: string): string;
|
|
14
|
-
|
|
15
|
-
export { type HeadingIdGenerator, type MdxHeadingItem, cleanHeadingText, createHeadingIdGenerator, extractMdxHeadings, headingToHTMLId, urlIdToText };
|
|
@@ -1,55 +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/utils/pretty-date.ts
|
|
21
|
-
var pretty_date_exports = {};
|
|
22
|
-
__export(pretty_date_exports, {
|
|
23
|
-
prettyDate: () => prettyDate
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(pretty_date_exports);
|
|
26
|
-
var defaultDateOptions = {
|
|
27
|
-
day: "numeric",
|
|
28
|
-
month: "short",
|
|
29
|
-
year: "numeric"
|
|
30
|
-
};
|
|
31
|
-
function parseDate(value) {
|
|
32
|
-
if (value instanceof Date) return value;
|
|
33
|
-
if (typeof value === "string" && /^\d{4}-\d{2}-\d{2}$/.test(value)) {
|
|
34
|
-
return /* @__PURE__ */ new Date(`${value}T00:00:00`);
|
|
35
|
-
}
|
|
36
|
-
return new Date(value);
|
|
37
|
-
}
|
|
38
|
-
function prettyDate(value, options = {}) {
|
|
39
|
-
if (typeof value !== "string" && typeof value !== "number" && !(value instanceof Date)) {
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
const date = parseDate(value);
|
|
43
|
-
if (Number.isNaN(date.getTime())) {
|
|
44
|
-
return typeof value === "string" ? value : null;
|
|
45
|
-
}
|
|
46
|
-
const { locale = "en", ...dateOptions } = options;
|
|
47
|
-
return new Intl.DateTimeFormat(locale, {
|
|
48
|
-
...defaultDateOptions,
|
|
49
|
-
...dateOptions
|
|
50
|
-
}).format(date);
|
|
51
|
-
}
|
|
52
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
53
|
-
0 && (module.exports = {
|
|
54
|
-
prettyDate
|
|
55
|
-
});
|