@rimelight/ui 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (310) hide show
  1. package/package.json +36 -6
  2. package/src/components/BlogPost.astro +181 -0
  3. package/src/components/DynamicShowcase.astro +681 -0
  4. package/src/components/ExtendedCarousel.astro +107 -0
  5. package/src/components/Head.astro +150 -0
  6. package/src/components/LanguageSwitcher.astro +128 -0
  7. package/src/components/ProjectPost.astro +183 -0
  8. package/src/components/RLHead.astro +3 -0
  9. package/src/components/ThemeToggle.astro +30 -42
  10. package/src/components/astro/RLAButton.astro +85 -0
  11. package/src/components/astro/RLAHeader.astro +75 -0
  12. package/src/components/vue/RLVButton.vue +90 -0
  13. package/src/components/vue/RLVHeader.vue +78 -0
  14. package/src/composables/index.ts +1 -0
  15. package/src/composables/useUi.ts +27 -0
  16. package/src/config/index.ts +0 -2
  17. package/src/config/site.config.ts +1 -1
  18. package/src/env.d.ts +9 -42
  19. package/src/integrations/index.ts +2 -0
  20. package/src/integrations/ui.ts +87 -0
  21. package/src/themes/button.theme.ts +361 -0
  22. package/src/themes/header.theme.ts +33 -0
  23. package/src/themes/index.ts +13 -0
  24. package/src/utils/index.ts +3 -2
  25. package/i18n-data.json +0 -186
  26. package/src/components/accordion/Accordion.astro +0 -257
  27. package/src/components/accordion/AccordionContent.astro +0 -34
  28. package/src/components/accordion/AccordionItem.astro +0 -29
  29. package/src/components/accordion/AccordionTrigger.astro +0 -33
  30. package/src/components/alert/Alert.astro +0 -34
  31. package/src/components/alert/AlertDescription.astro +0 -15
  32. package/src/components/alert/AlertTitle.astro +0 -17
  33. package/src/components/alert-dialog/AlertDialog.astro +0 -275
  34. package/src/components/alert-dialog/AlertDialogAction.astro +0 -46
  35. package/src/components/alert-dialog/AlertDialogCancel.astro +0 -46
  36. package/src/components/alert-dialog/AlertDialogContent.astro +0 -52
  37. package/src/components/alert-dialog/AlertDialogDescription.astro +0 -18
  38. package/src/components/alert-dialog/AlertDialogFooter.astro +0 -16
  39. package/src/components/alert-dialog/AlertDialogHeader.astro +0 -14
  40. package/src/components/alert-dialog/AlertDialogTitle.astro +0 -20
  41. package/src/components/alert-dialog/AlertDialogTrigger.astro +0 -47
  42. package/src/components/aspect-ratio/AspectRatio.astro +0 -32
  43. package/src/components/avatar/Avatar.astro +0 -29
  44. package/src/components/avatar/AvatarFallback.astro +0 -18
  45. package/src/components/avatar/AvatarImage.astro +0 -66
  46. package/src/components/badge/Badge.astro +0 -57
  47. package/src/components/breadcrumb/Breadcrumb.astro +0 -12
  48. package/src/components/breadcrumb/BreadcrumbEllipsis.astro +0 -29
  49. package/src/components/breadcrumb/BreadcrumbItem.astro +0 -15
  50. package/src/components/breadcrumb/BreadcrumbLink.astro +0 -24
  51. package/src/components/breadcrumb/BreadcrumbList.astro +0 -17
  52. package/src/components/breadcrumb/BreadcrumbPage.astro +0 -22
  53. package/src/components/breadcrumb/BreadcrumbSeparator.astro +0 -24
  54. package/src/components/button/Button.astro +0 -58
  55. package/src/components/button-group/ButtonGroup.astro +0 -64
  56. package/src/components/button-group/ButtonGroupSeparator.astro +0 -20
  57. package/src/components/button-group/ButtonGroupText.astro +0 -19
  58. package/src/components/card/Card.astro +0 -36
  59. package/src/components/card/CardAction.astro +0 -16
  60. package/src/components/card/CardContent.astro +0 -16
  61. package/src/components/card/CardDescription.astro +0 -16
  62. package/src/components/card/CardFooter.astro +0 -16
  63. package/src/components/card/CardHeader.astro +0 -19
  64. package/src/components/card/CardTitle.astro +0 -16
  65. package/src/components/carousel/Carousel.astro +0 -55
  66. package/src/components/carousel/CarouselContent.astro +0 -26
  67. package/src/components/carousel/CarouselItem.astro +0 -26
  68. package/src/components/carousel/CarouselNext.astro +0 -39
  69. package/src/components/carousel/CarouselPrevious.astro +0 -41
  70. package/src/components/carousel/carousel-script.ts +0 -188
  71. package/src/components/carousel/index.ts +0 -1
  72. package/src/components/checkbox/Checkbox.astro +0 -133
  73. package/src/components/collapsible/Collapsible.astro +0 -161
  74. package/src/components/collapsible/CollapsibleContent.astro +0 -22
  75. package/src/components/collapsible/CollapsibleTrigger.astro +0 -44
  76. package/src/components/dialog/Dialog.astro +0 -389
  77. package/src/components/dialog/DialogClose.astro +0 -35
  78. package/src/components/dialog/DialogContent.astro +0 -78
  79. package/src/components/dialog/DialogDescription.astro +0 -14
  80. package/src/components/dialog/DialogFooter.astro +0 -14
  81. package/src/components/dialog/DialogHeader.astro +0 -14
  82. package/src/components/dialog/DialogTitle.astro +0 -18
  83. package/src/components/dialog/DialogTrigger.astro +0 -47
  84. package/src/components/dropdown/Dropdown.astro +0 -604
  85. package/src/components/dropdown/DropdownContent.astro +0 -118
  86. package/src/components/dropdown/DropdownItem.astro +0 -48
  87. package/src/components/dropdown/DropdownLabel.astro +0 -29
  88. package/src/components/dropdown/DropdownSeparator.astro +0 -21
  89. package/src/components/dropdown/DropdownShortcut.astro +0 -17
  90. package/src/components/dropdown/DropdownSub.astro +0 -15
  91. package/src/components/dropdown/DropdownSubContent.astro +0 -39
  92. package/src/components/dropdown/DropdownSubTrigger.astro +0 -34
  93. package/src/components/dropdown/DropdownTrigger.astro +0 -52
  94. package/src/components/dropzone/Dropzone.astro +0 -236
  95. package/src/components/dropzone/DropzoneFilesList.astro +0 -26
  96. package/src/components/dropzone/DropzoneLoadingIndicator.astro +0 -10
  97. package/src/components/dropzone/DropzoneUploadIndicator.astro +0 -10
  98. package/src/components/embeds/YoutubeEmbed.astro +0 -94
  99. package/src/components/hero/Hero.astro +0 -166
  100. package/src/components/icons/Flag.astro +0 -62
  101. package/src/components/image/ExtendedImage.astro +0 -46
  102. package/src/components/image/Image.astro +0 -25
  103. package/src/components/input/Input.astro +0 -27
  104. package/src/components/input-group/InputGroup.astro +0 -28
  105. package/src/components/input-group/InputGroupAddon.astro +0 -76
  106. package/src/components/input-group/InputGroupButton.astro +0 -36
  107. package/src/components/input-group/InputGroupInput.astro +0 -18
  108. package/src/components/input-group/InputGroupText.astro +0 -17
  109. package/src/components/input-group/InputGroupTextarea.astro +0 -22
  110. package/src/components/input-otp/InputOtp.astro +0 -352
  111. package/src/components/input-otp/InputOtpGroup.astro +0 -16
  112. package/src/components/input-otp/InputOtpSeparator.astro +0 -25
  113. package/src/components/input-otp/InputOtpSlot.astro +0 -50
  114. package/src/components/input-otp/InputOtpTypes.ts +0 -6
  115. package/src/components/item/Item.astro +0 -52
  116. package/src/components/item/ItemActions.astro +0 -16
  117. package/src/components/item/ItemContent.astro +0 -16
  118. package/src/components/item/ItemDescription.astro +0 -19
  119. package/src/components/item/ItemFooter.astro +0 -16
  120. package/src/components/item/ItemGroup.astro +0 -16
  121. package/src/components/item/ItemHeader.astro +0 -16
  122. package/src/components/item/ItemMedia.astro +0 -40
  123. package/src/components/item/ItemSeparator.astro +0 -23
  124. package/src/components/item/ItemTitle.astro +0 -16
  125. package/src/components/kbd/Kbd.astro +0 -21
  126. package/src/components/kbd/KbdGroup.astro +0 -16
  127. package/src/components/label/Label.astro +0 -24
  128. package/src/components/marquee/Marquee.astro +0 -73
  129. package/src/components/native-select/NativeSelect.astro +0 -68
  130. package/src/components/native-select/NativeSelectOptGroup.astro +0 -15
  131. package/src/components/native-select/NativeSelectOption.astro +0 -15
  132. package/src/components/pagination/Pagination.astro +0 -20
  133. package/src/components/pagination/PaginationContent.astro +0 -16
  134. package/src/components/pagination/PaginationEllipsis.astro +0 -37
  135. package/src/components/pagination/PaginationItem.astro +0 -16
  136. package/src/components/pagination/PaginationLink.astro +0 -27
  137. package/src/components/pagination/PaginationNext.astro +0 -33
  138. package/src/components/pagination/PaginationPrevious.astro +0 -33
  139. package/src/components/popover/Popover.astro +0 -717
  140. package/src/components/popover/PopoverContent.astro +0 -102
  141. package/src/components/popover/PopoverDescription.astro +0 -14
  142. package/src/components/popover/PopoverHeader.astro +0 -14
  143. package/src/components/popover/PopoverTitle.astro +0 -14
  144. package/src/components/popover/PopoverTrigger.astro +0 -51
  145. package/src/components/progress/Progress.astro +0 -154
  146. package/src/components/prose/Prose.astro +0 -619
  147. package/src/components/radio-group/RadioGroup.astro +0 -162
  148. package/src/components/radio-group/RadioGroupItem.astro +0 -133
  149. package/src/components/radio-group/RadioGroupTypes.ts +0 -6
  150. package/src/components/section/Section.astro +0 -167
  151. package/src/components/select/Select.astro +0 -752
  152. package/src/components/select/SelectContent.astro +0 -94
  153. package/src/components/select/SelectGroup.astro +0 -9
  154. package/src/components/select/SelectItem.astro +0 -51
  155. package/src/components/select/SelectLabel.astro +0 -14
  156. package/src/components/select/SelectSearch.astro +0 -49
  157. package/src/components/select/SelectSeparator.astro +0 -12
  158. package/src/components/select/SelectTrigger.astro +0 -56
  159. package/src/components/select/SelectTypes.ts +0 -13
  160. package/src/components/select/SelectValue.astro +0 -19
  161. package/src/components/separator/Separator.astro +0 -36
  162. package/src/components/sheet/Sheet.astro +0 -15
  163. package/src/components/sheet/SheetClose.astro +0 -15
  164. package/src/components/sheet/SheetContent.astro +0 -89
  165. package/src/components/sheet/SheetDescription.astro +0 -16
  166. package/src/components/sheet/SheetFooter.astro +0 -16
  167. package/src/components/sheet/SheetHeader.astro +0 -16
  168. package/src/components/sheet/SheetTitle.astro +0 -16
  169. package/src/components/sheet/SheetTrigger.astro +0 -15
  170. package/src/components/sidebar/Sidebar.astro +0 -231
  171. package/src/components/sidebar/SidebarContent.astro +0 -25
  172. package/src/components/sidebar/SidebarFooter.astro +0 -22
  173. package/src/components/sidebar/SidebarGroup.astro +0 -22
  174. package/src/components/sidebar/SidebarGroupContent.astro +0 -22
  175. package/src/components/sidebar/SidebarGroupLabel.astro +0 -53
  176. package/src/components/sidebar/SidebarHeader.astro +0 -22
  177. package/src/components/sidebar/SidebarInput.astro +0 -24
  178. package/src/components/sidebar/SidebarInset.astro +0 -22
  179. package/src/components/sidebar/SidebarMenu.astro +0 -22
  180. package/src/components/sidebar/SidebarMenuAction.astro +0 -63
  181. package/src/components/sidebar/SidebarMenuBadge.astro +0 -31
  182. package/src/components/sidebar/SidebarMenuButton.astro +0 -124
  183. package/src/components/sidebar/SidebarMenuItem.astro +0 -22
  184. package/src/components/sidebar/SidebarMenuSkeleton.astro +0 -43
  185. package/src/components/sidebar/SidebarMenuSub.astro +0 -25
  186. package/src/components/sidebar/SidebarMenuSubButton.astro +0 -52
  187. package/src/components/sidebar/SidebarMenuSubItem.astro +0 -17
  188. package/src/components/sidebar/SidebarProvider.astro +0 -215
  189. package/src/components/sidebar/SidebarRail.astro +0 -72
  190. package/src/components/sidebar/SidebarSeparator.astro +0 -25
  191. package/src/components/sidebar/SidebarTrigger.astro +0 -69
  192. package/src/components/skeleton/Skeleton.astro +0 -14
  193. package/src/components/slider/Slider.astro +0 -425
  194. package/src/components/spinner/Spinner.astro +0 -23
  195. package/src/components/switch/Switch.astro +0 -192
  196. package/src/components/switch/SwitchTypes.ts +0 -6
  197. package/src/components/table/Table.astro +0 -20
  198. package/src/components/table/TableBody.astro +0 -18
  199. package/src/components/table/TableCaption.astro +0 -18
  200. package/src/components/table/TableCell.astro +0 -18
  201. package/src/components/table/TableFoot.astro +0 -18
  202. package/src/components/table/TableHead.astro +0 -18
  203. package/src/components/table/TableHeader.astro +0 -18
  204. package/src/components/table/TableRow.astro +0 -17
  205. package/src/components/tabs/Tabs.astro +0 -270
  206. package/src/components/tabs/TabsContent.astro +0 -28
  207. package/src/components/tabs/TabsList.astro +0 -23
  208. package/src/components/tabs/TabsTrigger.astro +0 -34
  209. package/src/components/textarea/Textarea.astro +0 -31
  210. package/src/components/toast/ToastDescription.astro +0 -22
  211. package/src/components/toast/ToastItem.astro +0 -56
  212. package/src/components/toast/ToastTemplate.astro +0 -27
  213. package/src/components/toast/ToastTitle.astro +0 -59
  214. package/src/components/toast/Toaster.astro +0 -981
  215. package/src/components/toast/index.ts +0 -1
  216. package/src/components/toast/toast-manager.ts +0 -234
  217. package/src/components/toggle/Toggle.astro +0 -174
  218. package/src/components/toggle/ToggleTypes.ts +0 -14
  219. package/src/components/tooltip/Tooltip.astro +0 -422
  220. package/src/components/tooltip/TooltipContent.astro +0 -83
  221. package/src/components/tooltip/TooltipTrigger.astro +0 -13
  222. package/src/components/video/Video.astro +0 -121
  223. package/src/config/cookies.ts +0 -5
  224. package/src/config/links.ts +0 -4
  225. package/src/domain/cms/index.ts +0 -1
  226. package/src/domain/cms/types.ts +0 -20
  227. package/src/domain/i18n/constants.ts +0 -21
  228. package/src/domain/i18n/cookie-storage.ts +0 -13
  229. package/src/domain/i18n/country-to-locale-map.ts +0 -67
  230. package/src/domain/i18n/fallbacks.generated.ts +0 -230
  231. package/src/domain/i18n/fetcher.ts +0 -278
  232. package/src/domain/i18n/flags.ts +0 -16
  233. package/src/domain/i18n/format.ts +0 -90
  234. package/src/domain/i18n/index.ts +0 -10
  235. package/src/domain/i18n/middleware/i18n.ts +0 -161
  236. package/src/domain/i18n/resolve-locale.ts +0 -55
  237. package/src/domain/i18n/runtime-constants.ts +0 -14
  238. package/src/domain/i18n/schema.ts +0 -29
  239. package/src/domain/index.ts +0 -4
  240. package/src/domain/seo/constants.ts +0 -6
  241. package/src/domain/seo/index.ts +0 -3
  242. package/src/domain/seo/services/index.ts +0 -3
  243. package/src/domain/seo/services/llms.ts +0 -56
  244. package/src/domain/seo/services/robots.ts +0 -12
  245. package/src/domain/seo/services/sitemap.ts +0 -56
  246. package/src/domain/seo/utils.ts +0 -36
  247. package/src/domain/theme/constants.ts +0 -6
  248. package/src/domain/theme/index.ts +0 -2
  249. package/src/domain/theme/schema.ts +0 -10
  250. package/src/i18n.generated.d.ts +0 -202
  251. package/src/lib/component-preview.ts +0 -73
  252. package/src/lib/index.ts +0 -6
  253. package/src/lib/remark/remark-modified-time.ts +0 -13
  254. package/src/lib/showcase-preview-elements.ts +0 -408
  255. package/src/lib/showcase-renderer.ts +0 -218
  256. package/src/lib/showcase-utils.ts +0 -189
  257. package/src/lib/turnstile.ts +0 -35
  258. package/src/lib/utils/starwind/positioning.ts +0 -318
  259. package/src/locales/de/blog.json +0 -9
  260. package/src/locales/de/common.json +0 -19
  261. package/src/locales/de/errors.json +0 -6
  262. package/src/locales/de/home.json +0 -20
  263. package/src/locales/de/messages.json +0 -8
  264. package/src/locales/de/nav.json +0 -13
  265. package/src/locales/de/projects.json +0 -9
  266. package/src/locales/de/services.json +0 -43
  267. package/src/locales/en/blog.json +0 -9
  268. package/src/locales/en/chat.json +0 -29
  269. package/src/locales/en/common.json +0 -19
  270. package/src/locales/en/cookie_notice.json +0 -11
  271. package/src/locales/en/editor.json +0 -24
  272. package/src/locales/en/errors.json +0 -6
  273. package/src/locales/en/home.json +0 -20
  274. package/src/locales/en/messages.json +0 -8
  275. package/src/locales/en/nav.json +0 -13
  276. package/src/locales/en/projects.json +0 -9
  277. package/src/locales/en/services.json +0 -43
  278. package/src/locales/es/blog.json +0 -9
  279. package/src/locales/es/common.json +0 -19
  280. package/src/locales/es/errors.json +0 -6
  281. package/src/locales/es/home.json +0 -20
  282. package/src/locales/es/messages.json +0 -8
  283. package/src/locales/es/nav.json +0 -13
  284. package/src/locales/es/projects.json +0 -9
  285. package/src/locales/es/services.json +0 -43
  286. package/src/locales/ja/blog.json +0 -9
  287. package/src/locales/ja/common.json +0 -19
  288. package/src/locales/ja/errors.json +0 -6
  289. package/src/locales/ja/home.json +0 -20
  290. package/src/locales/ja/messages.json +0 -8
  291. package/src/locales/ja/nav.json +0 -13
  292. package/src/locales/ja/projects.json +0 -9
  293. package/src/locales/ja/services.json +0 -43
  294. package/src/locales/pt/blog.json +0 -9
  295. package/src/locales/pt/chat.json +0 -29
  296. package/src/locales/pt/common.json +0 -19
  297. package/src/locales/pt/cookie_notice.json +0 -11
  298. package/src/locales/pt/editor.json +0 -24
  299. package/src/locales/pt/errors.json +0 -6
  300. package/src/locales/pt/home.json +0 -20
  301. package/src/locales/pt/messages.json +0 -8
  302. package/src/locales/pt/nav.json +0 -13
  303. package/src/locales/pt/projects.json +0 -9
  304. package/src/locales/pt/services.json +0 -43
  305. package/src/utils/server/cookies.ts +0 -98
  306. package/src/utils/server/index.ts +0 -1
  307. package/src/utils/shared/index.ts +0 -3
  308. /package/src/utils/{shared/deep-merge.ts → deep-merge.ts} +0 -0
  309. /package/src/utils/{shared/embed.ts → embed.ts} +0 -0
  310. /package/src/utils/{shared/parse-boolean.ts → parse-boolean.ts} +0 -0
@@ -1,202 +0,0 @@
1
- // Auto-generated by scripts/bundle-translations.ts
2
- // Do not edit manually.
3
-
4
- declare global {
5
- namespace I18n {
6
- export interface Schema {
7
- "blog": {
8
- "meta_title": string;
9
- "hero_title": string;
10
- "hero_description": string;
11
- "latest_article": string;
12
- "latest": string;
13
- "read_article": string;
14
- "all_posts": string;
15
- };
16
- "chat": {
17
- "title": string;
18
- "description": string;
19
- "heading": string;
20
- "intro": string;
21
- "label": string;
22
- "placeholder": string;
23
- "button": string;
24
- "room": {
25
- "title": string;
26
- "connecting": string;
27
- "connected": string;
28
- "disconnected": string;
29
- "placeholder": string;
30
- "send": string;
31
- "system": {
32
- "joining": string;
33
- "error": string;
34
- "joined": string;
35
- "left": string;
36
- "reconnecting": string;
37
- "fail_reconnect": string;
38
- "no_connect": string;
39
- "prompt_user": string;
40
- "you": string;
41
- "online_users": string;
42
- };
43
- };
44
- };
45
- "common": {
46
- "seo": {
47
- "title": string;
48
- "description": string;
49
- };
50
- "nav": {
51
- "home": string;
52
- "blog": string;
53
- "mobileButton": string;
54
- };
55
- "footer": {
56
- "license": string;
57
- };
58
- "notFound": {
59
- "title": string;
60
- "message": string;
61
- "backToHome": string;
62
- };
63
- };
64
- "cookie_notice": {
65
- "title": string;
66
- "description": string;
67
- "privacy_policy": string;
68
- "reject_all": string;
69
- "accept_all": string;
70
- "accepted_toast": string;
71
- "accepted_description": string;
72
- "rejected_toast": string;
73
- "rejected_description": string;
74
- };
75
- "editor": {
76
- "title": string;
77
- "description": string;
78
- "collaborative_editor": string;
79
- "status": {
80
- "connecting": string;
81
- "connected": string;
82
- "disconnected": string;
83
- };
84
- "history": string;
85
- "version_history": string;
86
- "no_versions": string;
87
- "placeholder": string;
88
- "word_count": {
89
- "word": string;
90
- "words": string;
91
- "character": string;
92
- "characters": string;
93
- };
94
- "save": {
95
- "saved": string;
96
- };
97
- "restore_confirm": string;
98
- };
99
- "errors": {
100
- "404_title": string;
101
- "404_description": string;
102
- "500_title": string;
103
- "500_description": string;
104
- };
105
- "home": {
106
- "meta_title": string;
107
- "meta_description": string;
108
- "hero_title": string;
109
- "hero_description": string;
110
- "hero_view_components": string;
111
- "hero_contact_me": string;
112
- "stack_title": string;
113
- "stack_description": string;
114
- "stack_view_services": string;
115
- "stack_resume": string;
116
- "marquee_title": string;
117
- "projects_title": string;
118
- "projects_description": string;
119
- "projects_view_all": string;
120
- "cta_title": string;
121
- "cta_description": string;
122
- "cta_contact": string;
123
- "cta_resume": string;
124
- };
125
- "messages": {
126
- "errors": {
127
- "ui": {
128
- "MISSING_TRANSLATED_UI": string;
129
- "MISSING_TRANSLATED_CONTENT": string;
130
- };
131
- };
132
- };
133
- "nav": {
134
- "home": string;
135
- "projects": string;
136
- "blog": string;
137
- "about": string;
138
- "services": string;
139
- "resume": string;
140
- "contact": string;
141
- "components": string;
142
- "privacy_policy": string;
143
- "terms_of_service": string;
144
- "cookie_policy": string;
145
- };
146
- "projects": {
147
- "meta_title": string;
148
- "hero_title": string;
149
- "hero_description": string;
150
- "latest": string;
151
- "latest_badge": string;
152
- "view_project": string;
153
- "all": string;
154
- };
155
- "services": {
156
- "meta_title": string;
157
- "hero_title": string;
158
- "hero_description": string;
159
- "capabilities_title": string;
160
- "capabilities_description": string;
161
- "web_dev_title": string;
162
- "web_dev_description": string;
163
- "ui_ux_title": string;
164
- "ui_ux_description": string;
165
- "perf_title": string;
166
- "perf_description": string;
167
- "perf_security_title": string;
168
- "perf_security_description": string;
169
- "testimonials_title": string;
170
- "testimonials_description": string;
171
- "faq_title": string;
172
- "faq_description": string;
173
- "cta_title": string;
174
- "cta_description": string;
175
- "cta_contact": string;
176
- "cta_portfolio": string;
177
- "badge_ceo": string;
178
- "badge_founder": string;
179
- "badge_cto": string;
180
- "badge_senior_ui": string;
181
- "badge_chef": string;
182
- "badge_product_designer": string;
183
- "testimonial_1": string;
184
- "testimonial_2": string;
185
- "testimonial_3": string;
186
- "testimonial_4": string;
187
- "testimonial_5": string;
188
- "testimonial_6": string;
189
- "faq_category_general": string;
190
- "faq_q1": string;
191
- "faq_a1": string;
192
- "faq_q2": string;
193
- "faq_a2": string;
194
- "faq_category_technical": string;
195
- "faq_q3": string;
196
- "faq_a3": string;
197
- };
198
- }
199
- }
200
- }
201
-
202
- export {}
@@ -1,73 +0,0 @@
1
- /**
2
- * Component Preview Renderer
3
- *
4
- * A simple registry-based system for rendering component previews with dynamic props. Import this
5
- * module in your page to register component renderers.
6
- */
7
-
8
- export type RendererFunction = (props: Record<string, any>, container: HTMLElement) => void
9
-
10
- const renderers = new Map<string, RendererFunction>()
11
-
12
- /**
13
- * Register a component renderer
14
- *
15
- * @param componentName - The component name (e.g., 'hero', 'button')
16
- * @param renderFn - Function that renders the component with given props
17
- */
18
- export function registerRenderer(componentName: string, renderFn: RendererFunction) {
19
- renderers.set(componentName, renderFn)
20
- }
21
-
22
- /**
23
- * Get a registered renderer
24
- */
25
- export function getRenderer(componentName: string): RendererFunction | undefined {
26
- return renderers.get(componentName)
27
- }
28
-
29
- /**
30
- * Update a preview container with new props
31
- */
32
- export function renderPreview(
33
- container: HTMLElement,
34
- componentName: string,
35
- props: Record<string, any>
36
- ) {
37
- const renderer = renderers.get(componentName)
38
- if (renderer) {
39
- renderer(props, container)
40
- }
41
- }
42
-
43
- /**
44
- * Helper to create a simple attribute-based renderer For components that can update via data
45
- * attributes and CSS
46
- */
47
- export function createAttributeRenderer(
48
- attributeMap: Record<string, string>,
49
- classUpdater?: (props: Record<string, any>, element: HTMLElement) => void
50
- ): RendererFunction {
51
- return (props, container) => {
52
- // Update data attributes
53
- Object.entries(props).forEach(([key, value]) => {
54
- const attrName = attributeMap[key] || key
55
- if (value === undefined || value === null) {
56
- container.removeAttribute(`data-${attrName}`)
57
- } else if (typeof value === "boolean") {
58
- if (value) {
59
- container.setAttribute(`data-${attrName}`, "true")
60
- } else {
61
- container.removeAttribute(`data-${attrName}`)
62
- }
63
- } else {
64
- container.setAttribute(`data-${attrName}`, String(value))
65
- }
66
- })
67
-
68
- // Call custom class updater if provided
69
- if (classUpdater) {
70
- classUpdater(props, container)
71
- }
72
- }
73
- }
package/src/lib/index.ts DELETED
@@ -1,6 +0,0 @@
1
- export * from "./turnstile"
2
- export * from "./component-preview"
3
- export * from "./showcase-preview-elements"
4
- export * from "./showcase-renderer"
5
- export * from "./showcase-utils"
6
- export * from "./remark/remark-modified-time.ts"
@@ -1,13 +0,0 @@
1
- import { execSync } from "child_process"
2
-
3
- export function remarkModifiedTime() {
4
- return function (_tree: any, file: any) {
5
- try {
6
- const filepath = file.history[0]
7
- const result = execSync(`git log -1 --pretty="format:%cI" "${filepath}"`)
8
- file.data.astro.frontmatter.lastModified = result.toString()
9
- } catch {
10
- file.data.astro.frontmatter.lastModified = new Date().toISOString()
11
- }
12
- }
13
- }
@@ -1,408 +0,0 @@
1
- /**
2
- * Showcase Preview Custom Elements
3
- *
4
- * This module defines all the custom elements used in the component showcase. It must be imported
5
- * client-side before the showcase renderers run.
6
- */
7
-
8
- // Register all custom elements
9
- export function registerShowcasePreviewElements() {
10
- if (typeof HTMLElement === "undefined" || typeof customElements === "undefined") return
11
-
12
- // Hero Preview Custom Element
13
- class HeroPreviewElement extends HTMLElement {
14
- innerEl: HTMLElement | null = null
15
- contentWrapper: HTMLElement | null = null
16
- titleEl: HTMLElement | null = null
17
- descEl: HTMLElement | null = null
18
-
19
- static get observedAttributes() {
20
- return ["data-orientation", "data-alignment", "data-inverted"]
21
- }
22
-
23
- connectedCallback() {
24
- this.innerEl = this.querySelector<HTMLElement>(".hero-preview-inner")
25
- this.contentWrapper = this.querySelector<HTMLElement>(".hero-content-wrapper")
26
- this.titleEl = this.querySelector<HTMLElement>("[data-hero-title]")
27
- this.descEl = this.querySelector<HTMLElement>("[data-hero-description]")
28
- if (!this.innerEl || !this.contentWrapper) return
29
- this.updateClasses()
30
- }
31
-
32
- attributeChangedCallback(_name: string, _oldValue: string, newValue: string) {
33
- if (_oldValue !== newValue) {
34
- this.updateClasses()
35
- }
36
- }
37
-
38
- updateClasses() {
39
- if (!this.innerEl || !this.contentWrapper) return
40
-
41
- const orientation = this.dataset.orientation || "vertical"
42
- const alignment = this.dataset.alignment || "center"
43
- const inverted = this.dataset.inverted === "true"
44
-
45
- const effectiveAlignment = orientation === "horizontal" ? "left" : alignment
46
-
47
- // Reset inner container classes
48
- this.innerEl.className = "hero-preview-inner w-full"
49
-
50
- // Apply orientation classes
51
- if (orientation === "horizontal") {
52
- this.innerEl.classList.add(
53
- "flex",
54
- "flex-col",
55
- "gap-8",
56
- "items-center",
57
- "lg:grid",
58
- "lg:grid-cols-2",
59
- "lg:items-center",
60
- "lg:gap-16"
61
- )
62
- } else {
63
- this.innerEl.classList.add("flex", "flex-col", "gap-8", "items-center")
64
- if (!inverted) {
65
- this.innerEl.classList.add("flex-col-reverse")
66
- }
67
- }
68
-
69
- // Apply alignment classes
70
- this.innerEl.classList.remove(
71
- "text-start",
72
- "text-center",
73
- "text-end",
74
- "items-start",
75
- "items-end"
76
- )
77
- if (effectiveAlignment === "left") {
78
- this.innerEl.classList.add("text-start", "items-start")
79
- } else if (effectiveAlignment === "right") {
80
- this.innerEl.classList.add("text-end", "items-end")
81
- } else {
82
- this.innerEl.classList.add("text-center", "items-center")
83
- }
84
-
85
- // Update content wrapper
86
- this.contentWrapper.classList.remove(
87
- "text-center",
88
- "items-center",
89
- "text-start",
90
- "items-start",
91
- "text-end",
92
- "items-end"
93
- )
94
- if (effectiveAlignment === "left") {
95
- this.contentWrapper.classList.add("text-start", "items-start")
96
- } else if (effectiveAlignment === "right") {
97
- this.contentWrapper.classList.add("text-end", "items-end")
98
- } else {
99
- this.contentWrapper.classList.add("text-center", "items-center")
100
- }
101
- }
102
- }
103
-
104
- // Section Preview Custom Element
105
- class SectionPreviewElement extends HTMLElement {
106
- innerEl: HTMLElement | null = null
107
- contentEl: HTMLElement | null = null
108
- titleEl: HTMLElement | null = null
109
- descEl: HTMLElement | null = null
110
-
111
- static get observedAttributes() {
112
- return ["data-orientation", "data-alignment", "data-inverted"]
113
- }
114
-
115
- connectedCallback() {
116
- this.innerEl = this.querySelector<HTMLElement>(".section-preview-inner")
117
- this.contentEl = this.querySelector<HTMLElement>(".section-content")
118
- this.titleEl = this.querySelector<HTMLElement>("[data-section-title]")
119
- this.descEl = this.querySelector<HTMLElement>("[data-section-description]")
120
- if (!this.innerEl || !this.contentEl) return
121
- this.updateClasses()
122
- }
123
-
124
- attributeChangedCallback(_name: string, _oldValue: string, newValue: string) {
125
- if (_oldValue !== newValue) {
126
- this.updateClasses()
127
- }
128
- }
129
-
130
- updateClasses() {
131
- if (!this.innerEl || !this.contentEl) return
132
-
133
- const orientation = this.dataset.orientation || "vertical"
134
- const alignment = this.dataset.alignment || "center"
135
- const inverted = this.dataset.inverted === "true"
136
-
137
- const effectiveAlignment = orientation === "horizontal" ? "left" : alignment
138
-
139
- // Reset inner container classes
140
- this.innerEl.className = "section-preview-inner w-full"
141
- this.innerEl.classList.add("container", "py-24")
142
-
143
- // Apply orientation classes
144
- if (orientation === "horizontal") {
145
- this.innerEl.classList.add("lg:grid", "lg:grid-cols-2", "lg:items-center", "lg:gap-16")
146
- } else {
147
- this.innerEl.classList.add("flex", "flex-col", "gap-12")
148
- if (inverted) {
149
- this.innerEl.classList.add("flex-col-reverse")
150
- }
151
- }
152
-
153
- // Apply alignment classes
154
- this.innerEl.classList.remove(
155
- "text-start",
156
- "text-center",
157
- "text-end",
158
- "items-start",
159
- "items-end"
160
- )
161
- if (effectiveAlignment === "left") {
162
- this.innerEl.classList.add("text-start", "items-start")
163
- } else if (effectiveAlignment === "right") {
164
- this.innerEl.classList.add("text-end", "items-end")
165
- } else {
166
- this.innerEl.classList.add("text-center", "items-center")
167
- }
168
-
169
- // Update content element
170
- this.contentEl.classList.remove(
171
- "text-center",
172
- "items-center",
173
- "text-start",
174
- "items-start",
175
- "text-end",
176
- "items-end"
177
- )
178
- if (effectiveAlignment === "left") {
179
- this.contentEl.classList.add("text-start", "items-start")
180
- } else if (effectiveAlignment === "right") {
181
- this.contentEl.classList.add("text-end", "items-end")
182
- } else {
183
- this.contentEl.classList.add("text-center", "items-center")
184
- }
185
- }
186
- }
187
-
188
- // Button Preview Custom Element
189
- class ButtonPreviewElement extends HTMLElement {
190
- button: HTMLElement | null = null
191
-
192
- static get observedAttributes() {
193
- return ["data-variant", "data-size", "data-children"]
194
- }
195
-
196
- connectedCallback() {
197
- this.button = this.querySelector<HTMLElement>("[data-preview-button]")
198
- if (!this.button) return
199
- this.updateButton()
200
- }
201
-
202
- attributeChangedCallback(_name: string, oldValue: string, newValue: string) {
203
- if (oldValue !== newValue && this.button) {
204
- this.updateButton()
205
- }
206
- }
207
-
208
- updateButton() {
209
- if (!this.button) return
210
-
211
- const variant = this.dataset.variant || "default"
212
- const size = this.dataset.size || "md"
213
- const children = this.dataset.children || "Button"
214
-
215
- // Remove all variant classes
216
- this.button.classList.remove(
217
- "bg-input",
218
- "hover:bg-input/90",
219
- "text-foreground",
220
- "bg-primary",
221
- "text-primary-foreground",
222
- "hover:bg-primary/90",
223
- "bg-secondary",
224
- "text-secondary-foreground",
225
- "hover:bg-secondary/90",
226
- "border",
227
- "border-input",
228
- "bg-background",
229
- "hover:bg-accent",
230
- "hover:text-accent-foreground",
231
- "bg-info",
232
- "text-info-foreground",
233
- "hover:bg-info/90",
234
- "bg-success",
235
- "text-success-foreground",
236
- "hover:bg-success/90",
237
- "bg-warning",
238
- "text-warning-foreground",
239
- "hover:bg-warning/90",
240
- "bg-error",
241
- "text-error-foreground",
242
- "hover:bg-error/90"
243
- )
244
-
245
- // Add new variant classes
246
- const variantClasses: Record<string, string[]> = {
247
- default: ["bg-input", "hover:bg-input/90", "text-foreground"],
248
- primary: ["bg-primary", "text-primary-foreground", "hover:bg-primary/90"],
249
- secondary: ["bg-secondary", "text-secondary-foreground", "hover:bg-secondary/90"],
250
- outline: [
251
- "border",
252
- "border-input",
253
- "bg-background",
254
- "hover:bg-accent",
255
- "hover:text-accent-foreground"
256
- ],
257
- ghost: ["hover:bg-accent", "hover:text-accent-foreground"],
258
- info: ["bg-info", "text-info-foreground", "hover:bg-info/90"],
259
- success: ["bg-success", "text-success-foreground", "hover:bg-success/90"],
260
- warning: ["bg-warning", "text-warning-foreground", "hover:bg-warning/90"],
261
- error: ["bg-error", "text-error-foreground", "hover:bg-error/90"]
262
- }
263
-
264
- variantClasses[variant]?.forEach((cls: string) => this.button?.classList.add(cls))
265
-
266
- // Remove all size classes
267
- this.button.classList.remove(
268
- "h-9",
269
- "px-3",
270
- "text-sm",
271
- "h-11",
272
- "px-4",
273
- "text-base",
274
- "h-12",
275
- "px-6",
276
- "text-lg"
277
- )
278
-
279
- // Add new size classes
280
- const sizeClasses: Record<string, string[]> = {
281
- sm: ["h-9", "px-3", "text-sm"],
282
- md: ["h-11", "px-4", "text-base"],
283
- lg: ["h-12", "px-6", "text-lg"]
284
- }
285
-
286
- sizeClasses[size]?.forEach((cls: string) => this.button?.classList.add(cls))
287
-
288
- // Update text
289
- this.button.textContent = children
290
- }
291
- }
292
-
293
- // Testimonials Preview Custom Element
294
- class TestimonialsPreviewElement extends HTMLElement {
295
- card: HTMLElement | null = null
296
- quoteEl: HTMLElement | null = null
297
- personEl: HTMLElement | null = null
298
- metaEl: HTMLElement | null = null
299
-
300
- static get observedAttributes() {
301
- return ["data-alignment"]
302
- }
303
-
304
- connectedCallback() {
305
- this.card = this.querySelector<HTMLElement>(".testimonial-card")
306
- this.quoteEl = this.querySelector<HTMLElement>("[data-testimonials-quote]")
307
- this.personEl = this.querySelector<HTMLElement>(".testimonial-person")
308
- this.metaEl = this.querySelector<HTMLElement>(".testimonial-meta")
309
- if (!this.card || !this.quoteEl || !this.personEl || !this.metaEl) return
310
- this.updateClasses()
311
- }
312
-
313
- attributeChangedCallback(_name: string, oldValue: string, newValue: string) {
314
- if (oldValue !== newValue) {
315
- this.updateClasses()
316
- }
317
- }
318
-
319
- updateClasses() {
320
- if (!this.card || !this.quoteEl || !this.personEl || !this.metaEl) return
321
-
322
- const alignment = this.dataset.alignment || "center"
323
-
324
- // Reset all alignment classes
325
- this.quoteEl.classList.remove("text-left", "text-center", "text-right")
326
- this.personEl.classList.remove(
327
- "flex-row",
328
- "flex-row-reverse",
329
- "items-center",
330
- "justify-start",
331
- "justify-end",
332
- "flex-col",
333
- "text-center"
334
- )
335
- this.metaEl.classList.remove(
336
- "text-left",
337
- "text-right",
338
- "items-start",
339
- "items-end",
340
- "items-center"
341
- )
342
-
343
- if (alignment === "left") {
344
- this.quoteEl.classList.add("text-left")
345
- this.personEl.classList.add("flex-row", "items-center", "justify-start")
346
- this.metaEl.classList.add("text-left", "items-start")
347
- } else if (alignment === "right") {
348
- this.quoteEl.classList.add("text-right")
349
- this.personEl.classList.add("flex-row-reverse", "items-center", "justify-end")
350
- this.metaEl.classList.add("text-right", "items-end")
351
- } else {
352
- // center
353
- this.quoteEl.classList.add("text-center")
354
- this.personEl.classList.add("flex-col", "items-center", "justify-center", "text-center")
355
- this.metaEl.classList.add("items-center")
356
- }
357
- }
358
- }
359
-
360
- // Language Switcher Preview Custom Element
361
- class LanguageSwitcherPreviewElement extends HTMLElement {
362
- static get observedAttributes() {
363
- return ["data-variant"]
364
- }
365
-
366
- connectedCallback() {
367
- this.updateVariant()
368
- }
369
-
370
- attributeChangedCallback(_name: string, oldValue: string, newValue: string) {
371
- if (oldValue !== newValue) {
372
- this.updateVariant()
373
- }
374
- }
375
-
376
- updateVariant() {
377
- // Dispatch event for the actual component to handle
378
- this.dispatchEvent(
379
- new CustomEvent("language-switcher:variant-change", {
380
- detail: { variant: this.dataset.variant },
381
- bubbles: true
382
- })
383
- )
384
- }
385
- }
386
-
387
- // Register all custom elements
388
- if (!customElements.get("hero-preview")) {
389
- customElements.define("hero-preview", HeroPreviewElement)
390
- }
391
- if (!customElements.get("section-preview")) {
392
- customElements.define("section-preview", SectionPreviewElement)
393
- }
394
- if (!customElements.get("button-preview")) {
395
- customElements.define("button-preview", ButtonPreviewElement)
396
- }
397
- if (!customElements.get("testimonials-preview")) {
398
- customElements.define("testimonials-preview", TestimonialsPreviewElement)
399
- }
400
- if (!customElements.get("language-switcher-preview")) {
401
- customElements.define("language-switcher-preview", LanguageSwitcherPreviewElement)
402
- }
403
- }
404
-
405
- // Auto-register when module is imported
406
- if (typeof window !== "undefined") {
407
- registerShowcasePreviewElements()
408
- }