@yimingliao/cms 0.0.162 → 0.0.164
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/dist/export/client/components/index.js +1 -0
- package/dist/src/client/interfaces/components/resources/post/post-card.js +2 -1
- package/dist/src/client/interfaces/components/ui/cards/feature-card.js +48 -0
- package/dist/src/client/interfaces/components/ui/display/html-display.js +1 -1
- package/dist/types/export/client/components/index.d.ts +1 -1
- package/dist/types/export/client/components/index.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/index.d.ts +1 -1
- package/dist/types/src/client/interfaces/components/index.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/resources/post/post-card.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/ui/cards/feature-card.d.ts +9 -0
- package/dist/types/src/client/interfaces/components/ui/cards/feature-card.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/ui/cards/index.d.ts +1 -0
- package/dist/types/src/client/interfaces/components/ui/cards/index.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/ui/index.d.ts +1 -1
- package/dist/types/src/client/interfaces/components/ui/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ export { Button } from '../../../src/client/interfaces/components/ui/buttons/but
|
|
|
5
5
|
export { ReturnButton } from '../../../src/client/interfaces/components/ui/buttons/return-button.js';
|
|
6
6
|
export { ResourceCard } from '../../../src/client/interfaces/components/ui/cards/resource-card/resource-card.js';
|
|
7
7
|
export { ActionButtonsCard } from '../../../src/client/interfaces/components/ui/cards/action-buttons-card.js';
|
|
8
|
+
export { FeatureCard } from '../../../src/client/interfaces/components/ui/cards/feature-card.js';
|
|
8
9
|
export { ArrayList } from '../../../src/client/interfaces/components/ui/display/array-list.js';
|
|
9
10
|
export { Badge } from '../../../src/client/interfaces/components/ui/display/badge.js';
|
|
10
11
|
export { HtmlDisplay } from '../../../src/client/interfaces/components/ui/display/html-display.js';
|
|
@@ -28,6 +28,7 @@ import '@radix-ui/react-tabs';
|
|
|
28
28
|
import '@radix-ui/react-tooltip';
|
|
29
29
|
import { ResourceCard } from '../../ui/cards/resource-card/resource-card.js';
|
|
30
30
|
import 'next/link';
|
|
31
|
+
import { HtmlDisplay } from '../../ui/display/html-display.js';
|
|
31
32
|
import '../../../../../domain/resources/admin/constants.js';
|
|
32
33
|
import 'next/image';
|
|
33
34
|
import { PostStatusBarIcons } from './post-status-bar-icons.js';
|
|
@@ -78,7 +79,7 @@ function createPostCard({
|
|
|
78
79
|
WebkitMaskImage: "linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 75%)",
|
|
79
80
|
maskImage: "linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 75%)"
|
|
80
81
|
},
|
|
81
|
-
children: translation?.summary
|
|
82
|
+
children: translation?.summary || translation?.description || translation.content && /* @__PURE__ */ jsx(HtmlDisplay, { html: translation.content, textOnly: true })
|
|
82
83
|
}
|
|
83
84
|
)
|
|
84
85
|
},
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import Link from 'next/link';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'ua-parser-js';
|
|
5
|
+
import { cn } from '../../../../applications/shadcn/utils.js';
|
|
6
|
+
import 'next/navigation';
|
|
7
|
+
import '@radix-ui/react-avatar';
|
|
8
|
+
import '../../shadcn/badge.js';
|
|
9
|
+
import '../../shadcn/button.js';
|
|
10
|
+
import { Card } from '../../shadcn/card.js';
|
|
11
|
+
import '@radix-ui/react-collapsible';
|
|
12
|
+
import '@radix-ui/react-dialog';
|
|
13
|
+
import 'lucide-react';
|
|
14
|
+
import '@radix-ui/react-dropdown-menu';
|
|
15
|
+
import '../../shadcn/input-group.js';
|
|
16
|
+
import '../../shadcn/item.js';
|
|
17
|
+
import '@radix-ui/react-label';
|
|
18
|
+
import '@radix-ui/react-select';
|
|
19
|
+
import '@radix-ui/react-separator';
|
|
20
|
+
import '../../shadcn/sidebar.js';
|
|
21
|
+
import 'next-themes';
|
|
22
|
+
import 'sonner';
|
|
23
|
+
import '@radix-ui/react-tabs';
|
|
24
|
+
import '@radix-ui/react-tooltip';
|
|
25
|
+
|
|
26
|
+
function FeatureCard({ className, href = "", text }) {
|
|
27
|
+
return /* @__PURE__ */ jsx(
|
|
28
|
+
Link,
|
|
29
|
+
{
|
|
30
|
+
href,
|
|
31
|
+
className: cn(className, "w-fit", !href && "pointer-events-none"),
|
|
32
|
+
children: /* @__PURE__ */ jsx(
|
|
33
|
+
Card,
|
|
34
|
+
{
|
|
35
|
+
className: cn(
|
|
36
|
+
"hover:bg-accent/50 transition-colors duration-100",
|
|
37
|
+
// button-hover like
|
|
38
|
+
"size-48 overflow-hidden",
|
|
39
|
+
"flex flex-col justify-between"
|
|
40
|
+
),
|
|
41
|
+
children: /* @__PURE__ */ jsx("p", { className: cn(`flex flex-1 items-center justify-center`), children: text })
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { FeatureCard };
|
|
@@ -26,7 +26,7 @@ function HtmlDisplay({
|
|
|
26
26
|
}
|
|
27
27
|
function normalizeHtmlText(html) {
|
|
28
28
|
if (!html) return "";
|
|
29
|
-
return html.replace(/<br\s*\/?>/gi, " ").replace(/<[^>]+>/g, "").replace(/\r?\n|\r/g, " ").replace(/\s{2,}/g, " ").trim();
|
|
29
|
+
return html.replace(/<\/(p|div|li|h[1-6]|tr|td)>/gi, " ").replace(/<br\s*\/?>/gi, " ").replace(/<[^>]+>/g, " ").replace(/\r?\n|\r/g, " ").replace(/\s{2,}/g, " ").trim();
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export { HtmlDisplay };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createAdminInitializer, PageHeader, ListCardsContainer, Button, type ButtonProps, ReturnButton, ActionButtonsCard, ResourceCard, ArrayList, Badge, HtmlDisplay, ObjectArrayList, Accordion, AccordionContainer, createFileInfo, createFilePicker, createFilePreview, createFilePreviewList, createUploader, PickModal, ExternalLink, createSmartImage, Tick, Form, Field, FieldBody, FieldsContainer, MainFields, SideFields, IndexField, SlugField, ControlFields, type ControlMeta, ArrayInput, Checkbox, Input, type InputProps, PasswordInput, SearchInput, Select, Option, Textarea, } from "../../../src/client/interfaces/components";
|
|
1
|
+
export { createAdminInitializer, PageHeader, ListCardsContainer, Button, type ButtonProps, ReturnButton, ActionButtonsCard, ResourceCard, FeatureCard, ArrayList, Badge, HtmlDisplay, ObjectArrayList, Accordion, AccordionContainer, createFileInfo, createFilePicker, createFilePreview, createFilePreviewList, createUploader, PickModal, ExternalLink, createSmartImage, Tick, Form, Field, FieldBody, FieldsContainer, MainFields, SideFields, IndexField, SlugField, ControlFields, type ControlMeta, ArrayInput, Checkbox, Input, type InputProps, PasswordInput, SearchInput, Select, Option, Textarea, } from "../../../src/client/interfaces/components";
|
|
2
2
|
export { createNavbar, createI18nSelector, createSignOutButton, type NavItem, NavMain, SidebarProvider, Sidebar, SidebarInset, SidebarContent, ContentContainer, } from "../../../src/client/interfaces/components/ui/layouts";
|
|
3
3
|
export { createI18nTabsWrapper, createI18nDisplay, createI18nArrayDisplay, createI18nObjectArrayDisplay, createI18nArrayInput, createI18nDateInput, createI18nEditor, createI18nInput, createI18nJsonInput, createI18nNumberInput, createI18nObjectArrayInput, createI18nTextarea, } from "../../../src/client/interfaces/components/ui/i18n";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../export/client/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EAGtB,UAAU,EACV,kBAAkB,EAGlB,MAAM,EACN,KAAK,WAAW,EAChB,YAAY,EAGZ,iBAAiB,EACjB,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../export/client/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EAGtB,UAAU,EACV,kBAAkB,EAGlB,MAAM,EACN,KAAK,WAAW,EAChB,YAAY,EAGZ,iBAAiB,EACjB,YAAY,EACZ,WAAW,EAGX,SAAS,EACT,KAAK,EACL,WAAW,EACX,eAAe,EAGf,SAAS,EACT,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,IAAI,EAGJ,IAAI,EACJ,KAAK,EACL,SAAS,EACT,eAAe,EACf,UAAU,EACV,UAAU,EACV,UAAU,EACV,SAAS,EACT,aAAa,EACb,KAAK,WAAW,EAGhB,UAAU,EACV,QAAQ,EACR,KAAK,EACL,KAAK,UAAU,EACf,aAAa,EACb,WAAW,EACX,MAAM,EACN,MAAM,EACN,QAAQ,GACT,MAAM,2CAA2C,CAAC;AAKnD,OAAO,EAEL,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EAEnB,KAAK,OAAO,EACZ,OAAO,EACP,eAAe,EACf,OAAO,EACP,YAAY,EACZ,cAAc,EAEd,gBAAgB,GACjB,MAAM,sDAAsD,CAAC;AAK9D,OAAO,EACL,qBAAqB,EAErB,iBAAiB,EACjB,sBAAsB,EACtB,4BAA4B,EAE5B,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,0BAA0B,EAC1B,kBAAkB,GACnB,MAAM,mDAAmD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { createAdminInitializer } from "./admin-initializer";
|
|
2
|
-
export { PageHeader, ListCardsContainer, Button, type ButtonProps, ReturnButton, ActionButtonsCard, ResourceCard, ArrayList, Badge, HtmlDisplay, ObjectArrayList, Accordion, AccordionContainer, createFileInfo, createFilePicker, createFilePreview, createFilePreviewList, createUploader, ExternalLink, PickModal, createSmartImage, Tick, Form, Field, FieldBody, FieldsContainer, MainFields, SideFields, IndexField, SlugField, ControlFields, type ControlMeta, ArrayInput, Checkbox, Input, type InputProps, PasswordInput, SearchInput, Select, Option, Textarea, } from "./ui";
|
|
2
|
+
export { PageHeader, ListCardsContainer, Button, type ButtonProps, ReturnButton, ActionButtonsCard, ResourceCard, FeatureCard, ArrayList, Badge, HtmlDisplay, ObjectArrayList, Accordion, AccordionContainer, createFileInfo, createFilePicker, createFilePreview, createFilePreviewList, createUploader, ExternalLink, PickModal, createSmartImage, Tick, Form, Field, FieldBody, FieldsContainer, MainFields, SideFields, IndexField, SlugField, ControlFields, type ControlMeta, ArrayInput, Checkbox, Input, type InputProps, PasswordInput, SearchInput, Select, Option, Textarea, } from "./ui";
|
|
3
3
|
export { createFileCard, createFileList } from "./resources";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/client/interfaces/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAEL,UAAU,EACV,kBAAkB,EAElB,MAAM,EACN,KAAK,WAAW,EAChB,YAAY,EAEZ,iBAAiB,EACjB,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/client/interfaces/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAEL,UAAU,EACV,kBAAkB,EAElB,MAAM,EACN,KAAK,WAAW,EAChB,YAAY,EAEZ,iBAAiB,EACjB,YAAY,EACZ,WAAW,EAEX,SAAS,EACT,KAAK,EACL,WAAW,EACX,eAAe,EAEf,SAAS,EACT,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,IAAI,EAEJ,IAAI,EACJ,KAAK,EACL,SAAS,EACT,eAAe,EACf,UAAU,EACV,UAAU,EACV,UAAU,EACV,SAAS,EACT,aAAa,EACb,KAAK,WAAW,EAEhB,UAAU,EACV,QAAQ,EACR,KAAK,EACL,KAAK,UAAU,EACf,aAAa,EACb,WAAW,EACX,MAAM,EACN,MAAM,EACN,QAAQ,GACT,MAAM,MAAM,CAAC;AAEd,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-card.d.ts","sourceRoot":"","sources":["../../../../../../../../src/client/interfaces/components/resources/post/post-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAQ5C,UAAU,aAAa;IACrB,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;CAC/C;AAED,wBAAgB,cAAc,CAAC,EAC7B,UAAU,GACX,EAAE;IACD,UAAU,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;CACjD,IAC0B,+CAOtB,aAAa,
|
|
1
|
+
{"version":3,"file":"post-card.d.ts","sourceRoot":"","sources":["../../../../../../../../src/client/interfaces/components/resources/post/post-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAQ5C,UAAU,aAAa;IACrB,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;CAC/C;AAED,wBAAgB,cAAc,CAAC,EAC7B,UAAU,GACX,EAAE;IACD,UAAU,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;CACjD,IAC0B,+CAOtB,aAAa,6CAwEjB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
interface FeatureCardProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
href?: string;
|
|
5
|
+
text: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function FeatureCard({ className, href, text }: FeatureCardProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=feature-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-card.d.ts","sourceRoot":"","sources":["../../../../../../../../src/client/interfaces/components/ui/cards/feature-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,UAAU,gBAAgB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,IAAS,EAAE,IAAI,EAAE,EAAE,gBAAgB,2CAkB3E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/client/interfaces/components/ui/cards/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/client/interfaces/components/ui/cards/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { PageHeader, ListCardsContainer } from "./blocks";
|
|
2
2
|
export { Button, type ButtonProps, ReturnButton } from "./buttons";
|
|
3
|
-
export { ActionButtonsCard, ResourceCard } from "./cards";
|
|
3
|
+
export { ActionButtonsCard, ResourceCard, FeatureCard } from "./cards";
|
|
4
4
|
export { ArrayList, Badge, HtmlDisplay, ObjectArrayList } from "./display";
|
|
5
5
|
export { Accordion, AccordionContainer, createFileInfo, createFilePicker, createFilePreview, createFilePreviewList, createUploader, ExternalLink, PickModal, createSmartImage, Tick, } from "./features";
|
|
6
6
|
export { Form, Field, FieldBody, FieldsContainer, MainFields, SideFields, IndexField, SlugField, ControlFields, type ControlMeta, } from "./form";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/client/interfaces/components/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/client/interfaces/components/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC3E,OAAO,EACL,SAAS,EACT,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,IAAI,GACL,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,IAAI,EACJ,KAAK,EACL,SAAS,EACT,eAAe,EACf,UAAU,EACV,UAAU,EACV,UAAU,EACV,SAAS,EACT,aAAa,EACb,KAAK,WAAW,GACjB,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,UAAU,EACV,QAAQ,EACR,KAAK,EACL,KAAK,UAAU,EACf,aAAa,EACb,WAAW,EACX,MAAM,EACN,MAAM,EACN,QAAQ,GACT,MAAM,UAAU,CAAC"}
|