@btst/stack 1.0.1 → 1.1.1
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 +156 -709
- package/dist/api/index.cjs +2 -1
- package/dist/api/index.d.cts +4 -3
- package/dist/api/index.d.mts +4 -3
- package/dist/api/index.d.ts +4 -3
- package/dist/api/index.mjs +1 -1
- package/dist/client/components/compose.cjs +68 -0
- package/dist/client/components/compose.mjs +65 -0
- package/dist/client/components/error-boundary.cjs +24 -0
- package/dist/client/components/error-boundary.mjs +22 -0
- package/dist/client/components/index.cjs +10 -0
- package/dist/client/components/index.d.cts +52 -0
- package/dist/client/components/index.d.mts +52 -0
- package/dist/client/components/index.d.ts +52 -0
- package/dist/client/components/index.mjs +2 -0
- package/dist/client/index.cjs +24 -5
- package/dist/client/index.d.cts +125 -8
- package/dist/client/index.d.mts +125 -8
- package/dist/client/index.d.ts +125 -8
- package/dist/client/index.mjs +21 -4
- package/dist/client/meta-utils.cjs +162 -0
- package/dist/client/meta-utils.mjs +160 -0
- package/dist/client/path-utils.cjs +15 -0
- package/dist/client/path-utils.mjs +13 -0
- package/dist/client/sitemap-utils.cjs +14 -0
- package/dist/client/sitemap-utils.mjs +12 -0
- package/dist/context/index.cjs +6 -63
- package/dist/context/index.d.cts +21 -24
- package/dist/context/index.d.mts +21 -24
- package/dist/context/index.d.ts +21 -24
- package/dist/context/index.mjs +1 -61
- package/dist/context/provider.cjs +51 -0
- package/dist/context/provider.mjs +46 -0
- package/dist/index.cjs +2 -3
- package/dist/index.d.cts +3 -2
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.mjs +1 -2
- package/dist/plugins/api/index.cjs +13 -0
- package/dist/plugins/api/index.d.cts +40 -0
- package/dist/plugins/api/index.d.mts +40 -0
- package/dist/plugins/api/index.d.ts +40 -0
- package/dist/plugins/api/index.mjs +8 -0
- package/dist/plugins/blog/api/index.cjs +11 -0
- package/dist/plugins/blog/api/index.d.cts +7 -0
- package/dist/plugins/blog/api/index.d.mts +7 -0
- package/dist/plugins/blog/api/index.d.ts +7 -0
- package/dist/plugins/blog/api/index.mjs +2 -0
- package/dist/plugins/blog/api/plugin.cjs +569 -0
- package/dist/plugins/blog/api/plugin.mjs +565 -0
- package/dist/plugins/blog/client/components/forms/image-field.cjs +133 -0
- package/dist/plugins/blog/client/components/forms/image-field.mjs +131 -0
- package/dist/plugins/blog/client/components/forms/markdown-editor-styles.css +30 -0
- package/dist/plugins/blog/client/components/forms/markdown-editor.cjs +106 -0
- package/dist/plugins/blog/client/components/forms/markdown-editor.mjs +104 -0
- package/dist/plugins/blog/client/components/forms/post-forms.cjs +401 -0
- package/dist/plugins/blog/client/components/forms/post-forms.mjs +398 -0
- package/dist/plugins/blog/client/components/forms/tags-multiselect.cjs +71 -0
- package/dist/plugins/blog/client/components/forms/tags-multiselect.mjs +65 -0
- package/dist/plugins/blog/client/components/index.cjs +17 -0
- package/dist/plugins/blog/client/components/index.d.cts +22 -0
- package/dist/plugins/blog/client/components/index.d.mts +22 -0
- package/dist/plugins/blog/client/components/index.d.ts +22 -0
- package/dist/plugins/blog/client/components/index.mjs +12 -0
- package/dist/plugins/blog/client/components/loading/form-page-skeleton.cjs +62 -0
- package/dist/plugins/blog/client/components/loading/form-page-skeleton.mjs +60 -0
- package/dist/plugins/blog/client/components/loading/index.cjs +20 -0
- package/dist/plugins/blog/client/components/loading/index.mjs +16 -0
- package/dist/plugins/blog/client/components/loading/list-page-skeleton.cjs +26 -0
- package/dist/plugins/blog/client/components/loading/list-page-skeleton.mjs +24 -0
- package/dist/plugins/blog/client/components/loading/page-header-skeleton.cjs +13 -0
- package/dist/plugins/blog/client/components/loading/page-header-skeleton.mjs +11 -0
- package/dist/plugins/blog/client/components/loading/post-card-skeleton.cjs +22 -0
- package/dist/plugins/blog/client/components/loading/post-card-skeleton.mjs +20 -0
- package/dist/plugins/blog/client/components/loading/post-page-skeleton.cjs +56 -0
- package/dist/plugins/blog/client/components/loading/post-page-skeleton.mjs +54 -0
- package/dist/plugins/blog/client/components/pages/404-page.cjs +19 -0
- package/dist/plugins/blog/client/components/pages/404-page.mjs +17 -0
- package/dist/plugins/blog/client/components/pages/edit-post-page.cjs +41 -0
- package/dist/plugins/blog/client/components/pages/edit-post-page.internal.cjs +57 -0
- package/dist/plugins/blog/client/components/pages/edit-post-page.internal.mjs +55 -0
- package/dist/plugins/blog/client/components/pages/edit-post-page.mjs +39 -0
- package/dist/plugins/blog/client/components/pages/home-page.cjs +41 -0
- package/dist/plugins/blog/client/components/pages/home-page.internal.cjs +61 -0
- package/dist/plugins/blog/client/components/pages/home-page.internal.mjs +59 -0
- package/dist/plugins/blog/client/components/pages/home-page.mjs +39 -0
- package/dist/plugins/blog/client/components/pages/new-post-page.cjs +37 -0
- package/dist/plugins/blog/client/components/pages/new-post-page.internal.cjs +53 -0
- package/dist/plugins/blog/client/components/pages/new-post-page.internal.mjs +51 -0
- package/dist/plugins/blog/client/components/pages/new-post-page.mjs +35 -0
- package/dist/plugins/blog/client/components/pages/post-page.cjs +39 -0
- package/dist/plugins/blog/client/components/pages/post-page.internal.cjs +101 -0
- package/dist/plugins/blog/client/components/pages/post-page.internal.mjs +99 -0
- package/dist/plugins/blog/client/components/pages/post-page.mjs +37 -0
- package/dist/plugins/blog/client/components/pages/tag-page.cjs +39 -0
- package/dist/plugins/blog/client/components/pages/tag-page.internal.cjs +61 -0
- package/dist/plugins/blog/client/components/pages/tag-page.internal.mjs +59 -0
- package/dist/plugins/blog/client/components/pages/tag-page.mjs +37 -0
- package/dist/plugins/blog/client/components/shared/better-blog-attribution.cjs +24 -0
- package/dist/plugins/blog/client/components/shared/better-blog-attribution.mjs +22 -0
- package/dist/plugins/blog/client/components/shared/default-error.cjs +18 -0
- package/dist/plugins/blog/client/components/shared/default-error.mjs +16 -0
- package/dist/plugins/blog/client/components/shared/defaults.cjs +13 -0
- package/dist/plugins/blog/client/components/shared/defaults.mjs +10 -0
- package/dist/plugins/blog/client/components/shared/empty-list.cjs +21 -0
- package/dist/plugins/blog/client/components/shared/empty-list.mjs +19 -0
- package/dist/plugins/blog/client/components/shared/error-placeholder.cjs +24 -0
- package/dist/plugins/blog/client/components/shared/error-placeholder.mjs +22 -0
- package/dist/plugins/blog/client/components/shared/highlight-text.cjs +53 -0
- package/dist/plugins/blog/client/components/shared/highlight-text.mjs +51 -0
- package/dist/plugins/blog/client/components/shared/markdown-content-styles.css +328 -0
- package/dist/plugins/blog/client/components/shared/markdown-content.cjs +324 -0
- package/dist/plugins/blog/client/components/shared/markdown-content.mjs +315 -0
- package/dist/plugins/blog/client/components/shared/on-this-page.cjs +161 -0
- package/dist/plugins/blog/client/components/shared/on-this-page.mjs +158 -0
- package/dist/plugins/blog/client/components/shared/page-header.cjs +40 -0
- package/dist/plugins/blog/client/components/shared/page-header.mjs +38 -0
- package/dist/plugins/blog/client/components/shared/page-layout.cjs +24 -0
- package/dist/plugins/blog/client/components/shared/page-layout.mjs +22 -0
- package/dist/plugins/blog/client/components/shared/page-wrapper.cjs +23 -0
- package/dist/plugins/blog/client/components/shared/page-wrapper.mjs +21 -0
- package/dist/plugins/blog/client/components/shared/post-card.cjs +279 -0
- package/dist/plugins/blog/client/components/shared/post-card.mjs +277 -0
- package/dist/plugins/blog/client/components/shared/post-navigation.cjs +74 -0
- package/dist/plugins/blog/client/components/shared/post-navigation.mjs +72 -0
- package/dist/plugins/blog/client/components/shared/posts-list.cjs +48 -0
- package/dist/plugins/blog/client/components/shared/posts-list.mjs +46 -0
- package/dist/plugins/blog/client/components/shared/recent-posts-carousel.cjs +59 -0
- package/dist/plugins/blog/client/components/shared/recent-posts-carousel.mjs +57 -0
- package/dist/plugins/blog/client/components/shared/search-input.cjs +136 -0
- package/dist/plugins/blog/client/components/shared/search-input.mjs +117 -0
- package/dist/plugins/blog/client/components/shared/search-modal.cjs +135 -0
- package/dist/plugins/blog/client/components/shared/search-modal.mjs +116 -0
- package/dist/plugins/blog/client/components/shared/tags-list.cjs +22 -0
- package/dist/plugins/blog/client/components/shared/tags-list.mjs +20 -0
- package/dist/plugins/blog/client/components/shared/use-route-lifecycle.cjs +50 -0
- package/dist/plugins/blog/client/components/shared/use-route-lifecycle.mjs +48 -0
- package/dist/plugins/blog/client/hooks/blog-hooks.cjs +380 -0
- package/dist/plugins/blog/client/hooks/blog-hooks.mjs +368 -0
- package/dist/plugins/blog/client/hooks/index.cjs +17 -0
- package/dist/plugins/blog/client/hooks/index.d.cts +150 -0
- package/dist/plugins/blog/client/hooks/index.d.mts +150 -0
- package/dist/plugins/blog/client/hooks/index.d.ts +150 -0
- package/dist/plugins/blog/client/hooks/index.mjs +1 -0
- package/dist/plugins/blog/client/hooks/use-debounce.cjs +16 -0
- package/dist/plugins/blog/client/hooks/use-debounce.mjs +14 -0
- package/dist/plugins/blog/client/index.cjs +7 -0
- package/dist/plugins/blog/client/index.d.cts +414 -0
- package/dist/plugins/blog/client/index.d.mts +414 -0
- package/dist/plugins/blog/client/index.d.ts +414 -0
- package/dist/plugins/blog/client/index.mjs +1 -0
- package/dist/plugins/blog/client/localization/blog-card.cjs +7 -0
- package/dist/plugins/blog/client/localization/blog-card.mjs +5 -0
- package/dist/plugins/blog/client/localization/blog-common.cjs +10 -0
- package/dist/plugins/blog/client/localization/blog-common.mjs +8 -0
- package/dist/plugins/blog/client/localization/blog-forms.cjs +40 -0
- package/dist/plugins/blog/client/localization/blog-forms.mjs +38 -0
- package/dist/plugins/blog/client/localization/blog-list.cjs +18 -0
- package/dist/plugins/blog/client/localization/blog-list.mjs +16 -0
- package/dist/plugins/blog/client/localization/blog-post.cjs +13 -0
- package/dist/plugins/blog/client/localization/blog-post.mjs +11 -0
- package/dist/plugins/blog/client/localization/index.cjs +17 -0
- package/dist/plugins/blog/client/localization/index.mjs +15 -0
- package/dist/plugins/blog/client/plugin.cjs +462 -0
- package/dist/plugins/blog/client/plugin.mjs +460 -0
- package/dist/plugins/blog/client.css +3 -0
- package/dist/plugins/blog/db.cjs +90 -0
- package/dist/plugins/blog/db.mjs +88 -0
- package/dist/plugins/blog/query-keys.cjs +181 -0
- package/dist/plugins/blog/query-keys.d.cts +530 -0
- package/dist/plugins/blog/query-keys.d.mts +530 -0
- package/dist/plugins/blog/query-keys.d.ts +530 -0
- package/dist/plugins/blog/query-keys.mjs +179 -0
- package/dist/plugins/blog/schemas.cjs +39 -0
- package/dist/plugins/blog/schemas.mjs +35 -0
- package/dist/plugins/blog/style.css +22 -0
- package/dist/plugins/blog/utils.cjs +97 -0
- package/dist/plugins/blog/utils.mjs +87 -0
- package/dist/plugins/client/index.cjs +15 -0
- package/dist/plugins/client/index.d.cts +57 -0
- package/dist/plugins/client/index.d.mts +57 -0
- package/dist/plugins/client/index.d.ts +57 -0
- package/dist/plugins/client/index.mjs +9 -0
- package/dist/{shared/stack.3OUyGp_E.mjs → plugins/utils.mjs} +1 -1
- package/dist/shared/{stack.DORw_1ps.d.cts → stack.ByOugz9d.d.cts} +17 -1
- package/dist/shared/{stack.DORw_1ps.d.mts → stack.ByOugz9d.d.mts} +17 -1
- package/dist/shared/{stack.DORw_1ps.d.ts → stack.ByOugz9d.d.ts} +17 -1
- package/dist/shared/stack.CoPoHVfV.d.cts +76 -0
- package/dist/shared/stack.CoPoHVfV.d.mts +76 -0
- package/dist/shared/stack.CoPoHVfV.d.ts +76 -0
- package/package.json +102 -14
- package/src/__tests__/plugins.test.tsx +539 -0
- package/src/__tests__/sitemap.test.ts +60 -0
- package/src/api/index.ts +75 -0
- package/src/client/components/compose.tsx +116 -0
- package/src/client/components/error-boundary.tsx +30 -0
- package/src/client/components/index.tsx +2 -0
- package/src/client/index.ts +109 -0
- package/src/client/meta-utils.ts +228 -0
- package/src/client/path-utils.ts +38 -0
- package/src/client/sitemap-utils.ts +46 -0
- package/src/context/index.ts +1 -0
- package/src/context/provider.tsx +157 -0
- package/src/index.ts +1 -0
- package/src/plugins/api/index.ts +50 -0
- package/src/plugins/blog/api/index.ts +2 -0
- package/src/plugins/blog/api/plugin.ts +759 -0
- package/src/plugins/blog/client/components/forms/image-field.tsx +165 -0
- package/src/plugins/blog/client/components/forms/markdown-editor-styles.css +30 -0
- package/src/plugins/blog/client/components/forms/markdown-editor.tsx +136 -0
- package/src/plugins/blog/client/components/forms/post-forms.tsx +531 -0
- package/src/plugins/blog/client/components/forms/tags-multiselect.tsx +79 -0
- package/src/plugins/blog/client/components/index.tsx +11 -0
- package/src/plugins/blog/client/components/loading/form-page-skeleton.tsx +75 -0
- package/src/plugins/blog/client/components/loading/index.tsx +27 -0
- package/src/plugins/blog/client/components/loading/list-page-skeleton.tsx +38 -0
- package/src/plugins/blog/client/components/loading/page-header-skeleton.tsx +10 -0
- package/src/plugins/blog/client/components/loading/post-card-skeleton.tsx +30 -0
- package/src/plugins/blog/client/components/loading/post-page-skeleton.tsx +75 -0
- package/src/plugins/blog/client/components/pages/404-page.tsx +23 -0
- package/src/plugins/blog/client/components/pages/edit-post-page.internal.tsx +60 -0
- package/src/plugins/blog/client/components/pages/edit-post-page.tsx +40 -0
- package/src/plugins/blog/client/components/pages/home-page.internal.tsx +71 -0
- package/src/plugins/blog/client/components/pages/home-page.tsx +42 -0
- package/src/plugins/blog/client/components/pages/new-post-page.internal.tsx +59 -0
- package/src/plugins/blog/client/components/pages/new-post-page.tsx +36 -0
- package/src/plugins/blog/client/components/pages/post-page.internal.tsx +142 -0
- package/src/plugins/blog/client/components/pages/post-page.tsx +38 -0
- package/src/plugins/blog/client/components/pages/tag-page.internal.tsx +74 -0
- package/src/plugins/blog/client/components/pages/tag-page.tsx +38 -0
- package/src/plugins/blog/client/components/shared/better-blog-attribution.tsx +19 -0
- package/src/plugins/blog/client/components/shared/default-error.tsx +20 -0
- package/src/plugins/blog/client/components/shared/defaults.tsx +9 -0
- package/src/plugins/blog/client/components/shared/empty-list.tsx +25 -0
- package/src/plugins/blog/client/components/shared/error-placeholder.tsx +20 -0
- package/src/plugins/blog/client/components/shared/highlight-text.tsx +80 -0
- package/src/plugins/blog/client/components/shared/markdown-content-styles.css +328 -0
- package/src/plugins/blog/client/components/shared/markdown-content.tsx +448 -0
- package/src/plugins/blog/client/components/shared/on-this-page.tsx +234 -0
- package/src/plugins/blog/client/components/shared/page-header.tsx +35 -0
- package/src/plugins/blog/client/components/shared/page-layout.tsx +23 -0
- package/src/plugins/blog/client/components/shared/page-wrapper.tsx +32 -0
- package/src/plugins/blog/client/components/shared/post-card.tsx +308 -0
- package/src/plugins/blog/client/components/shared/post-navigation.tsx +98 -0
- package/src/plugins/blog/client/components/shared/posts-list.tsx +67 -0
- package/src/plugins/blog/client/components/shared/recent-posts-carousel.tsx +79 -0
- package/src/plugins/blog/client/components/shared/search-input.tsx +146 -0
- package/src/plugins/blog/client/components/shared/search-modal.tsx +162 -0
- package/src/plugins/blog/client/components/shared/tags-list.tsx +34 -0
- package/src/plugins/blog/client/components/shared/use-route-lifecycle.tsx +68 -0
- package/src/plugins/blog/client/hooks/blog-hooks.tsx +623 -0
- package/src/plugins/blog/client/hooks/index.tsx +1 -0
- package/src/plugins/blog/client/hooks/use-debounce.ts +43 -0
- package/src/plugins/blog/client/index.ts +9 -0
- package/src/plugins/blog/client/localization/blog-card.ts +3 -0
- package/src/plugins/blog/client/localization/blog-common.ts +7 -0
- package/src/plugins/blog/client/localization/blog-forms.ts +45 -0
- package/src/plugins/blog/client/localization/blog-list.ts +14 -0
- package/src/plugins/blog/client/localization/blog-post.ts +9 -0
- package/src/plugins/blog/client/localization/index.ts +15 -0
- package/src/plugins/blog/client/overrides.ts +123 -0
- package/src/plugins/blog/client/plugin.tsx +672 -0
- package/src/plugins/blog/client.css +3 -0
- package/src/plugins/blog/db.ts +90 -0
- package/src/plugins/blog/query-keys.ts +267 -0
- package/src/plugins/blog/schemas.ts +39 -0
- package/src/plugins/blog/style.css +22 -0
- package/src/plugins/blog/types.ts +37 -0
- package/src/plugins/blog/utils.ts +144 -0
- package/src/plugins/client/index.ts +53 -0
- package/src/plugins/index.ts +0 -0
- package/src/plugins/utils.ts +35 -0
- package/src/types.ts +209 -0
- package/dist/plugins/index.cjs +0 -15
- package/dist/plugins/index.d.cts +0 -64
- package/dist/plugins/index.d.mts +0 -64
- package/dist/plugins/index.d.ts +0 -64
- package/dist/plugins/index.mjs +0 -11
- package/dist/shared/stack.DrUAVfIH.d.cts +0 -17
- package/dist/shared/stack.DrUAVfIH.d.mts +0 -17
- package/dist/shared/stack.DrUAVfIH.d.ts +0 -17
- /package/dist/{shared/stack.CktCg4PJ.cjs → plugins/utils.cjs} +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { lazy } from "react";
|
|
4
|
+
import { usePluginOverrides } from "@btst/stack/context";
|
|
5
|
+
import type { BlogPluginOverrides } from "../../overrides";
|
|
6
|
+
import { ComposedRoute } from "@btst/stack/client/components";
|
|
7
|
+
import { DefaultError } from "../shared/default-error";
|
|
8
|
+
import { PostLoading } from "../loading";
|
|
9
|
+
import { NotFoundPage } from "./404-page";
|
|
10
|
+
|
|
11
|
+
// Lazy load the internal component with actual page content
|
|
12
|
+
const PostPage = lazy(() =>
|
|
13
|
+
import("./post-page.internal").then((m) => ({ default: m.PostPage })),
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
// Exported wrapped component with error and loading boundaries
|
|
17
|
+
export function PostPageComponent({ slug }: { slug: string }) {
|
|
18
|
+
const { onRouteError } = usePluginOverrides<BlogPluginOverrides>("blog");
|
|
19
|
+
return (
|
|
20
|
+
<ComposedRoute
|
|
21
|
+
path={`/blog/${slug}`}
|
|
22
|
+
PageComponent={PostPage}
|
|
23
|
+
ErrorComponent={DefaultError}
|
|
24
|
+
LoadingComponent={PostLoading}
|
|
25
|
+
NotFoundComponent={NotFoundPage}
|
|
26
|
+
props={{ slug }}
|
|
27
|
+
onError={(error) => {
|
|
28
|
+
if (onRouteError) {
|
|
29
|
+
onRouteError("post", error, {
|
|
30
|
+
path: `/blog/${slug}`,
|
|
31
|
+
isSSR: typeof window === "undefined",
|
|
32
|
+
slug,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}}
|
|
36
|
+
/>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { PageHeader } from "../shared/page-header";
|
|
4
|
+
import { PageWrapper } from "../shared/page-wrapper";
|
|
5
|
+
import { PostsList } from "../shared/posts-list";
|
|
6
|
+
import { EmptyList } from "../shared/empty-list";
|
|
7
|
+
|
|
8
|
+
import { useSuspensePosts } from "../../hooks/blog-hooks";
|
|
9
|
+
import { BLOG_LOCALIZATION } from "../../localization";
|
|
10
|
+
import { usePluginOverrides } from "@btst/stack/context";
|
|
11
|
+
import type { BlogPluginOverrides } from "../../overrides";
|
|
12
|
+
import { useTags } from "../../hooks/blog-hooks";
|
|
13
|
+
import { useRouteLifecycle } from "../shared/use-route-lifecycle";
|
|
14
|
+
|
|
15
|
+
// Internal component with actual page content
|
|
16
|
+
export function TagPage({ tagSlug }: { tagSlug: string }) {
|
|
17
|
+
const { localization } = usePluginOverrides<
|
|
18
|
+
BlogPluginOverrides,
|
|
19
|
+
Partial<BlogPluginOverrides>
|
|
20
|
+
>("blog", {
|
|
21
|
+
localization: BLOG_LOCALIZATION,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// Call lifecycle hooks
|
|
25
|
+
useRouteLifecycle({
|
|
26
|
+
routeName: "tag",
|
|
27
|
+
context: {
|
|
28
|
+
path: `/blog/tag/${tagSlug}`,
|
|
29
|
+
params: { tagSlug },
|
|
30
|
+
isSSR: typeof window === "undefined",
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const { tags } = useTags();
|
|
35
|
+
const tag = tags?.find((t) => t.slug === tagSlug);
|
|
36
|
+
|
|
37
|
+
if (!tag) {
|
|
38
|
+
return (
|
|
39
|
+
<PageWrapper testId="tag-page">
|
|
40
|
+
<div className="flex flex-col items-center gap-3">
|
|
41
|
+
<PageHeader title={localization.BLOG_TAG_NOT_FOUND} />
|
|
42
|
+
</div>
|
|
43
|
+
<EmptyList message={localization.BLOG_TAG_NOT_FOUND_DESCRIPTION} />
|
|
44
|
+
</PageWrapper>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<PageWrapper testId="tag-page">
|
|
50
|
+
<div className="flex flex-col items-center gap-3">
|
|
51
|
+
<PageHeader
|
|
52
|
+
title={`${localization.BLOG_TAG_PAGE_TITLE.replace("{tag}", tag.name)}`}
|
|
53
|
+
description={localization.BLOG_TAG_PAGE_DESCRIPTION}
|
|
54
|
+
/>
|
|
55
|
+
</div>
|
|
56
|
+
<Content tagSlug={tagSlug} />
|
|
57
|
+
</PageWrapper>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function Content({ tagSlug }: { tagSlug: string }) {
|
|
62
|
+
const { posts, loadMore, hasMore, isLoadingMore } = useSuspensePosts({
|
|
63
|
+
published: true,
|
|
64
|
+
tagSlug: tagSlug,
|
|
65
|
+
});
|
|
66
|
+
return (
|
|
67
|
+
<PostsList
|
|
68
|
+
posts={posts}
|
|
69
|
+
onLoadMore={loadMore}
|
|
70
|
+
hasMore={hasMore}
|
|
71
|
+
isLoadingMore={isLoadingMore}
|
|
72
|
+
/>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { lazy } from "react";
|
|
4
|
+
import { usePluginOverrides } from "@btst/stack/context";
|
|
5
|
+
import type { BlogPluginOverrides } from "../../overrides";
|
|
6
|
+
import { ComposedRoute } from "@btst/stack/client/components";
|
|
7
|
+
import { DefaultError } from "../shared/default-error";
|
|
8
|
+
import { PostsLoading } from "../loading";
|
|
9
|
+
import { NotFoundPage } from "./404-page";
|
|
10
|
+
|
|
11
|
+
// Lazy load the internal component with actual page content
|
|
12
|
+
const TagPage = lazy(() =>
|
|
13
|
+
import("./tag-page.internal").then((m) => ({ default: m.TagPage })),
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
// Exported wrapped component with error and loading boundaries
|
|
17
|
+
export function TagPageComponent({ tagSlug }: { tagSlug: string }) {
|
|
18
|
+
const { onRouteError } = usePluginOverrides<BlogPluginOverrides>("blog");
|
|
19
|
+
return (
|
|
20
|
+
<ComposedRoute
|
|
21
|
+
path={`/blog/tag/${tagSlug}`}
|
|
22
|
+
PageComponent={TagPage}
|
|
23
|
+
ErrorComponent={DefaultError}
|
|
24
|
+
LoadingComponent={PostsLoading}
|
|
25
|
+
NotFoundComponent={NotFoundPage}
|
|
26
|
+
props={{ tagSlug }}
|
|
27
|
+
onError={(error) => {
|
|
28
|
+
if (onRouteError) {
|
|
29
|
+
onRouteError("tag", error, {
|
|
30
|
+
path: `/blog/tag/${tagSlug}`,
|
|
31
|
+
isSSR: typeof window === "undefined",
|
|
32
|
+
tagSlug,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}}
|
|
36
|
+
/>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export function BetterBlogAttribution() {
|
|
2
|
+
return (
|
|
3
|
+
<div className="w-full text-center">
|
|
4
|
+
<p className="flex items-center justify-center gap-1 py-2 text-gray-500 text-sm">
|
|
5
|
+
Powered by{" "}
|
|
6
|
+
<a
|
|
7
|
+
className="flex items-center gap-1 font-semibold underline"
|
|
8
|
+
href="https://www.better-stack.ai"
|
|
9
|
+
target="_blank"
|
|
10
|
+
rel="noreferrer noopener"
|
|
11
|
+
aria-label="Better Stack — Composable full-stack plugin system for React frameworks"
|
|
12
|
+
title="Better Stack — Composable full-stack plugin system for React frameworks"
|
|
13
|
+
>
|
|
14
|
+
<span className="cursor-pointer">Better-Stack</span>
|
|
15
|
+
</a>
|
|
16
|
+
</p>
|
|
17
|
+
</div>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import type { FallbackProps } from "react-error-boundary";
|
|
4
|
+
import { ErrorPlaceholder } from "./error-placeholder";
|
|
5
|
+
import { usePluginOverrides } from "@btst/stack/context";
|
|
6
|
+
import { BLOG_LOCALIZATION } from "../../localization";
|
|
7
|
+
import type { BlogPluginOverrides } from "../../overrides";
|
|
8
|
+
|
|
9
|
+
// Default error component for blog plugin routes
|
|
10
|
+
export function DefaultError({ error }: FallbackProps) {
|
|
11
|
+
const { localization } = usePluginOverrides<
|
|
12
|
+
BlogPluginOverrides,
|
|
13
|
+
Partial<BlogPluginOverrides>
|
|
14
|
+
>("blog", {
|
|
15
|
+
localization: BLOG_LOCALIZATION,
|
|
16
|
+
});
|
|
17
|
+
const title = localization.BLOG_GENERIC_ERROR_TITLE;
|
|
18
|
+
const message = error?.message ?? localization.BLOG_GENERIC_ERROR_MESSAGE;
|
|
19
|
+
return <ErrorPlaceholder title={title} message={message} />;
|
|
20
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { NotebookTextIcon } from "lucide-react";
|
|
2
|
+
import {
|
|
3
|
+
Empty,
|
|
4
|
+
EmptyHeader,
|
|
5
|
+
EmptyMedia,
|
|
6
|
+
EmptyTitle,
|
|
7
|
+
} from "@workspace/ui/components/empty";
|
|
8
|
+
|
|
9
|
+
export function EmptyList({ message }: { message: string }) {
|
|
10
|
+
return (
|
|
11
|
+
<>
|
|
12
|
+
<Empty
|
|
13
|
+
className="border border-dashed min-h-[600px] w-full"
|
|
14
|
+
data-testid="empty-state"
|
|
15
|
+
>
|
|
16
|
+
<EmptyHeader>
|
|
17
|
+
<EmptyMedia variant="icon" className="size-20">
|
|
18
|
+
<NotebookTextIcon className="text-muted-foreground size-16" />
|
|
19
|
+
</EmptyMedia>
|
|
20
|
+
<EmptyTitle data-testid="empty-message">{message}</EmptyTitle>
|
|
21
|
+
</EmptyHeader>
|
|
22
|
+
</Empty>
|
|
23
|
+
</>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CloudAlert } from "lucide-react";
|
|
2
|
+
import { PageHeader } from "./page-header";
|
|
3
|
+
|
|
4
|
+
export function ErrorPlaceholder({
|
|
5
|
+
title,
|
|
6
|
+
message,
|
|
7
|
+
}: {
|
|
8
|
+
title: string;
|
|
9
|
+
message: string;
|
|
10
|
+
}) {
|
|
11
|
+
return (
|
|
12
|
+
<div
|
|
13
|
+
className="flex min-h-[600px] flex-col items-center justify-center gap-10"
|
|
14
|
+
data-testid="error-placeholder"
|
|
15
|
+
>
|
|
16
|
+
<PageHeader title={title} description={message} />
|
|
17
|
+
<CloudAlert className="size-[100px]" />
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
interface HighlightTextProps {
|
|
2
|
+
text: string;
|
|
3
|
+
searchQuery: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
maxLength?: number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function HighlightText({
|
|
9
|
+
text,
|
|
10
|
+
searchQuery,
|
|
11
|
+
className,
|
|
12
|
+
maxLength = 150,
|
|
13
|
+
}: HighlightTextProps) {
|
|
14
|
+
if (!searchQuery.trim()) {
|
|
15
|
+
const truncated =
|
|
16
|
+
maxLength && text.length > maxLength
|
|
17
|
+
? `${text.substring(0, maxLength)}...`
|
|
18
|
+
: text;
|
|
19
|
+
return <span className={className}>{truncated}</span>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const query = searchQuery.toLowerCase();
|
|
23
|
+
const lowerText = text.toLowerCase();
|
|
24
|
+
const matchIndex = lowerText.indexOf(query);
|
|
25
|
+
|
|
26
|
+
if (matchIndex === -1) {
|
|
27
|
+
const truncated =
|
|
28
|
+
maxLength && text.length > maxLength
|
|
29
|
+
? `${text.substring(0, maxLength)}...`
|
|
30
|
+
: text;
|
|
31
|
+
return <span className={className}>{truncated}</span>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Create snippet around the match
|
|
35
|
+
let startIndex = 0;
|
|
36
|
+
let endIndex = text.length;
|
|
37
|
+
|
|
38
|
+
if (maxLength && text.length > maxLength) {
|
|
39
|
+
// Center the snippet around the match
|
|
40
|
+
const snippetStart = Math.max(0, matchIndex - Math.floor(maxLength / 2));
|
|
41
|
+
const snippetEnd = Math.min(text.length, snippetStart + maxLength);
|
|
42
|
+
|
|
43
|
+
startIndex = snippetStart;
|
|
44
|
+
endIndex = snippetEnd;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const snippet = text.substring(startIndex, endIndex);
|
|
48
|
+
const adjustedMatchIndex = matchIndex - startIndex;
|
|
49
|
+
|
|
50
|
+
if (adjustedMatchIndex < 0 || adjustedMatchIndex >= snippet.length) {
|
|
51
|
+
const truncated = snippet + (endIndex < text.length ? "..." : "");
|
|
52
|
+
return (
|
|
53
|
+
<span className={className}>
|
|
54
|
+
{startIndex > 0 ? `...${truncated}` : truncated}
|
|
55
|
+
</span>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const beforeMatch = snippet.substring(0, adjustedMatchIndex);
|
|
60
|
+
const match = snippet.substring(
|
|
61
|
+
adjustedMatchIndex,
|
|
62
|
+
adjustedMatchIndex + query.length,
|
|
63
|
+
);
|
|
64
|
+
const afterMatch = snippet.substring(adjustedMatchIndex + query.length);
|
|
65
|
+
|
|
66
|
+
const prefix = startIndex > 0 ? "..." : "";
|
|
67
|
+
const suffix = endIndex < text.length ? "..." : "";
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<span className={className}>
|
|
71
|
+
{prefix}
|
|
72
|
+
{beforeMatch}
|
|
73
|
+
<mark className="rounded-sm bg-yellow-200 font-medium text-foreground dark:bg-yellow-800">
|
|
74
|
+
{match}
|
|
75
|
+
</mark>
|
|
76
|
+
{afterMatch}
|
|
77
|
+
{suffix}
|
|
78
|
+
</span>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
.milkdown-custom .milkdown .milkdown-content {
|
|
2
|
+
font-family: var(--crepe-font-default);
|
|
3
|
+
color: var(--crepe-color-on-background);
|
|
4
|
+
background: var(--crepe-color-background);
|
|
5
|
+
padding: 0px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.milkdown-custom .milkdown .milkdown-content img {
|
|
9
|
+
vertical-align: bottom;
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.milkdown-custom .milkdown .milkdown-content .markdown-image-wrapper {
|
|
14
|
+
display: block;
|
|
15
|
+
position: relative;
|
|
16
|
+
width: 100%;
|
|
17
|
+
aspect-ratio: 16 / 9;
|
|
18
|
+
min-height: 200px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.milkdown-custom .milkdown .milkdown-content .markdown-image-wrapper > div {
|
|
22
|
+
width: 100%;
|
|
23
|
+
height: 100%;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.milkdown-custom .milkdown .milkdown-content .markdown-image-wrapper img {
|
|
27
|
+
object-fit: contain;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.milkdown-custom .milkdown .milkdown-content h1,
|
|
31
|
+
.milkdown-custom .milkdown .milkdown-content h2,
|
|
32
|
+
.milkdown-custom .milkdown .milkdown-content h3,
|
|
33
|
+
.milkdown-custom .milkdown .milkdown-content h4,
|
|
34
|
+
.milkdown-custom .milkdown .milkdown-content h5,
|
|
35
|
+
.milkdown-custom .milkdown .milkdown-content h6 {
|
|
36
|
+
font-family: var(--crepe-font-title);
|
|
37
|
+
font-weight: 400;
|
|
38
|
+
padding: 2px 0;
|
|
39
|
+
scroll-margin-top: 56px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.milkdown-custom .milkdown .milkdown-content h1 .heading-anchor,
|
|
43
|
+
.milkdown-custom .milkdown .milkdown-content h2 .heading-anchor,
|
|
44
|
+
.milkdown-custom .milkdown .milkdown-content h3 .heading-anchor,
|
|
45
|
+
.milkdown-custom .milkdown .milkdown-content h4 .heading-anchor,
|
|
46
|
+
.milkdown-custom .milkdown .milkdown-content h5 .heading-anchor,
|
|
47
|
+
.milkdown-custom .milkdown .milkdown-content h6 .heading-anchor {
|
|
48
|
+
opacity: 0;
|
|
49
|
+
margin-left: 8px;
|
|
50
|
+
color: var(--crepe-color-on-surface-variant);
|
|
51
|
+
text-decoration: none;
|
|
52
|
+
transition: opacity 0.15s ease-in-out;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.milkdown-custom .milkdown .milkdown-content h1:hover .heading-anchor,
|
|
56
|
+
.milkdown-custom .milkdown .milkdown-content h2:hover .heading-anchor,
|
|
57
|
+
.milkdown-custom .milkdown .milkdown-content h3:hover .heading-anchor,
|
|
58
|
+
.milkdown-custom .milkdown .milkdown-content h4:hover .heading-anchor,
|
|
59
|
+
.milkdown-custom .milkdown .milkdown-content h5:hover .heading-anchor,
|
|
60
|
+
.milkdown-custom .milkdown .milkdown-content h6:hover .heading-anchor {
|
|
61
|
+
opacity: 1;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.milkdown-custom .milkdown .milkdown-content h1 {
|
|
65
|
+
font-size: 42px;
|
|
66
|
+
line-height: 50px;
|
|
67
|
+
margin-top: 32px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.milkdown-custom .milkdown .milkdown-content h2 {
|
|
71
|
+
font-size: 36px;
|
|
72
|
+
line-height: 44px;
|
|
73
|
+
margin-top: 28px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.milkdown-custom .milkdown .milkdown-content h3 {
|
|
77
|
+
font-size: 32px;
|
|
78
|
+
line-height: 40px;
|
|
79
|
+
margin-top: 24px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.milkdown-custom .milkdown .milkdown-content h4 {
|
|
83
|
+
font-size: 28px;
|
|
84
|
+
line-height: 36px;
|
|
85
|
+
margin-top: 20px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.milkdown-custom .milkdown .milkdown-content h5 {
|
|
89
|
+
font-size: 24px;
|
|
90
|
+
line-height: 32px;
|
|
91
|
+
margin-top: 16px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.milkdown-custom .milkdown .milkdown-content h6 {
|
|
95
|
+
font-size: 18px;
|
|
96
|
+
font-weight: 700;
|
|
97
|
+
line-height: 28px;
|
|
98
|
+
margin-top: 16px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.milkdown-custom .milkdown .milkdown-content p {
|
|
102
|
+
font-size: 16px;
|
|
103
|
+
line-height: 24px;
|
|
104
|
+
padding: 4px 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.milkdown-custom .milkdown .milkdown-content a {
|
|
108
|
+
color: var(--crepe-color-primary);
|
|
109
|
+
text-decoration: underline;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.milkdown-custom .milkdown .milkdown-content code {
|
|
113
|
+
color: var(--crepe-color-inline-code);
|
|
114
|
+
background: color-mix(
|
|
115
|
+
in srgb,
|
|
116
|
+
var(--crepe-color-inline-area),
|
|
117
|
+
transparent 40%
|
|
118
|
+
);
|
|
119
|
+
font-family: var(--crepe-font-code);
|
|
120
|
+
padding: 0 2px;
|
|
121
|
+
border-radius: 4px;
|
|
122
|
+
font-size: 87.5%;
|
|
123
|
+
display: inline-block;
|
|
124
|
+
line-height: 1.4286;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.milkdown-custom .milkdown .milkdown-content pre {
|
|
128
|
+
background: color-mix(
|
|
129
|
+
in srgb,
|
|
130
|
+
var(--crepe-color-inline-area),
|
|
131
|
+
transparent 40%
|
|
132
|
+
);
|
|
133
|
+
padding: 10px;
|
|
134
|
+
border-radius: 4px;
|
|
135
|
+
overflow-x: auto;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.milkdown-custom .milkdown .milkdown-content pre code {
|
|
139
|
+
padding: 0;
|
|
140
|
+
background: transparent;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Ensure highlight.js themes color tokens inside our containers */
|
|
144
|
+
.milkdown-custom .milkdown .milkdown-content pre code.hljs,
|
|
145
|
+
.milkdown-custom .milkdown .milkdown-content code.hljs {
|
|
146
|
+
display: block;
|
|
147
|
+
overflow-x: auto;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.milkdown-custom .milkdown .milkdown-code-block {
|
|
151
|
+
display: block;
|
|
152
|
+
position: relative;
|
|
153
|
+
padding: 40px 8px 20px 20px;
|
|
154
|
+
margin: 4px 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.milkdown-custom .milkdown .milkdown-code-block pre {
|
|
158
|
+
background: transparent;
|
|
159
|
+
padding: 0;
|
|
160
|
+
border-radius: 0;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/* Layout wrapper to host gutter and code content side-by-side */
|
|
164
|
+
.milkdown-custom .milkdown .milkdown-code-block .code-content {
|
|
165
|
+
display: grid;
|
|
166
|
+
grid-template-columns: var(--code-gutter-width, 3ch) 1fr;
|
|
167
|
+
gap: 0.35rem;
|
|
168
|
+
align-items: stretch;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* Gutter line numbers */
|
|
172
|
+
.milkdown-custom .milkdown .milkdown-code-block .line-numbers {
|
|
173
|
+
list-style: none;
|
|
174
|
+
margin: 0;
|
|
175
|
+
user-select: none;
|
|
176
|
+
color: var(--crepe-color-on-surface-variant);
|
|
177
|
+
text-align: end;
|
|
178
|
+
display: flex;
|
|
179
|
+
flex-direction: column;
|
|
180
|
+
justify-content: space-between;
|
|
181
|
+
align-items: center;
|
|
182
|
+
height: 100%;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.milkdown-custom .milkdown .milkdown-code-block .line-numbers li {
|
|
186
|
+
font-family: var(--crepe-font-code);
|
|
187
|
+
font-size: 12px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.milkdown-custom .milkdown .milkdown-code-block .code-toolbar {
|
|
191
|
+
position: absolute;
|
|
192
|
+
top: 8px;
|
|
193
|
+
left: 18px;
|
|
194
|
+
right: 18px;
|
|
195
|
+
display: flex;
|
|
196
|
+
align-items: center;
|
|
197
|
+
justify-content: space-between;
|
|
198
|
+
pointer-events: none;
|
|
199
|
+
opacity: 0;
|
|
200
|
+
transition: opacity 0.15s ease-in-out;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.milkdown-custom .milkdown .milkdown-code-block:hover .code-toolbar {
|
|
204
|
+
opacity: 1;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* Also reveal toolbar when focused via keyboard for accessibility */
|
|
208
|
+
.milkdown-custom .milkdown .milkdown-code-block:focus-within .code-toolbar {
|
|
209
|
+
opacity: 1;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.milkdown-custom .milkdown .milkdown-code-block .language-label {
|
|
213
|
+
pointer-events: auto;
|
|
214
|
+
font-family: var(--crepe-font-default);
|
|
215
|
+
font-size: 12px;
|
|
216
|
+
font-weight: 600;
|
|
217
|
+
line-height: 16px;
|
|
218
|
+
color: var(--crepe-color-on-surface-variant);
|
|
219
|
+
background: var(--crepe-color-surface-low);
|
|
220
|
+
padding: 2px 8px;
|
|
221
|
+
border-radius: 4px;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.milkdown-custom .milkdown .milkdown-code-block .copy-button {
|
|
225
|
+
pointer-events: auto;
|
|
226
|
+
display: inline-flex;
|
|
227
|
+
align-items: center;
|
|
228
|
+
justify-content: center;
|
|
229
|
+
background: var(--crepe-color-surface-low);
|
|
230
|
+
color: var(--crepe-color-on-surface-variant);
|
|
231
|
+
border-radius: 4px;
|
|
232
|
+
padding: 4px 8px;
|
|
233
|
+
height: 26px;
|
|
234
|
+
width: 32px;
|
|
235
|
+
cursor: pointer;
|
|
236
|
+
transition: background-color 0.2s ease-in-out;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.milkdown-custom .milkdown .milkdown-code-block .copy-button:hover {
|
|
240
|
+
background: var(--crepe-color-hover);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.milkdown-custom .milkdown .milkdown-content blockquote {
|
|
244
|
+
position: relative;
|
|
245
|
+
padding-left: 40px;
|
|
246
|
+
padding-top: 0;
|
|
247
|
+
padding-bottom: 0;
|
|
248
|
+
box-sizing: content-box;
|
|
249
|
+
margin: 4px 0;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.milkdown-custom .milkdown .milkdown-content blockquote::before {
|
|
253
|
+
content: "";
|
|
254
|
+
width: 4px;
|
|
255
|
+
left: 0;
|
|
256
|
+
top: 4px;
|
|
257
|
+
bottom: 4px;
|
|
258
|
+
position: absolute;
|
|
259
|
+
background: var(--crepe-color-selected);
|
|
260
|
+
border-radius: 100px;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.milkdown-custom .milkdown .milkdown-content hr {
|
|
264
|
+
border: none;
|
|
265
|
+
background-color: color-mix(
|
|
266
|
+
in srgb,
|
|
267
|
+
var(--crepe-color-outline),
|
|
268
|
+
transparent 80%
|
|
269
|
+
);
|
|
270
|
+
background-clip: content-box;
|
|
271
|
+
padding: 6px 0;
|
|
272
|
+
height: 13px;
|
|
273
|
+
position: relative;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.milkdown-custom .milkdown .milkdown-content ul:not(.contains-task-list) {
|
|
277
|
+
padding: 0;
|
|
278
|
+
list-style-type: disc;
|
|
279
|
+
margin-left: 26px;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.milkdown-custom
|
|
283
|
+
.milkdown
|
|
284
|
+
.milkdown-content
|
|
285
|
+
ul:not(.contains-task-list)
|
|
286
|
+
li::marker {
|
|
287
|
+
color: var(--crepe-color-outline);
|
|
288
|
+
font-size: 1.2em;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.milkdown-custom .milkdown .milkdown-content ol {
|
|
292
|
+
padding: 0;
|
|
293
|
+
list-style-type: decimal;
|
|
294
|
+
margin-left: 20px;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.milkdown-custom .milkdown .milkdown-content li.task-list-item {
|
|
298
|
+
position: relative;
|
|
299
|
+
list-style: none;
|
|
300
|
+
padding-left: 28px;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.milkdown-custom
|
|
304
|
+
.milkdown
|
|
305
|
+
.milkdown-content
|
|
306
|
+
li.task-list-item
|
|
307
|
+
input[type="checkbox"] {
|
|
308
|
+
width: 20px;
|
|
309
|
+
height: 20px;
|
|
310
|
+
position: absolute;
|
|
311
|
+
left: 0;
|
|
312
|
+
margin: 0;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.milkdown-custom .milkdown .milkdown-content table {
|
|
316
|
+
border-collapse: collapse;
|
|
317
|
+
table-layout: fixed;
|
|
318
|
+
width: 100%;
|
|
319
|
+
margin: 4px 0;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.milkdown-custom .milkdown .milkdown-content th,
|
|
323
|
+
.milkdown-custom .milkdown .milkdown-content td {
|
|
324
|
+
border: 1px solid
|
|
325
|
+
color-mix(in srgb, var(--crepe-color-outline), transparent 80%);
|
|
326
|
+
padding: 4px 16px;
|
|
327
|
+
overflow-wrap: anywhere;
|
|
328
|
+
}
|