@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,62 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
const pageHeaderSkeleton = require('./page-header-skeleton.cjs');
|
|
5
|
+
const pageLayout = require('../shared/page-layout.cjs');
|
|
6
|
+
const skeleton = require('@workspace/ui/components/skeleton');
|
|
7
|
+
|
|
8
|
+
function FormPageSkeleton() {
|
|
9
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(pageLayout.PageLayout, { children: [
|
|
10
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col items-center gap-3", children: /* @__PURE__ */ jsxRuntime.jsx(pageHeaderSkeleton.PageHeaderSkeleton, {}) }),
|
|
11
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormSkeleton, {})
|
|
12
|
+
] });
|
|
13
|
+
}
|
|
14
|
+
function FormSkeleton() {
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full space-y-8", children: [
|
|
16
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [
|
|
17
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
18
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-24" }),
|
|
19
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-10 w-full rounded-md" })
|
|
20
|
+
] }),
|
|
21
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
22
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-28" }),
|
|
23
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-10 w-full rounded-md" })
|
|
24
|
+
] })
|
|
25
|
+
] }),
|
|
26
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
27
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-24" }),
|
|
28
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-24 w-full rounded-md" })
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [
|
|
31
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
32
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-28" }),
|
|
33
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-10 w-full rounded-md" })
|
|
34
|
+
] }),
|
|
35
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
36
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-24" }),
|
|
37
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-10 w-full rounded-md" })
|
|
38
|
+
] })
|
|
39
|
+
] }),
|
|
40
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
41
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-32" }),
|
|
42
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
43
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-5 w-5 rounded-sm" }),
|
|
44
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-44" })
|
|
45
|
+
] }),
|
|
46
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
47
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-5 w-5 rounded-sm" }),
|
|
48
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-36" })
|
|
49
|
+
] })
|
|
50
|
+
] }),
|
|
51
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
52
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-36" }),
|
|
53
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-32 w-full rounded-md" })
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-3 pt-2", children: [
|
|
56
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-10 w-24 rounded-md" }),
|
|
57
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-10 w-28 rounded-md" })
|
|
58
|
+
] })
|
|
59
|
+
] });
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
exports.FormPageSkeleton = FormPageSkeleton;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { PageHeaderSkeleton } from './page-header-skeleton.mjs';
|
|
3
|
+
import { PageLayout } from '../shared/page-layout.mjs';
|
|
4
|
+
import { Skeleton } from '@workspace/ui/components/skeleton';
|
|
5
|
+
|
|
6
|
+
function FormPageSkeleton() {
|
|
7
|
+
return /* @__PURE__ */ jsxs(PageLayout, { children: [
|
|
8
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col items-center gap-3", children: /* @__PURE__ */ jsx(PageHeaderSkeleton, {}) }),
|
|
9
|
+
/* @__PURE__ */ jsx(FormSkeleton, {})
|
|
10
|
+
] });
|
|
11
|
+
}
|
|
12
|
+
function FormSkeleton() {
|
|
13
|
+
return /* @__PURE__ */ jsxs("div", { className: "w-full space-y-8", children: [
|
|
14
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [
|
|
15
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
16
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-24" }),
|
|
17
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full rounded-md" })
|
|
18
|
+
] }),
|
|
19
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
20
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-28" }),
|
|
21
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full rounded-md" })
|
|
22
|
+
] })
|
|
23
|
+
] }),
|
|
24
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
25
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-24" }),
|
|
26
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-24 w-full rounded-md" })
|
|
27
|
+
] }),
|
|
28
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [
|
|
29
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
30
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-28" }),
|
|
31
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full rounded-md" })
|
|
32
|
+
] }),
|
|
33
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
34
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-24" }),
|
|
35
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full rounded-md" })
|
|
36
|
+
] })
|
|
37
|
+
] }),
|
|
38
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
39
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-32" }),
|
|
40
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
41
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-5 rounded-sm" }),
|
|
42
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-44" })
|
|
43
|
+
] }),
|
|
44
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
45
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-5 rounded-sm" }),
|
|
46
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-36" })
|
|
47
|
+
] })
|
|
48
|
+
] }),
|
|
49
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
50
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-36" }),
|
|
51
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-32 w-full rounded-md" })
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-3 pt-2", children: [
|
|
54
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-24 rounded-md" }),
|
|
55
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-28 rounded-md" })
|
|
56
|
+
] })
|
|
57
|
+
] });
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export { FormPageSkeleton };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
const formPageSkeleton = require('./form-page-skeleton.cjs');
|
|
5
|
+
const listPageSkeleton = require('./list-page-skeleton.cjs');
|
|
6
|
+
const postPageSkeleton = require('./post-page-skeleton.cjs');
|
|
7
|
+
|
|
8
|
+
function FormLoading() {
|
|
9
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "form-skeleton", children: /* @__PURE__ */ jsxRuntime.jsx(formPageSkeleton.FormPageSkeleton, {}) });
|
|
10
|
+
}
|
|
11
|
+
function PostsLoading() {
|
|
12
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "posts-skeleton", children: /* @__PURE__ */ jsxRuntime.jsx(listPageSkeleton.ListPageSkeleton, {}) });
|
|
13
|
+
}
|
|
14
|
+
function PostLoading() {
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "post-skeleton", children: /* @__PURE__ */ jsxRuntime.jsx(postPageSkeleton.PostPageSkeleton, {}) });
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
exports.FormLoading = FormLoading;
|
|
19
|
+
exports.PostLoading = PostLoading;
|
|
20
|
+
exports.PostsLoading = PostsLoading;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { FormPageSkeleton } from './form-page-skeleton.mjs';
|
|
3
|
+
import { ListPageSkeleton } from './list-page-skeleton.mjs';
|
|
4
|
+
import { PostPageSkeleton } from './post-page-skeleton.mjs';
|
|
5
|
+
|
|
6
|
+
function FormLoading() {
|
|
7
|
+
return /* @__PURE__ */ jsx("div", { "data-testid": "form-skeleton", children: /* @__PURE__ */ jsx(FormPageSkeleton, {}) });
|
|
8
|
+
}
|
|
9
|
+
function PostsLoading() {
|
|
10
|
+
return /* @__PURE__ */ jsx("div", { "data-testid": "posts-skeleton", children: /* @__PURE__ */ jsx(ListPageSkeleton, {}) });
|
|
11
|
+
}
|
|
12
|
+
function PostLoading() {
|
|
13
|
+
return /* @__PURE__ */ jsx("div", { "data-testid": "post-skeleton", children: /* @__PURE__ */ jsx(PostPageSkeleton, {}) });
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { FormLoading, PostLoading, PostsLoading };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
const pageHeaderSkeleton = require('./page-header-skeleton.cjs');
|
|
5
|
+
const pageLayout = require('../shared/page-layout.cjs');
|
|
6
|
+
const postCardSkeleton = require('./post-card-skeleton.cjs');
|
|
7
|
+
const skeleton = require('@workspace/ui/components/skeleton');
|
|
8
|
+
|
|
9
|
+
function ListPageSkeleton() {
|
|
10
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(pageLayout.PageLayout, { children: [
|
|
11
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col items-center gap-3", children: /* @__PURE__ */ jsxRuntime.jsx(pageHeaderSkeleton.PageHeaderSkeleton, {}) }),
|
|
12
|
+
/* @__PURE__ */ jsxRuntime.jsx(PostsListSkeleton, { count: 6 })
|
|
13
|
+
] });
|
|
14
|
+
}
|
|
15
|
+
function PostsListSkeleton({ count = 6 }) {
|
|
16
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full space-y-6", children: [
|
|
17
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center pb-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full max-w-md items-center gap-2", children: [
|
|
18
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-10 grow rounded-md" }),
|
|
19
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-10 w-24 rounded-md" })
|
|
20
|
+
] }) }),
|
|
21
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3", children: Array.from({ length: count }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(postCardSkeleton.PostCardSkeleton, {}, index)) }),
|
|
22
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-10 w-40 rounded-md" }) })
|
|
23
|
+
] });
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
exports.ListPageSkeleton = ListPageSkeleton;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { PageHeaderSkeleton } from './page-header-skeleton.mjs';
|
|
3
|
+
import { PageLayout } from '../shared/page-layout.mjs';
|
|
4
|
+
import { PostCardSkeleton } from './post-card-skeleton.mjs';
|
|
5
|
+
import { Skeleton } from '@workspace/ui/components/skeleton';
|
|
6
|
+
|
|
7
|
+
function ListPageSkeleton() {
|
|
8
|
+
return /* @__PURE__ */ jsxs(PageLayout, { children: [
|
|
9
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col items-center gap-3", children: /* @__PURE__ */ jsx(PageHeaderSkeleton, {}) }),
|
|
10
|
+
/* @__PURE__ */ jsx(PostsListSkeleton, { count: 6 })
|
|
11
|
+
] });
|
|
12
|
+
}
|
|
13
|
+
function PostsListSkeleton({ count = 6 }) {
|
|
14
|
+
return /* @__PURE__ */ jsxs("div", { className: "w-full space-y-6", children: [
|
|
15
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-center pb-6", children: /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-md items-center gap-2", children: [
|
|
16
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-10 grow rounded-md" }),
|
|
17
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-24 rounded-md" })
|
|
18
|
+
] }) }),
|
|
19
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3", children: Array.from({ length: count }).map((_, index) => /* @__PURE__ */ jsx(PostCardSkeleton, {}, index)) }),
|
|
20
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-40 rounded-md" }) })
|
|
21
|
+
] });
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { ListPageSkeleton };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
const skeleton = require('@workspace/ui/components/skeleton');
|
|
5
|
+
|
|
6
|
+
function PageHeaderSkeleton() {
|
|
7
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex max-w-[600px] flex-col items-center gap-2", children: [
|
|
8
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-12 w-56" }),
|
|
9
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-80" })
|
|
10
|
+
] });
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
exports.PageHeaderSkeleton = PageHeaderSkeleton;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Skeleton } from '@workspace/ui/components/skeleton';
|
|
3
|
+
|
|
4
|
+
function PageHeaderSkeleton() {
|
|
5
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex max-w-[600px] flex-col items-center gap-2", children: [
|
|
6
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-12 w-56" }),
|
|
7
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-80" })
|
|
8
|
+
] });
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { PageHeaderSkeleton };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
const card = require('@workspace/ui/components/card');
|
|
5
|
+
const skeleton = require('@workspace/ui/components/skeleton');
|
|
6
|
+
|
|
7
|
+
function PostCardSkeleton() {
|
|
8
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(card.Card, { className: "h-full", children: [
|
|
9
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative h-48 w-full", children: /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-full w-full rounded-t-xl" }) }),
|
|
10
|
+
/* @__PURE__ */ jsxRuntime.jsxs(card.CardHeader, { children: [
|
|
11
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "mb-2 h-4 w-24" }),
|
|
12
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "mb-2 h-6 w-full" })
|
|
13
|
+
] }),
|
|
14
|
+
/* @__PURE__ */ jsxRuntime.jsx(card.CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-32" }) }),
|
|
15
|
+
/* @__PURE__ */ jsxRuntime.jsx(card.CardFooter, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-center justify-between", children: [
|
|
16
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-5 w-16" }),
|
|
17
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-8 w-20" })
|
|
18
|
+
] }) })
|
|
19
|
+
] });
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
exports.PostCardSkeleton = PostCardSkeleton;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Card, CardHeader, CardContent, CardFooter } from '@workspace/ui/components/card';
|
|
3
|
+
import { Skeleton } from '@workspace/ui/components/skeleton';
|
|
4
|
+
|
|
5
|
+
function PostCardSkeleton() {
|
|
6
|
+
return /* @__PURE__ */ jsxs(Card, { className: "h-full", children: [
|
|
7
|
+
/* @__PURE__ */ jsx("div", { className: "relative h-48 w-full", children: /* @__PURE__ */ jsx(Skeleton, { className: "h-full w-full rounded-t-xl" }) }),
|
|
8
|
+
/* @__PURE__ */ jsxs(CardHeader, { children: [
|
|
9
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "mb-2 h-4 w-24" }),
|
|
10
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "mb-2 h-6 w-full" })
|
|
11
|
+
] }),
|
|
12
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-32" }) }),
|
|
13
|
+
/* @__PURE__ */ jsx(CardFooter, { children: /* @__PURE__ */ jsxs("div", { className: "flex w-full items-center justify-between", children: [
|
|
14
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-16" }),
|
|
15
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-20" })
|
|
16
|
+
] }) })
|
|
17
|
+
] });
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { PostCardSkeleton };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
const pageHeaderSkeleton = require('./page-header-skeleton.cjs');
|
|
5
|
+
const pageLayout = require('../shared/page-layout.cjs');
|
|
6
|
+
const skeleton = require('@workspace/ui/components/skeleton');
|
|
7
|
+
|
|
8
|
+
function PostPageSkeleton() {
|
|
9
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(pageLayout.PageLayout, { children: [
|
|
10
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col items-center gap-3", children: /* @__PURE__ */ jsxRuntime.jsx(pageHeaderSkeleton.PageHeaderSkeleton, {}) }),
|
|
11
|
+
/* @__PURE__ */ jsxRuntime.jsx(PostSkeleton, {})
|
|
12
|
+
] });
|
|
13
|
+
}
|
|
14
|
+
function PostSkeleton() {
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full space-y-8", children: [
|
|
16
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden space-y-4", children: [
|
|
17
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-12 w-3/4" }),
|
|
18
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
19
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-8 w-8 rounded-full" }),
|
|
20
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-32" }),
|
|
21
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-24" })
|
|
22
|
+
] }),
|
|
23
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-2", children: [
|
|
24
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-6 w-20 rounded-full" }),
|
|
25
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-6 w-16 rounded-full" }),
|
|
26
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-6 w-24 rounded-full" })
|
|
27
|
+
] })
|
|
28
|
+
] }),
|
|
29
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-64 w-full rounded-md" }),
|
|
30
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-10", children: [
|
|
31
|
+
/* @__PURE__ */ jsxRuntime.jsx(ContentBlockSkeleton, {}),
|
|
32
|
+
/* @__PURE__ */ jsxRuntime.jsx(ImageBlockSkeleton, {}),
|
|
33
|
+
/* @__PURE__ */ jsxRuntime.jsx(CodeBlockSkeleton, {}),
|
|
34
|
+
/* @__PURE__ */ jsxRuntime.jsx(ContentBlockSkeleton, {})
|
|
35
|
+
] })
|
|
36
|
+
] });
|
|
37
|
+
}
|
|
38
|
+
function ContentBlockSkeleton() {
|
|
39
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
40
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-8 w-1/3" }),
|
|
41
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
42
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-full" }),
|
|
43
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-11/12" }),
|
|
44
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-10/12" }),
|
|
45
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-9/12" })
|
|
46
|
+
] })
|
|
47
|
+
] });
|
|
48
|
+
}
|
|
49
|
+
function ImageBlockSkeleton() {
|
|
50
|
+
return /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-72 w-full rounded-md" });
|
|
51
|
+
}
|
|
52
|
+
function CodeBlockSkeleton() {
|
|
53
|
+
return /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-40 w-full rounded-md" });
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
exports.PostPageSkeleton = PostPageSkeleton;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { PageHeaderSkeleton } from './page-header-skeleton.mjs';
|
|
3
|
+
import { PageLayout } from '../shared/page-layout.mjs';
|
|
4
|
+
import { Skeleton } from '@workspace/ui/components/skeleton';
|
|
5
|
+
|
|
6
|
+
function PostPageSkeleton() {
|
|
7
|
+
return /* @__PURE__ */ jsxs(PageLayout, { children: [
|
|
8
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col items-center gap-3", children: /* @__PURE__ */ jsx(PageHeaderSkeleton, {}) }),
|
|
9
|
+
/* @__PURE__ */ jsx(PostSkeleton, {})
|
|
10
|
+
] });
|
|
11
|
+
}
|
|
12
|
+
function PostSkeleton() {
|
|
13
|
+
return /* @__PURE__ */ jsxs("div", { className: "w-full space-y-8", children: [
|
|
14
|
+
/* @__PURE__ */ jsxs("div", { className: "hidden space-y-4", children: [
|
|
15
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-12 w-3/4" }),
|
|
16
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
17
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-8 rounded-full" }),
|
|
18
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-32" }),
|
|
19
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-24" })
|
|
20
|
+
] }),
|
|
21
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2", children: [
|
|
22
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-20 rounded-full" }),
|
|
23
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-16 rounded-full" }),
|
|
24
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-24 rounded-full" })
|
|
25
|
+
] })
|
|
26
|
+
] }),
|
|
27
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-64 w-full rounded-md" }),
|
|
28
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-10", children: [
|
|
29
|
+
/* @__PURE__ */ jsx(ContentBlockSkeleton, {}),
|
|
30
|
+
/* @__PURE__ */ jsx(ImageBlockSkeleton, {}),
|
|
31
|
+
/* @__PURE__ */ jsx(CodeBlockSkeleton, {}),
|
|
32
|
+
/* @__PURE__ */ jsx(ContentBlockSkeleton, {})
|
|
33
|
+
] })
|
|
34
|
+
] });
|
|
35
|
+
}
|
|
36
|
+
function ContentBlockSkeleton() {
|
|
37
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
38
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-1/3" }),
|
|
39
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
40
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-full" }),
|
|
41
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-11/12" }),
|
|
42
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-10/12" }),
|
|
43
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-9/12" })
|
|
44
|
+
] })
|
|
45
|
+
] });
|
|
46
|
+
}
|
|
47
|
+
function ImageBlockSkeleton() {
|
|
48
|
+
return /* @__PURE__ */ jsx(Skeleton, { className: "h-72 w-full rounded-md" });
|
|
49
|
+
}
|
|
50
|
+
function CodeBlockSkeleton() {
|
|
51
|
+
return /* @__PURE__ */ jsx(Skeleton, { className: "h-40 w-full rounded-md" });
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { PostPageSkeleton };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
const context = require('@btst/stack/context');
|
|
6
|
+
const errorPlaceholder = require('../shared/error-placeholder.cjs');
|
|
7
|
+
const index = require('../../localization/index.cjs');
|
|
8
|
+
const pageWrapper = require('../shared/page-wrapper.cjs');
|
|
9
|
+
|
|
10
|
+
function NotFoundPage({ message }) {
|
|
11
|
+
const { localization } = context.usePluginOverrides("blog", {
|
|
12
|
+
localization: index.BLOG_LOCALIZATION
|
|
13
|
+
});
|
|
14
|
+
const title = localization.BLOG_PAGE_NOT_FOUND_TITLE;
|
|
15
|
+
const desc = message || localization.BLOG_PAGE_NOT_FOUND_DESCRIPTION;
|
|
16
|
+
return /* @__PURE__ */ jsxRuntime.jsx(pageWrapper.PageWrapper, { testId: "404-page", children: /* @__PURE__ */ jsxRuntime.jsx(errorPlaceholder.ErrorPlaceholder, { title, message: desc }) });
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
exports.NotFoundPage = NotFoundPage;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { usePluginOverrides } from '@btst/stack/context';
|
|
4
|
+
import { ErrorPlaceholder } from '../shared/error-placeholder.mjs';
|
|
5
|
+
import { BLOG_LOCALIZATION } from '../../localization/index.mjs';
|
|
6
|
+
import { PageWrapper } from '../shared/page-wrapper.mjs';
|
|
7
|
+
|
|
8
|
+
function NotFoundPage({ message }) {
|
|
9
|
+
const { localization } = usePluginOverrides("blog", {
|
|
10
|
+
localization: BLOG_LOCALIZATION
|
|
11
|
+
});
|
|
12
|
+
const title = localization.BLOG_PAGE_NOT_FOUND_TITLE;
|
|
13
|
+
const desc = message || localization.BLOG_PAGE_NOT_FOUND_DESCRIPTION;
|
|
14
|
+
return /* @__PURE__ */ jsx(PageWrapper, { testId: "404-page", children: /* @__PURE__ */ jsx(ErrorPlaceholder, { title, message: desc }) });
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { NotFoundPage };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
const React = require('react');
|
|
6
|
+
const context = require('@btst/stack/context');
|
|
7
|
+
const components = require('@btst/stack/client/components');
|
|
8
|
+
const defaultError = require('../shared/default-error.cjs');
|
|
9
|
+
const index = require('../loading/index.cjs');
|
|
10
|
+
const _404Page = require('./404-page.cjs');
|
|
11
|
+
|
|
12
|
+
const EditPostPage = React.lazy(
|
|
13
|
+
() => import('./edit-post-page.internal.cjs').then((m) => ({
|
|
14
|
+
default: m.EditPostPage
|
|
15
|
+
}))
|
|
16
|
+
);
|
|
17
|
+
function EditPostPageComponent({ slug }) {
|
|
18
|
+
const { onRouteError } = context.usePluginOverrides("blog");
|
|
19
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
20
|
+
components.ComposedRoute,
|
|
21
|
+
{
|
|
22
|
+
path: `/blog/${slug}/edit`,
|
|
23
|
+
PageComponent: EditPostPage,
|
|
24
|
+
ErrorComponent: defaultError.DefaultError,
|
|
25
|
+
LoadingComponent: index.FormLoading,
|
|
26
|
+
NotFoundComponent: _404Page.NotFoundPage,
|
|
27
|
+
props: { slug },
|
|
28
|
+
onError: (error) => {
|
|
29
|
+
if (onRouteError) {
|
|
30
|
+
onRouteError("editPost", error, {
|
|
31
|
+
path: `/blog/${slug}/edit`,
|
|
32
|
+
isSSR: typeof window === "undefined",
|
|
33
|
+
slug
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
exports.EditPostPageComponent = EditPostPageComponent;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
const context = require('@btst/stack/context');
|
|
6
|
+
const postForms = require('../forms/post-forms.cjs');
|
|
7
|
+
const pageHeader = require('../shared/page-header.cjs');
|
|
8
|
+
const pageWrapper = require('../shared/page-wrapper.cjs');
|
|
9
|
+
const index = require('../../localization/index.cjs');
|
|
10
|
+
const useRouteLifecycle = require('../shared/use-route-lifecycle.cjs');
|
|
11
|
+
|
|
12
|
+
function EditPostPage({ slug }) {
|
|
13
|
+
const { localization } = context.usePluginOverrides("blog", {
|
|
14
|
+
localization: index.BLOG_LOCALIZATION
|
|
15
|
+
});
|
|
16
|
+
const basePath = context.useBasePath();
|
|
17
|
+
const { navigate } = context.usePluginOverrides("blog");
|
|
18
|
+
useRouteLifecycle.useRouteLifecycle({
|
|
19
|
+
routeName: "editPost",
|
|
20
|
+
context: {
|
|
21
|
+
path: `/blog/${slug}/edit`,
|
|
22
|
+
params: { slug },
|
|
23
|
+
isSSR: typeof window === "undefined"
|
|
24
|
+
},
|
|
25
|
+
beforeRenderHook: (overrides, context) => {
|
|
26
|
+
if (overrides.onBeforeEditPostPageRendered) {
|
|
27
|
+
return overrides.onBeforeEditPostPageRendered(slug, context);
|
|
28
|
+
}
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
const handleClose = () => {
|
|
33
|
+
navigate(`${basePath}/blog`);
|
|
34
|
+
};
|
|
35
|
+
const handleSuccess = (post) => {
|
|
36
|
+
navigate(`${basePath}/blog/${post.slug}`);
|
|
37
|
+
};
|
|
38
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(pageWrapper.PageWrapper, { className: "gap-6", testId: "edit-post-page", children: [
|
|
39
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
40
|
+
pageHeader.PageHeader,
|
|
41
|
+
{
|
|
42
|
+
title: localization.BLOG_POST_EDIT_TITLE,
|
|
43
|
+
description: localization.BLOG_POST_EDIT_DESCRIPTION
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
47
|
+
postForms.EditPostForm,
|
|
48
|
+
{
|
|
49
|
+
postSlug: slug,
|
|
50
|
+
onClose: handleClose,
|
|
51
|
+
onSuccess: handleSuccess
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
] });
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
exports.EditPostPage = EditPostPage;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { usePluginOverrides, useBasePath } from '@btst/stack/context';
|
|
4
|
+
import { EditPostForm } from '../forms/post-forms.mjs';
|
|
5
|
+
import { PageHeader } from '../shared/page-header.mjs';
|
|
6
|
+
import { PageWrapper } from '../shared/page-wrapper.mjs';
|
|
7
|
+
import { BLOG_LOCALIZATION } from '../../localization/index.mjs';
|
|
8
|
+
import { useRouteLifecycle } from '../shared/use-route-lifecycle.mjs';
|
|
9
|
+
|
|
10
|
+
function EditPostPage({ slug }) {
|
|
11
|
+
const { localization } = usePluginOverrides("blog", {
|
|
12
|
+
localization: BLOG_LOCALIZATION
|
|
13
|
+
});
|
|
14
|
+
const basePath = useBasePath();
|
|
15
|
+
const { navigate } = usePluginOverrides("blog");
|
|
16
|
+
useRouteLifecycle({
|
|
17
|
+
routeName: "editPost",
|
|
18
|
+
context: {
|
|
19
|
+
path: `/blog/${slug}/edit`,
|
|
20
|
+
params: { slug },
|
|
21
|
+
isSSR: typeof window === "undefined"
|
|
22
|
+
},
|
|
23
|
+
beforeRenderHook: (overrides, context) => {
|
|
24
|
+
if (overrides.onBeforeEditPostPageRendered) {
|
|
25
|
+
return overrides.onBeforeEditPostPageRendered(slug, context);
|
|
26
|
+
}
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
const handleClose = () => {
|
|
31
|
+
navigate(`${basePath}/blog`);
|
|
32
|
+
};
|
|
33
|
+
const handleSuccess = (post) => {
|
|
34
|
+
navigate(`${basePath}/blog/${post.slug}`);
|
|
35
|
+
};
|
|
36
|
+
return /* @__PURE__ */ jsxs(PageWrapper, { className: "gap-6", testId: "edit-post-page", children: [
|
|
37
|
+
/* @__PURE__ */ jsx(
|
|
38
|
+
PageHeader,
|
|
39
|
+
{
|
|
40
|
+
title: localization.BLOG_POST_EDIT_TITLE,
|
|
41
|
+
description: localization.BLOG_POST_EDIT_DESCRIPTION
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
45
|
+
EditPostForm,
|
|
46
|
+
{
|
|
47
|
+
postSlug: slug,
|
|
48
|
+
onClose: handleClose,
|
|
49
|
+
onSuccess: handleSuccess
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
] });
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { EditPostPage };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { lazy } from 'react';
|
|
4
|
+
import { usePluginOverrides } from '@btst/stack/context';
|
|
5
|
+
import { ComposedRoute } from '@btst/stack/client/components';
|
|
6
|
+
import { DefaultError } from '../shared/default-error.mjs';
|
|
7
|
+
import { FormLoading } from '../loading/index.mjs';
|
|
8
|
+
import { NotFoundPage } from './404-page.mjs';
|
|
9
|
+
|
|
10
|
+
const EditPostPage = lazy(
|
|
11
|
+
() => import('./edit-post-page.internal.mjs').then((m) => ({
|
|
12
|
+
default: m.EditPostPage
|
|
13
|
+
}))
|
|
14
|
+
);
|
|
15
|
+
function EditPostPageComponent({ slug }) {
|
|
16
|
+
const { onRouteError } = usePluginOverrides("blog");
|
|
17
|
+
return /* @__PURE__ */ jsx(
|
|
18
|
+
ComposedRoute,
|
|
19
|
+
{
|
|
20
|
+
path: `/blog/${slug}/edit`,
|
|
21
|
+
PageComponent: EditPostPage,
|
|
22
|
+
ErrorComponent: DefaultError,
|
|
23
|
+
LoadingComponent: FormLoading,
|
|
24
|
+
NotFoundComponent: NotFoundPage,
|
|
25
|
+
props: { slug },
|
|
26
|
+
onError: (error) => {
|
|
27
|
+
if (onRouteError) {
|
|
28
|
+
onRouteError("editPost", error, {
|
|
29
|
+
path: `/blog/${slug}/edit`,
|
|
30
|
+
isSSR: typeof window === "undefined",
|
|
31
|
+
slug
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { EditPostPageComponent };
|