@rimelight/ui 0.0.7 → 0.0.8

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/src/nuxt.ts ADDED
@@ -0,0 +1,125 @@
1
+ // Components
2
+ export { default as Accordion } from "@nuxt/ui/components/Accordion.vue";
3
+ export { default as Alert } from "@nuxt/ui/components/Alert.vue";
4
+ export { default as App } from "@nuxt/ui/components/App.vue";
5
+ export { default as AuthForm } from "@nuxt/ui/components/AuthForm.vue";
6
+ export { default as Avatar } from "@nuxt/ui/components/Avatar.vue";
7
+ export { default as AvatarGroup } from "@nuxt/ui/components/AvatarGroup.vue";
8
+ export { default as Badge } from "@nuxt/ui/components/Badge.vue";
9
+ export { default as Banner } from "@nuxt/ui/components/Banner.vue";
10
+ export { default as BlogPost } from "@nuxt/ui/components/BlogPost.vue";
11
+ export { default as BlogPosts } from "@nuxt/ui/components/BlogPosts.vue";
12
+ export { default as Breadcrumb } from "@nuxt/ui/components/Breadcrumb.vue";
13
+ export { default as Button } from "@nuxt/ui/components/Button.vue";
14
+ export { default as Calendar } from "@nuxt/ui/components/Calendar.vue";
15
+ export { default as Card } from "@nuxt/ui/components/Card.vue";
16
+ export { default as Carousel } from "@nuxt/ui/components/Carousel.vue";
17
+ export { default as ChangelogVersion } from "@nuxt/ui/components/ChangelogVersion.vue";
18
+ export { default as ChangelogVersions } from "@nuxt/ui/components/ChangelogVersions.vue";
19
+ export { default as ChatMessage } from "@nuxt/ui/components/ChatMessage.vue";
20
+ export { default as ChatMessages } from "@nuxt/ui/components/ChatMessages.vue";
21
+ export { default as ChatPalette } from "@nuxt/ui/components/ChatPalette.vue";
22
+ export { default as ChatPrompt } from "@nuxt/ui/components/ChatPrompt.vue";
23
+ export { default as ChatPromptSubmit } from "@nuxt/ui/components/ChatPromptSubmit.vue";
24
+ export { default as ChatReasoning } from "@nuxt/ui/components/ChatReasoning.vue";
25
+ export { default as ChatShimmer } from "@nuxt/ui/components/ChatShimmer.vue";
26
+ export { default as ChatTool } from "@nuxt/ui/components/ChatTool.vue";
27
+ export { default as Checkbox } from "@nuxt/ui/components/Checkbox.vue";
28
+ export { default as CheckboxGroup } from "@nuxt/ui/components/CheckboxGroup.vue";
29
+ export { default as Chip } from "@nuxt/ui/components/Chip.vue";
30
+ export { default as Collapsible } from "@nuxt/ui/components/Collapsible.vue";
31
+ export { default as ColorPicker } from "@nuxt/ui/components/ColorPicker.vue";
32
+ export { default as CommandPalette } from "@nuxt/ui/components/CommandPalette.vue";
33
+ export { default as Container } from "@nuxt/ui/components/Container.vue";
34
+ export { default as ContextMenu } from "@nuxt/ui/components/ContextMenu.vue";
35
+ export { default as DashboardGroup } from "@nuxt/ui/components/DashboardGroup.vue";
36
+ export { default as DashboardNavbar } from "@nuxt/ui/components/DashboardNavbar.vue";
37
+ export { default as DashboardPanel } from "@nuxt/ui/components/DashboardPanel.vue";
38
+ export { default as DashboardResizeHandle } from "@nuxt/ui/components/DashboardResizeHandle.vue";
39
+ export { default as DashboardSearch } from "@nuxt/ui/components/DashboardSearch.vue";
40
+ export { default as DashboardSearchButton } from "@nuxt/ui/components/DashboardSearchButton.vue";
41
+ export { default as DashboardSidebar } from "@nuxt/ui/components/DashboardSidebar.vue";
42
+ export { default as DashboardSidebarCollapse } from "@nuxt/ui/components/DashboardSidebarCollapse.vue";
43
+ export { default as DashboardSidebarToggle } from "@nuxt/ui/components/DashboardSidebarToggle.vue";
44
+ export { default as DashboardToolbar } from "@nuxt/ui/components/DashboardToolbar.vue";
45
+ export { default as Drawer } from "@nuxt/ui/components/Drawer.vue";
46
+ export { default as DropdownMenu } from "@nuxt/ui/components/DropdownMenu.vue";
47
+ export { default as Editor } from "@nuxt/ui/components/Editor.vue";
48
+ export { default as EditorDragHandle } from "@nuxt/ui/components/EditorDragHandle.vue";
49
+ export { default as EditorEmojiMenu } from "@nuxt/ui/components/EditorEmojiMenu.vue";
50
+ export { default as EditorMentionMenu } from "@nuxt/ui/components/EditorMentionMenu.vue";
51
+ export { default as EditorSuggestionMenu } from "@nuxt/ui/components/EditorSuggestionMenu.vue";
52
+ export { default as EditorToolbar } from "@nuxt/ui/components/EditorToolbar.vue";
53
+ export { default as Empty } from "@nuxt/ui/components/Empty.vue";
54
+ export { default as Error } from "@nuxt/ui/components/Error.vue";
55
+ export { default as FieldGroup } from "@nuxt/ui/components/FieldGroup.vue";
56
+ export { default as FileUpload } from "@nuxt/ui/components/FileUpload.vue";
57
+ export { default as Footer } from "@nuxt/ui/components/Footer.vue";
58
+ export { default as FooterColumns } from "@nuxt/ui/components/FooterColumns.vue";
59
+ export { default as Form } from "@nuxt/ui/components/Form.vue";
60
+ export { default as FormField } from "@nuxt/ui/components/FormField.vue";
61
+ export { default as Header } from "@nuxt/ui/components/Header.vue";
62
+ export { default as Icon } from "@nuxt/ui/components/Icon.vue";
63
+ export { default as Input } from "@nuxt/ui/components/Input.vue";
64
+ export { default as InputDate } from "@nuxt/ui/components/InputDate.vue";
65
+ export { default as InputMenu } from "@nuxt/ui/components/InputMenu.vue";
66
+ export { default as InputNumber } from "@nuxt/ui/components/InputNumber.vue";
67
+ export { default as InputTags } from "@nuxt/ui/components/InputTags.vue";
68
+ export { default as InputTime } from "@nuxt/ui/components/InputTime.vue";
69
+ export { default as Kbd } from "@nuxt/ui/components/Kbd.vue";
70
+ export { default as Link } from "@nuxt/ui/components/Link.vue";
71
+ export { default as Main } from "@nuxt/ui/components/Main.vue";
72
+ export { default as Marquee } from "@nuxt/ui/components/Marquee.vue";
73
+ export { default as Modal } from "@nuxt/ui/components/Modal.vue";
74
+ export { default as NavigationMenu } from "@nuxt/ui/components/NavigationMenu.vue";
75
+ export { default as Page } from "@nuxt/ui/components/Page.vue";
76
+ export { default as PageAnchors } from "@nuxt/ui/components/PageAnchors.vue";
77
+ export { default as PageAside } from "@nuxt/ui/components/PageAside.vue";
78
+ export { default as PageBody } from "@nuxt/ui/components/PageBody.vue";
79
+ export { default as PageCard } from "@nuxt/ui/components/PageCard.vue";
80
+ export { default as PageColumns } from "@nuxt/ui/components/PageColumns.vue";
81
+ export { default as PageCTA } from "@nuxt/ui/components/PageCTA.vue";
82
+ export { default as PageFeature } from "@nuxt/ui/components/PageFeature.vue";
83
+ export { default as PageGrid } from "@nuxt/ui/components/PageGrid.vue";
84
+ export { default as PageHeader } from "@nuxt/ui/components/PageHeader.vue";
85
+ export { default as PageHero } from "@nuxt/ui/components/PageHero.vue";
86
+ export { default as PageLinks } from "@nuxt/ui/components/PageLinks.vue";
87
+ export { default as PageList } from "@nuxt/ui/components/PageList.vue";
88
+ export { default as PageLogos } from "@nuxt/ui/components/PageLogos.vue";
89
+ export { default as PageSection } from "@nuxt/ui/components/PageSection.vue";
90
+ export { default as Pagination } from "@nuxt/ui/components/Pagination.vue";
91
+ export { default as PinInput } from "@nuxt/ui/components/PinInput.vue";
92
+ export { default as Popover } from "@nuxt/ui/components/Popover.vue";
93
+ export { default as PricingPlan } from "@nuxt/ui/components/PricingPlan.vue";
94
+ export { default as PricingPlans } from "@nuxt/ui/components/PricingPlans.vue";
95
+ export { default as PricingTable } from "@nuxt/ui/components/PricingTable.vue";
96
+ export { default as Progress } from "@nuxt/ui/components/Progress.vue";
97
+ export { default as RadioGroup } from "@nuxt/ui/components/RadioGroup.vue";
98
+ export { default as ScrollArea } from "@nuxt/ui/components/ScrollArea.vue";
99
+ export { default as Select } from "@nuxt/ui/components/Select.vue";
100
+ export { default as SelectMenu } from "@nuxt/ui/components/SelectMenu.vue";
101
+ export { default as Separator } from "@nuxt/ui/components/Separator.vue";
102
+ export { default as Sidebar } from "@nuxt/ui/components/Sidebar.vue";
103
+ export { default as Skeleton } from "@nuxt/ui/components/Skeleton.vue";
104
+ export { default as Slideover } from "@nuxt/ui/components/Slideover.vue";
105
+ export { default as Slider } from "@nuxt/ui/components/Slider.vue";
106
+ export { default as Stepper } from "@nuxt/ui/components/Stepper.vue";
107
+ export { default as Switch } from "@nuxt/ui/components/Switch.vue";
108
+ export { default as Table } from "@nuxt/ui/components/Table.vue";
109
+ export { default as Tabs } from "@nuxt/ui/components/Tabs.vue";
110
+ export { default as Textarea } from "@nuxt/ui/components/Textarea.vue";
111
+ export { default as Timeline } from "@nuxt/ui/components/Timeline.vue";
112
+ export { default as Toast } from "@nuxt/ui/components/Toast.vue";
113
+ export { default as Toaster } from "@nuxt/ui/components/Toaster.vue";
114
+ export { default as Tooltip } from "@nuxt/ui/components/Tooltip.vue";
115
+ export { default as Tree } from "@nuxt/ui/components/Tree.vue";
116
+ export { default as User } from "@nuxt/ui/components/User.vue";
117
+ export { default as ColorModeAvatar } from "@nuxt/ui/components/color-mode/ColorModeAvatar.vue";
118
+ export { default as ColorModeButton } from "@nuxt/ui/components/color-mode/ColorModeButton.vue";
119
+ export { default as ColorModeImage } from "@nuxt/ui/components/color-mode/ColorModeImage.vue";
120
+ export { default as ColorModeSelect } from "@nuxt/ui/components/color-mode/ColorModeSelect.vue";
121
+ export { default as ColorModeSwitch } from "@nuxt/ui/components/color-mode/ColorModeSwitch.vue";
122
+ export { default as LocaleSelect } from "@nuxt/ui/components/locale/LocaleSelect.vue";
123
+
124
+ // Explicitly allowed composables
125
+ export * from "@nuxt/ui/composables/defineShortcuts";
@@ -1,195 +0,0 @@
1
- ---
2
- import { Image } from "astro:assets";
3
- import { scv } from "css-variants";
4
- import type { CollectionEntry } from "astro:content";
5
- import Separator from "@rimelight/ui/components/separator/Separator.astro";
6
- import Avatar from "@rimelight/ui/components/avatar/Avatar.astro";
7
- import AvatarImage from "@rimelight/ui/components/avatar/AvatarImage.astro";
8
- import avatarAsset from "../assets/team/Daniel-Marchi_0000_00.webp";
9
-
10
- // Support both Astro content collections and CMS documents
11
- export type CMSPostDocument = {
12
- _id: string;
13
- slug?: string;
14
- title: string;
15
- excerpt?: string;
16
- description?: string;
17
- image?: string;
18
- publishedDate?: string | Date | null;
19
- featured?: boolean;
20
- _updatedAt?: string;
21
- _createdAt?: string;
22
- };
23
-
24
- export interface BlogPostProps extends NonNullable<Parameters<typeof blogPostVariants>[0]> {
25
- post: CollectionEntry<"blog"> | CMSPostDocument;
26
- class?: string;
27
- showImage?: boolean;
28
- separator?: boolean;
29
- /** Translations for the component */
30
- t?: {
31
- latest?: string;
32
- read_article?: string;
33
- };
34
- /** The current locale for formatting and links */
35
- locale?: string;
36
- }
37
-
38
- type Props = BlogPostProps;
39
-
40
- const blogPostVariants = scv({
41
- slots: [
42
- "root",
43
- "imageWrapper",
44
- "image",
45
- "content",
46
- "title",
47
- "description",
48
- "footer",
49
- "authorGroup",
50
- "author",
51
- "link",
52
- "badge",
53
- "featuredBadge"
54
- ],
55
- base: {
56
- root: "group flex transition-all duration-300 w-full",
57
- imageWrapper: "relative overflow-hidden ring-1 ring-border shadow-sm shrink-0 bg-muted isolate",
58
- image: "absolute inset-0 h-full w-full !object-cover transition-transform duration-500 group-hover:scale-105 block",
59
- content: "flex flex-col flex-1",
60
- title: "font-heading font-bold tracking-tight text-pretty group-hover:text-primary transition-colors",
61
- description: "text-muted-foreground line-clamp-2 text-base text-pretty",
62
- footer: "mt-auto flex items-end justify-end w-full",
63
- authorGroup: "flex flex-col gap-5xs text-xs font-medium text-muted-foreground",
64
- author: "font-bold text-foreground",
65
- link: "inline-flex items-center gap-5xs text-sm font-semibold hover:underline decoration-primary underline-offset-4",
66
- badge: "px-2xs py-6xs rounded-full bg-muted text-muted-foreground text-[10px] font-bold uppercase tracking-wider",
67
- featuredBadge: "absolute top-3 left-3 z-20 flex items-center gap-5xs px-3xs py-5xs rounded-full bg-primary text-primary-foreground text-[10px] font-bold uppercase tracking-wider shadow-lg ring-1 ring-white/20",
68
- },
69
- variants: {
70
- variant: {
71
- flat: {
72
- root: "flex-col md:flex-row gap-3xl md:gap-4xl items-stretch py-4xl first:pt-0 last:pb-0 text-left",
73
- imageWrapper: "w-full md:w-5/12 aspect-video self-stretch rounded-3xl shrink-0 shadow-none ring-0",
74
- content: "gap-2xl justify-center items-start text-left",
75
- title: "text-xl",
76
- description: "text-base",
77
- },
78
- card: {
79
- root: "flex-col bg-muted/20 p-2xl rounded-3xl border border-border/50 hover:bg-muted/40 hover:shadow-2xl hover:-translate-y-1 gap-2xl text-left items-stretch",
80
- imageWrapper: "w-full aspect-video rounded-2xl shadow-lg",
81
- title: "text-xl",
82
- content: "gap-2xl text-left items-start",
83
- },
84
- },
85
- },
86
- defaultVariants: {
87
- variant: "flat",
88
- },
89
- });
90
-
91
- const {
92
- post,
93
- variant,
94
- class: className,
95
- showImage = true,
96
- separator = false,
97
- t: tProp,
98
- locale = Astro.locals.astroI18n?.locale || "en"
99
- } = Astro.props;
100
-
101
- const t = {
102
- latest: tProp?.latest || (Astro.locals.astroI18n ? Astro.locals.astroI18n.t("blog.latest") : "Latest"),
103
- read_article: tProp?.read_article || (Astro.locals.astroI18n ? Astro.locals.astroI18n.t("blog.read_article") : "Read Article"),
104
- };
105
-
106
- // Detect if this is a CMS document or Astro content entry
107
- const isCMSDocument = "_id" in post && !("id" in post);
108
-
109
- // Extract fields based on source type
110
- const postTitle = isCMSDocument ? post.title : (post as CollectionEntry<"blog">).data.title;
111
- const postDescription = isCMSDocument ? (post.description || post.excerpt) : (post as CollectionEntry<"blog">).data.description;
112
- const postImage = isCMSDocument ? post.image : (post as CollectionEntry<"blog">).data.heroImage;
113
- const postFeatured = isCMSDocument ? (post.featured ?? false) : (post as CollectionEntry<"blog">).data.featured;
114
-
115
- // Handle date formatting
116
- const rawDate = isCMSDocument ? (post.publishedDate || post._createdAt) : (post as CollectionEntry<"blog">).data.publishedDate;
117
- const d = rawDate ? new Date(rawDate) : null;
118
- const formattedDate = d && !isNaN(d.getTime())
119
- ? new Intl.DateTimeFormat(locale, {
120
- dateStyle: "medium",
121
- }).format(d)
122
- : "";
123
-
124
- // Get slug from CMS or Astro content
125
- const postSlug = isCMSDocument
126
- ? (post.slug || "")
127
- : (post as CollectionEntry<"blog">).id.replace(/^(en|pt|de|es|ja)\//, "");
128
-
129
- const { root, imageWrapper, image, content, title, description, footer, authorGroup, author, link, badge, featuredBadge } = blogPostVariants({ variant });
130
- ---
131
-
132
- <div class="flex flex-col w-full">
133
- <a href={Astro.locals.astroI18n ? Astro.locals.astroI18n.l(`/blog/${postSlug}`) : `/${locale}/blog/${postSlug}`} class:list={[root, className]}>
134
- {showImage && (
135
- <div class={imageWrapper}>
136
- {postFeatured && (
137
- <div class={featuredBadge}>
138
- <svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"></path></svg>
139
- {t.latest}
140
- </div>
141
- )}
142
- {postImage && (
143
- <Image
144
- src={postImage as any}
145
- alt={postTitle}
146
- width={800}
147
- height={450}
148
- class={image}
149
- loading="lazy"
150
- decoding="async"
151
- />
152
- )}
153
- </div>
154
- )}
155
-
156
- <div class={content}>
157
- <h3 class={title}>
158
- {postTitle}
159
- </h3>
160
-
161
- <div class="flex items-center gap-3xs mt-3xs">
162
- <Avatar size="sm" variant="primary">
163
- <AvatarImage image={avatarAsset} alt="Daniel Marchi" />
164
- </Avatar>
165
- <div class={authorGroup}>
166
- <span class={author}>Daniel Marchi</span>
167
- <div class="flex items-center gap-3xs">
168
- <span>{formattedDate}</span>
169
- <div class="flex flex-wrap gap-5xs ml-3xs">
170
- <span class={badge}>Engineering</span>
171
- <span class={badge}>Astro</span>
172
- </div>
173
- </div>
174
- </div>
175
- </div>
176
-
177
- <p class={description}>
178
- {postDescription}
179
- </p>
180
-
181
- <div class={footer}>
182
- <span class={link}>
183
- {t.read_article}
184
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="transition-transform group-hover:translate-x-1"><path d="M5 12h14"></path><path d="m12 5 7 7-7 7"></path></svg>
185
- </span>
186
- </div>
187
- </div>
188
- </a>
189
-
190
- {separator && (
191
- <div class="py-4xl last:hidden">
192
- <Separator />
193
- </div>
194
- )}
195
- </div>