@open-dy/vibecoding-sdk-taro 0.0.1 → 0.0.2

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 (274) hide show
  1. package/dist/adapters/interest-card/eslint/eslint-plugin-custom-navigation.mjs +2 -290
  2. package/dist/adapters/interest-card/eslint/taro.mjs +8 -42
  3. package/dist/build/plugins/inject-feed-card-meta.cjs +148 -0
  4. package/dist/build/taro.js +1 -0
  5. package/dist/build/taro.js.map +1 -1
  6. package/dist/components/miniapp-open-card.d.ts +46 -1
  7. package/dist/components/miniapp-open-card.js +14 -1
  8. package/dist/components/miniapp-open-card.js.map +1 -1
  9. package/dist/eslint/eslint-plugin-custom-navigation.mjs +290 -0
  10. package/dist/eslint/taro.mjs +35 -1
  11. package/dist/reference/llms.txt +72 -80
  12. package/dist/reference/sdk-api/build/taro/BuildContext.md +1 -1
  13. package/dist/reference/sdk-api/build/taro/CreateMicroappTaroConfigOptions.md +1 -1
  14. package/dist/reference/sdk-api/build/taro/createMicroappTaroConfig.md +1 -1
  15. package/dist/reference/sdk-api/components/miniapp-open-card/MiniappOpenCard.md +109 -0
  16. package/dist/reference/sdk-api/components/miniapp-open-card/MiniappOpenCardEnvVersion.md +38 -0
  17. package/dist/reference/sdk-api/components/miniapp-open-card/MiniappOpenCardErrorDetail.md +52 -0
  18. package/dist/reference/sdk-api/components/miniapp-open-card/MiniappOpenCardProps.md +76 -0
  19. package/dist/reference/sdk-api/components/miniapp-open-card/index.md +12 -0
  20. package/dist/reference/sdk-api/libraries/lucide-taro.md +151 -0
  21. package/dist/reference/sdk-api/runtime/CreateMicroappClientOptions.md +1 -1
  22. package/dist/reference/sdk-api/runtime/createMicroappClient.md +2 -2
  23. package/dist/reference/sdk-api/ui/accordion/Accordion.md +1 -1
  24. package/dist/reference/sdk-api/ui/accordion/AccordionContent.md +1 -1
  25. package/dist/reference/sdk-api/ui/accordion/AccordionItem.md +1 -1
  26. package/dist/reference/sdk-api/ui/accordion/AccordionTrigger.md +1 -1
  27. package/dist/reference/sdk-api/ui/alert/Alert.md +1 -1
  28. package/dist/reference/sdk-api/ui/alert/AlertAction.md +1 -1
  29. package/dist/reference/sdk-api/ui/alert/AlertDescription.md +1 -1
  30. package/dist/reference/sdk-api/ui/alert/AlertTitle.md +1 -1
  31. package/dist/reference/sdk-api/ui/alert-dialog/AlertDialog.md +1 -1
  32. package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogAction.md +2 -2
  33. package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogCancel.md +2 -2
  34. package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogContent.md +1 -1
  35. package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogDescription.md +1 -1
  36. package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogFooter.md +1 -1
  37. package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogHeader.md +1 -1
  38. package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogOverlay.md +1 -1
  39. package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogPortal.md +1 -1
  40. package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogTitle.md +1 -1
  41. package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogTrigger.md +22 -22
  42. package/dist/reference/sdk-api/ui/aspect-ratio/AspectRatio.md +1 -1
  43. package/dist/reference/sdk-api/ui/avatar/Avatar.md +1 -1
  44. package/dist/reference/sdk-api/ui/avatar/AvatarBadge.md +1 -1
  45. package/dist/reference/sdk-api/ui/avatar/AvatarFallback.md +1 -1
  46. package/dist/reference/sdk-api/ui/avatar/AvatarGroup.md +1 -1
  47. package/dist/reference/sdk-api/ui/avatar/AvatarGroupCount.md +1 -1
  48. package/dist/reference/sdk-api/ui/avatar/AvatarImage.md +19 -19
  49. package/dist/reference/sdk-api/ui/badge/Badge.md +2 -2
  50. package/dist/reference/sdk-api/ui/badge/badgeVariants.md +2 -2
  51. package/dist/reference/sdk-api/ui/button/Button.md +2 -2
  52. package/dist/reference/sdk-api/ui/button/ButtonProps.md +2 -2
  53. package/dist/reference/sdk-api/ui/button/buttonVariants.md +2 -2
  54. package/dist/reference/sdk-api/ui/button-group/ButtonGroup.md +1 -1
  55. package/dist/reference/sdk-api/ui/button-group/ButtonGroupSeparator.md +1 -1
  56. package/dist/reference/sdk-api/ui/button-group/ButtonGroupText.md +22 -22
  57. package/dist/reference/sdk-api/ui/button-group/buttonGroupVariants.md +1 -1
  58. package/dist/reference/sdk-api/ui/calendar/Calendar.md +1 -1
  59. package/dist/reference/sdk-api/ui/calendar/CalendarProps.md +1 -1
  60. package/dist/reference/sdk-api/ui/card/Card.md +1 -1
  61. package/dist/reference/sdk-api/ui/card/CardAction.md +1 -1
  62. package/dist/reference/sdk-api/ui/card/CardContent.md +1 -1
  63. package/dist/reference/sdk-api/ui/card/CardDescription.md +1 -1
  64. package/dist/reference/sdk-api/ui/card/CardFooter.md +1 -1
  65. package/dist/reference/sdk-api/ui/card/CardHeader.md +1 -1
  66. package/dist/reference/sdk-api/ui/card/CardTitle.md +1 -1
  67. package/dist/reference/sdk-api/ui/carousel/Carousel.md +1 -1
  68. package/dist/reference/sdk-api/ui/carousel/CarouselContent.md +1 -1
  69. package/dist/reference/sdk-api/ui/carousel/CarouselItem.md +1 -1
  70. package/dist/reference/sdk-api/ui/carousel/CarouselNext.md +2 -2
  71. package/dist/reference/sdk-api/ui/carousel/CarouselPrevious.md +2 -2
  72. package/dist/reference/sdk-api/ui/carousel/useCarousel.md +1 -1
  73. package/dist/reference/sdk-api/ui/checkbox/Checkbox.md +1 -1
  74. package/dist/reference/sdk-api/ui/collapsible/Collapsible.md +1 -1
  75. package/dist/reference/sdk-api/ui/collapsible/CollapsibleContent.md +1 -1
  76. package/dist/reference/sdk-api/ui/collapsible/CollapsibleTrigger.md +22 -22
  77. package/dist/reference/sdk-api/ui/combobox/Combobox.md +1 -1
  78. package/dist/reference/sdk-api/ui/combobox/ComboboxChip.md +1 -1
  79. package/dist/reference/sdk-api/ui/combobox/ComboboxChips.md +22 -22
  80. package/dist/reference/sdk-api/ui/combobox/ComboboxChipsInput.md +1 -1
  81. package/dist/reference/sdk-api/ui/combobox/ComboboxCollection.md +1 -1
  82. package/dist/reference/sdk-api/ui/combobox/ComboboxContent.md +1 -1
  83. package/dist/reference/sdk-api/ui/combobox/ComboboxEmpty.md +1 -1
  84. package/dist/reference/sdk-api/ui/combobox/ComboboxGroup.md +1 -1
  85. package/dist/reference/sdk-api/ui/combobox/ComboboxInput.md +22 -22
  86. package/dist/reference/sdk-api/ui/combobox/ComboboxItem.md +1 -1
  87. package/dist/reference/sdk-api/ui/combobox/ComboboxLabel.md +1 -1
  88. package/dist/reference/sdk-api/ui/combobox/ComboboxList.md +22 -22
  89. package/dist/reference/sdk-api/ui/combobox/ComboboxSeparator.md +1 -1
  90. package/dist/reference/sdk-api/ui/combobox/ComboboxTrigger.md +1 -1
  91. package/dist/reference/sdk-api/ui/combobox/ComboboxValue.md +22 -22
  92. package/dist/reference/sdk-api/ui/combobox/useComboboxAnchor.md +1 -1
  93. package/dist/reference/sdk-api/ui/dialog/Dialog.md +1 -1
  94. package/dist/reference/sdk-api/ui/dialog/DialogClose.md +1 -1
  95. package/dist/reference/sdk-api/ui/dialog/DialogContent.md +1 -1
  96. package/dist/reference/sdk-api/ui/dialog/DialogDescription.md +1 -1
  97. package/dist/reference/sdk-api/ui/dialog/DialogFooter.md +1 -1
  98. package/dist/reference/sdk-api/ui/dialog/DialogHeader.md +1 -1
  99. package/dist/reference/sdk-api/ui/dialog/DialogOverlay.md +1 -1
  100. package/dist/reference/sdk-api/ui/dialog/DialogPortal.md +1 -1
  101. package/dist/reference/sdk-api/ui/dialog/DialogTitle.md +1 -1
  102. package/dist/reference/sdk-api/ui/dialog/DialogTrigger.md +22 -22
  103. package/dist/reference/sdk-api/ui/drawer/Drawer.md +1 -1
  104. package/dist/reference/sdk-api/ui/drawer/DrawerClose.md +1 -1
  105. package/dist/reference/sdk-api/ui/drawer/DrawerContent.md +1 -1
  106. package/dist/reference/sdk-api/ui/drawer/DrawerDescription.md +1 -1
  107. package/dist/reference/sdk-api/ui/drawer/DrawerFooter.md +1 -1
  108. package/dist/reference/sdk-api/ui/drawer/DrawerHeader.md +1 -1
  109. package/dist/reference/sdk-api/ui/drawer/DrawerOverlay.md +1 -1
  110. package/dist/reference/sdk-api/ui/drawer/DrawerPortal.md +1 -1
  111. package/dist/reference/sdk-api/ui/drawer/DrawerTitle.md +1 -1
  112. package/dist/reference/sdk-api/ui/drawer/DrawerTrigger.md +1 -1
  113. package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenu.md +1 -1
  114. package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuCheckboxItem.md +1 -1
  115. package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuContent.md +1 -1
  116. package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuGroup.md +1 -1
  117. package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuItem.md +1 -1
  118. package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuLabel.md +1 -1
  119. package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuPortal.md +1 -1
  120. package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuRadioGroup.md +1 -1
  121. package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuRadioItem.md +1 -1
  122. package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuSeparator.md +1 -1
  123. package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuShortcut.md +1 -1
  124. package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuSub.md +1 -1
  125. package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuSubContent.md +1 -1
  126. package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuSubTrigger.md +1 -1
  127. package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuTrigger.md +22 -22
  128. package/dist/reference/sdk-api/ui/empty/Empty.md +1 -1
  129. package/dist/reference/sdk-api/ui/empty/EmptyContent.md +1 -1
  130. package/dist/reference/sdk-api/ui/empty/EmptyDescription.md +1 -1
  131. package/dist/reference/sdk-api/ui/empty/EmptyHeader.md +1 -1
  132. package/dist/reference/sdk-api/ui/empty/EmptyMedia.md +1 -1
  133. package/dist/reference/sdk-api/ui/empty/EmptyTitle.md +1 -1
  134. package/dist/reference/sdk-api/ui/field/Field.md +1 -1
  135. package/dist/reference/sdk-api/ui/field/FieldContent.md +1 -1
  136. package/dist/reference/sdk-api/ui/field/FieldDescription.md +1 -1
  137. package/dist/reference/sdk-api/ui/field/FieldError.md +1 -1
  138. package/dist/reference/sdk-api/ui/field/FieldGroup.md +1 -1
  139. package/dist/reference/sdk-api/ui/field/FieldLabel.md +13 -13
  140. package/dist/reference/sdk-api/ui/field/FieldLegend.md +1 -1
  141. package/dist/reference/sdk-api/ui/field/FieldSeparator.md +1 -1
  142. package/dist/reference/sdk-api/ui/field/FieldSet.md +1 -1
  143. package/dist/reference/sdk-api/ui/field/FieldTitle.md +1 -1
  144. package/dist/reference/sdk-api/ui/helpers/collectDataIconState.md +1 -1
  145. package/dist/reference/sdk-api/ui/input/Input.md +13 -13
  146. package/dist/reference/sdk-api/ui/input-group/InputGroup.md +1 -1
  147. package/dist/reference/sdk-api/ui/input-group/InputGroupAddon.md +1 -1
  148. package/dist/reference/sdk-api/ui/input-group/InputGroupButton.md +25 -25
  149. package/dist/reference/sdk-api/ui/input-group/InputGroupInput.md +13 -13
  150. package/dist/reference/sdk-api/ui/input-group/InputGroupText.md +1 -1
  151. package/dist/reference/sdk-api/ui/input-group/InputGroupTextarea.md +13 -13
  152. package/dist/reference/sdk-api/ui/input-otp/InputOTP.md +1 -1
  153. package/dist/reference/sdk-api/ui/input-otp/InputOTPGroup.md +1 -1
  154. package/dist/reference/sdk-api/ui/input-otp/InputOTPSeparator.md +1 -1
  155. package/dist/reference/sdk-api/ui/input-otp/InputOTPSlot.md +1 -1
  156. package/dist/reference/sdk-api/ui/item/Item.md +1 -1
  157. package/dist/reference/sdk-api/ui/item/ItemActions.md +1 -1
  158. package/dist/reference/sdk-api/ui/item/ItemContent.md +1 -1
  159. package/dist/reference/sdk-api/ui/item/ItemDescription.md +1 -1
  160. package/dist/reference/sdk-api/ui/item/ItemFooter.md +1 -1
  161. package/dist/reference/sdk-api/ui/item/ItemGroup.md +1 -1
  162. package/dist/reference/sdk-api/ui/item/ItemHeader.md +1 -1
  163. package/dist/reference/sdk-api/ui/item/ItemMedia.md +2 -2
  164. package/dist/reference/sdk-api/ui/item/ItemSeparator.md +1 -1
  165. package/dist/reference/sdk-api/ui/item/ItemTitle.md +1 -1
  166. package/dist/reference/sdk-api/ui/label/Label.md +13 -13
  167. package/dist/reference/sdk-api/ui/menubar/Menubar.md +1 -1
  168. package/dist/reference/sdk-api/ui/menubar/MenubarCheckboxItem.md +1 -1
  169. package/dist/reference/sdk-api/ui/menubar/MenubarContent.md +1 -1
  170. package/dist/reference/sdk-api/ui/menubar/MenubarGroup.md +1 -1
  171. package/dist/reference/sdk-api/ui/menubar/MenubarItem.md +1 -1
  172. package/dist/reference/sdk-api/ui/menubar/MenubarLabel.md +1 -1
  173. package/dist/reference/sdk-api/ui/menubar/MenubarMenu.md +1 -1
  174. package/dist/reference/sdk-api/ui/menubar/MenubarPortal.md +1 -1
  175. package/dist/reference/sdk-api/ui/menubar/MenubarRadioGroup.md +1 -1
  176. package/dist/reference/sdk-api/ui/menubar/MenubarRadioItem.md +1 -1
  177. package/dist/reference/sdk-api/ui/menubar/MenubarSeparator.md +1 -1
  178. package/dist/reference/sdk-api/ui/menubar/MenubarShortcut.md +1 -1
  179. package/dist/reference/sdk-api/ui/menubar/MenubarSub.md +1 -1
  180. package/dist/reference/sdk-api/ui/menubar/MenubarSubContent.md +1 -1
  181. package/dist/reference/sdk-api/ui/menubar/MenubarSubTrigger.md +1 -1
  182. package/dist/reference/sdk-api/ui/menubar/MenubarTrigger.md +1 -1
  183. package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenu.md +1 -1
  184. package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenuContent.md +1 -1
  185. package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenuIndicator.md +1 -1
  186. package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenuItem.md +1 -1
  187. package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenuLink.md +1 -1
  188. package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenuList.md +1 -1
  189. package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenuPositioner.md +1 -1
  190. package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenuTrigger.md +22 -22
  191. package/dist/reference/sdk-api/ui/navigation-menu/navigationMenuTriggerStyle.md +1 -1
  192. package/dist/reference/sdk-api/ui/pagination/Pagination.md +1 -1
  193. package/dist/reference/sdk-api/ui/pagination/PaginationContent.md +1 -1
  194. package/dist/reference/sdk-api/ui/pagination/PaginationEllipsis.md +1 -1
  195. package/dist/reference/sdk-api/ui/pagination/PaginationItem.md +1 -1
  196. package/dist/reference/sdk-api/ui/pagination/PaginationLink.md +1 -1
  197. package/dist/reference/sdk-api/ui/pagination/PaginationNext.md +1 -1
  198. package/dist/reference/sdk-api/ui/pagination/PaginationPrevious.md +1 -1
  199. package/dist/reference/sdk-api/ui/popover/Popover.md +1 -1
  200. package/dist/reference/sdk-api/ui/popover/PopoverAnchor.md +1 -1
  201. package/dist/reference/sdk-api/ui/popover/PopoverContent.md +1 -1
  202. package/dist/reference/sdk-api/ui/popover/PopoverDescription.md +1 -1
  203. package/dist/reference/sdk-api/ui/popover/PopoverHeader.md +1 -1
  204. package/dist/reference/sdk-api/ui/popover/PopoverTitle.md +1 -1
  205. package/dist/reference/sdk-api/ui/popover/PopoverTrigger.md +22 -22
  206. package/dist/reference/sdk-api/ui/portal/Portal.md +1 -1
  207. package/dist/reference/sdk-api/ui/progress/Progress.md +1 -1
  208. package/dist/reference/sdk-api/ui/progress/ProgressIndicator.md +1 -1
  209. package/dist/reference/sdk-api/ui/progress/ProgressLabel.md +1 -1
  210. package/dist/reference/sdk-api/ui/progress/ProgressTrack.md +1 -1
  211. package/dist/reference/sdk-api/ui/progress/ProgressValue.md +22 -22
  212. package/dist/reference/sdk-api/ui/radio-group/RadioGroup.md +1 -1
  213. package/dist/reference/sdk-api/ui/radio-group/RadioGroupItem.md +1 -1
  214. package/dist/reference/sdk-api/ui/resizable/ResizableHandle.md +1 -1
  215. package/dist/reference/sdk-api/ui/resizable/ResizablePanel.md +1 -1
  216. package/dist/reference/sdk-api/ui/resizable/ResizablePanelGroup.md +1 -1
  217. package/dist/reference/sdk-api/ui/scroll-area/ScrollArea.md +13 -13
  218. package/dist/reference/sdk-api/ui/scroll-area/ScrollBar.md +1 -1
  219. package/dist/reference/sdk-api/ui/select/Select.md +1 -1
  220. package/dist/reference/sdk-api/ui/select/SelectContent.md +1 -1
  221. package/dist/reference/sdk-api/ui/select/SelectGroup.md +1 -1
  222. package/dist/reference/sdk-api/ui/select/SelectItem.md +1 -1
  223. package/dist/reference/sdk-api/ui/select/SelectLabel.md +1 -1
  224. package/dist/reference/sdk-api/ui/select/SelectScrollDownButton.md +1 -1
  225. package/dist/reference/sdk-api/ui/select/SelectScrollUpButton.md +1 -1
  226. package/dist/reference/sdk-api/ui/select/SelectSeparator.md +1 -1
  227. package/dist/reference/sdk-api/ui/select/SelectTrigger.md +1 -1
  228. package/dist/reference/sdk-api/ui/select/SelectValue.md +1 -1
  229. package/dist/reference/sdk-api/ui/separator/Separator.md +1 -1
  230. package/dist/reference/sdk-api/ui/sheet/Sheet.md +1 -1
  231. package/dist/reference/sdk-api/ui/sheet/SheetClose.md +1 -1
  232. package/dist/reference/sdk-api/ui/sheet/SheetContent.md +1 -1
  233. package/dist/reference/sdk-api/ui/sheet/SheetDescription.md +1 -1
  234. package/dist/reference/sdk-api/ui/sheet/SheetFooter.md +1 -1
  235. package/dist/reference/sdk-api/ui/sheet/SheetHeader.md +1 -1
  236. package/dist/reference/sdk-api/ui/sheet/SheetOverlay.md +1 -1
  237. package/dist/reference/sdk-api/ui/sheet/SheetPortal.md +1 -1
  238. package/dist/reference/sdk-api/ui/sheet/SheetTitle.md +1 -1
  239. package/dist/reference/sdk-api/ui/sheet/SheetTrigger.md +1 -1
  240. package/dist/reference/sdk-api/ui/skeleton/Skeleton.md +1 -1
  241. package/dist/reference/sdk-api/ui/slider/Slider.md +1 -1
  242. package/dist/reference/sdk-api/ui/sonner/Toaster.md +1 -1
  243. package/dist/reference/sdk-api/ui/sonner/toast.md +1 -1
  244. package/dist/reference/sdk-api/ui/spinner/Spinner.md +1 -1
  245. package/dist/reference/sdk-api/ui/switch/Switch.md +1 -1
  246. package/dist/reference/sdk-api/ui/table/Table.md +1 -1
  247. package/dist/reference/sdk-api/ui/table/TableBody.md +1 -1
  248. package/dist/reference/sdk-api/ui/table/TableCaption.md +1 -1
  249. package/dist/reference/sdk-api/ui/table/TableCell.md +1 -1
  250. package/dist/reference/sdk-api/ui/table/TableFooter.md +1 -1
  251. package/dist/reference/sdk-api/ui/table/TableHead.md +1 -1
  252. package/dist/reference/sdk-api/ui/table/TableHeader.md +1 -1
  253. package/dist/reference/sdk-api/ui/table/TableRow.md +1 -1
  254. package/dist/reference/sdk-api/ui/tabs/Tabs.md +1 -1
  255. package/dist/reference/sdk-api/ui/tabs/TabsContent.md +1 -1
  256. package/dist/reference/sdk-api/ui/tabs/TabsList.md +1 -1
  257. package/dist/reference/sdk-api/ui/tabs/TabsTrigger.md +1 -1
  258. package/dist/reference/sdk-api/ui/tabs/tabsListVariants.md +1 -1
  259. package/dist/reference/sdk-api/ui/textarea/Textarea.md +13 -13
  260. package/dist/reference/sdk-api/ui/toggle/Toggle.md +1 -1
  261. package/dist/reference/sdk-api/ui/toggle/toggleVariants.md +1 -1
  262. package/dist/reference/sdk-api/ui/toggle-group/ToggleGroup.md +1 -1
  263. package/dist/reference/sdk-api/ui/toggle-group/ToggleGroupItem.md +1 -1
  264. package/dist/reference/sdk-api.json +2811 -2295
  265. package/dist/reference/sdk-api.md +12 -1
  266. package/package.json +2 -2
  267. package/release-provenance.json +4 -4
  268. package/src/adapters/interest-card/eslint/eslint-plugin-custom-navigation.mjs +2 -290
  269. package/src/adapters/interest-card/eslint/taro.mjs +8 -42
  270. package/src/build/plugins/inject-feed-card-meta.ts +172 -0
  271. package/src/build/taro.ts +1 -0
  272. package/src/components/miniapp-open-card.ts +46 -1
  273. package/src/eslint/eslint-plugin-custom-navigation.mjs +290 -0
  274. package/src/eslint/taro.mjs +35 -1
@@ -0,0 +1,290 @@
1
+ /**
2
+ * 强制小程序页面使用自定义导航栏:app config 必须声明 navigationStyle: 'custom',
3
+ * page config 若声明 navigationStyle 也只能是 custom,每个页面必须显式声明导航前景色,
4
+ * 且每个页面入口必须接入顶部避让。
5
+ */
6
+ import { createRequire } from 'node:module';
7
+
8
+ const ts = createRequire(import.meta.url)('typescript');
9
+
10
+ const CUSTOM = 'custom';
11
+ const NAVIGATION_TEXT_STYLES = new Set(['black', 'white']);
12
+
13
+ const CUSTOM_NAV_IMPORTS = new Set([
14
+ '@/components/custom-nav-space',
15
+ '@/hooks/use-custom-nav-layout',
16
+ '@/lib/custom-nav-layout',
17
+ ]);
18
+
19
+ const FORBIDDEN_NAVIGATION_APIS = new Map([
20
+ ['setNavigationBarTitle', '禁止修改导航栏标题'],
21
+ ['setNavigationBarColor', '禁止修改导航栏颜色、前景色或状态栏样式'],
22
+ ['showNavigationBarLoading', '禁止显示导航栏 loading'],
23
+ ['hideNavigationBarLoading', '禁止隐藏导航栏 loading'],
24
+ ['hideHomeButton', '禁止隐藏左上角首页或 logo 按钮'],
25
+ ]);
26
+
27
+ function getPropertyName(prop) {
28
+ if (!ts.isPropertyAssignment(prop)) return null;
29
+ if (ts.isIdentifier(prop.name)) return prop.name.text;
30
+ if (ts.isStringLiteral(prop.name)) return prop.name.text;
31
+ return null;
32
+ }
33
+
34
+ function getStringLiteral(node) {
35
+ if (ts.isStringLiteral(node) || ts.isNoSubstitutionTemplateLiteral(node)) {
36
+ return node.text;
37
+ }
38
+ return null;
39
+ }
40
+
41
+ function getStaticPropertyName(node) {
42
+ if (!node.computed && node.property.type === 'Identifier') {
43
+ return node.property.name;
44
+ }
45
+ if (
46
+ node.computed &&
47
+ node.property.type === 'Literal' &&
48
+ typeof node.property.value === 'string'
49
+ ) {
50
+ return node.property.value;
51
+ }
52
+ return null;
53
+ }
54
+
55
+ function getPropertyKeyName(node) {
56
+ if (!node.computed && node.key.type === 'Identifier') {
57
+ return node.key.name;
58
+ }
59
+ if (node.key.type === 'Literal' && typeof node.key.value === 'string') {
60
+ return node.key.value;
61
+ }
62
+ return null;
63
+ }
64
+
65
+ /**
66
+ * @returns {{ windowStyle: string | null, pageStyle: string | null, windowTextStyle: string | null, pageTextStyle: string | null, invalid: Array<{ kind: string, value: string | null }> } | null}
67
+ */
68
+ function extractNavigationStyles(filePath, text) {
69
+ const sf = ts.createSourceFile(filePath, text, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
70
+ let result = null;
71
+
72
+ function fromObjectLiteral(obj) {
73
+ const out = {
74
+ windowStyle: null,
75
+ pageStyle: null,
76
+ windowTextStyle: null,
77
+ pageTextStyle: null,
78
+ invalid: [],
79
+ };
80
+
81
+ for (const prop of obj.properties) {
82
+ if (!ts.isPropertyAssignment(prop)) continue;
83
+ const key = getPropertyName(prop);
84
+
85
+ if (key === 'navigationStyle') {
86
+ const value = getStringLiteral(prop.initializer);
87
+ out.pageStyle = value;
88
+ if (value !== CUSTOM) {
89
+ out.invalid.push({ kind: 'page', value });
90
+ }
91
+ }
92
+
93
+ if (key === 'navigationBarTextStyle') {
94
+ out.pageTextStyle = getStringLiteral(prop.initializer);
95
+ }
96
+
97
+ if (key === 'window' && ts.isObjectLiteralExpression(prop.initializer)) {
98
+ for (const windowProp of prop.initializer.properties) {
99
+ if (!ts.isPropertyAssignment(windowProp)) continue;
100
+ const windowKey = getPropertyName(windowProp);
101
+ if (windowKey === 'navigationStyle') {
102
+ const value = getStringLiteral(windowProp.initializer);
103
+ out.windowStyle = value;
104
+ if (value !== CUSTOM) {
105
+ out.invalid.push({ kind: 'window', value });
106
+ }
107
+ }
108
+ if (windowKey === 'navigationBarTextStyle') {
109
+ out.windowTextStyle = getStringLiteral(windowProp.initializer);
110
+ }
111
+ }
112
+ }
113
+ }
114
+
115
+ return out;
116
+ }
117
+
118
+ function visit(node) {
119
+ if (result) return;
120
+ if (ts.isExportAssignment(node) && !node.isExportEquals && node.expression) {
121
+ const expr = node.expression;
122
+ if (
123
+ ts.isCallExpression(expr) &&
124
+ expr.arguments[0] &&
125
+ ts.isObjectLiteralExpression(expr.arguments[0])
126
+ ) {
127
+ result = fromObjectLiteral(expr.arguments[0]);
128
+ } else if (ts.isObjectLiteralExpression(expr)) {
129
+ result = fromObjectLiteral(expr);
130
+ }
131
+ }
132
+ ts.forEachChild(node, visit);
133
+ }
134
+
135
+ visit(sf);
136
+ return result;
137
+ }
138
+
139
+ const CONFIG_MESSAGE =
140
+ '小程序页面必须使用自定义导航栏:navigationStyle 只能是 "custom",禁止改成 default 或其他值。' +
141
+ '页面顶部请用 <CustomNavSpace /> 或 useCustomNavLayout() 避让状态栏与胶囊。';
142
+
143
+ const TEXT_STYLE_MESSAGE =
144
+ '请根据该页面首次进入时顶部区域的实际明暗,显式设置 navigationBarTextStyle:' +
145
+ '浅色顶部使用 "black",深色顶部使用 "white"。';
146
+
147
+ /** @type {import('eslint').Rule.RuleModule} */
148
+ const requireCustomNavigationStyle = {
149
+ meta: {
150
+ type: 'problem',
151
+ docs: {
152
+ description: '强制自定义导航,并要求 app fallback 与每个页面显式声明导航前景色',
153
+ },
154
+ schema: [],
155
+ },
156
+ create(context) {
157
+ const filePath = context.filename.replace(/\\/g, '/');
158
+ const isApp = filePath.endsWith('/src/app.config.ts') || filePath.endsWith('src/app.config.ts');
159
+ const isPageConfig = /\/src\/pages\/.+\.config\.ts$/.test(filePath);
160
+ if (!isApp && !isPageConfig) return {};
161
+
162
+ return {
163
+ Program(node) {
164
+ const sourceText = context.sourceCode.getText(node);
165
+ const parsed = extractNavigationStyles(filePath, sourceText);
166
+
167
+ if (!parsed) {
168
+ context.report({
169
+ node,
170
+ message: `无法解析 ${isApp ? 'defineAppConfig' : 'definePageConfig'},请使用对象字面量声明。${CONFIG_MESSAGE}`,
171
+ });
172
+ return;
173
+ }
174
+
175
+ if (isApp && parsed.windowStyle !== CUSTOM) {
176
+ context.report({
177
+ node,
178
+ message:
179
+ `src/app.config.ts 的 window.navigationStyle 必须为 "custom"(当前:${parsed.windowStyle ?? '未设置'})。${CONFIG_MESSAGE}`,
180
+ });
181
+ }
182
+
183
+ const textStyle = isApp ? parsed.windowTextStyle : parsed.pageTextStyle;
184
+ if (!NAVIGATION_TEXT_STYLES.has(textStyle)) {
185
+ context.report({
186
+ node,
187
+ message:
188
+ `${isApp ? 'src/app.config.ts 的 window' : '页面配置'}.navigationBarTextStyle ` +
189
+ `必须为 "black" 或 "white"(当前:${textStyle ?? '未设置'})。${TEXT_STYLE_MESSAGE}`,
190
+ });
191
+ }
192
+
193
+ for (const item of parsed.invalid) {
194
+ if (isApp && item.kind === 'window') continue;
195
+ context.report({
196
+ node,
197
+ message:
198
+ `禁止将 ${item.kind === 'window' ? 'window.' : ''}navigationStyle 设为 ${JSON.stringify(item.value)}。${CONFIG_MESSAGE}`,
199
+ });
200
+ }
201
+ },
202
+ };
203
+ },
204
+ };
205
+
206
+ /** @type {import('eslint').Rule.RuleModule} */
207
+ const pagesMustUseCustomNavSpace = {
208
+ meta: {
209
+ type: 'problem',
210
+ docs: {
211
+ description: '页面入口必须使用 CustomNavSpace 或 useCustomNavLayout 避让自定义导航栏区域',
212
+ },
213
+ schema: [],
214
+ },
215
+ create(context) {
216
+ const filePath = context.filename.replace(/\\/g, '/');
217
+ if (!/\/src\/pages\/.+\/index\.[jt]sx$/.test(filePath)) return {};
218
+
219
+ let used = false;
220
+
221
+ return {
222
+ ImportDeclaration(node) {
223
+ if (typeof node.source.value === 'string' && CUSTOM_NAV_IMPORTS.has(node.source.value)) {
224
+ used = true;
225
+ }
226
+ },
227
+ 'Program:exit'(node) {
228
+ if (used) return;
229
+ context.report({
230
+ node,
231
+ message:
232
+ '小程序页面必须 import <CustomNavSpace /> 或 useCustomNavLayout() 做顶部避让,' +
233
+ '禁止改回原生导航,也禁止只用固定 pt-* / safe-area 代替。',
234
+ });
235
+ },
236
+ };
237
+ },
238
+ };
239
+
240
+ /** @type {import('eslint').Rule.RuleModule} */
241
+ const noNavigationControlApis = {
242
+ meta: {
243
+ type: 'problem',
244
+ docs: {
245
+ description: '禁止小程序页面调用会修改宿主导航栏或左上角按钮的 API',
246
+ },
247
+ schema: [],
248
+ },
249
+ create(context) {
250
+ function report(node, apiName) {
251
+ const reason = FORBIDDEN_NAVIGATION_APIS.get(apiName);
252
+ if (!reason) return;
253
+
254
+ context.report({
255
+ node,
256
+ message:
257
+ `小程序页面禁止使用 ${apiName}:${reason}。` +
258
+ '导航栏和左上角按钮由宿主及自定义导航模板统一管理。',
259
+ });
260
+ }
261
+
262
+ return {
263
+ MemberExpression(node) {
264
+ report(node.property, getStaticPropertyName(node));
265
+ },
266
+ ImportSpecifier(node) {
267
+ const importedName = node.imported.type === 'Identifier'
268
+ ? node.imported.name
269
+ : node.imported.value;
270
+ report(node.imported, importedName);
271
+ },
272
+ Property(node) {
273
+ if (node.parent.type !== 'ObjectPattern') return;
274
+ report(node.key, getPropertyKeyName(node));
275
+ },
276
+ CallExpression(node) {
277
+ if (node.callee.type !== 'Identifier') return;
278
+ report(node.callee, node.callee.name);
279
+ },
280
+ };
281
+ },
282
+ };
283
+
284
+ export default {
285
+ rules: {
286
+ 'require-custom-navigation-style': requireCustomNavigationStyle,
287
+ 'pages-must-use-custom-nav-space': pagesMustUseCustomNavSpace,
288
+ 'no-navigation-control-apis': noNavigationControlApis,
289
+ },
290
+ };
@@ -6,6 +6,7 @@ import reactHooksPlugin from 'eslint-plugin-react-hooks';
6
6
  import importPlugin from 'eslint-plugin-import';
7
7
  import globals from 'globals';
8
8
  import microappPages from './eslint-plugin-microapp-pages.mjs';
9
+ import customNavigation from './eslint-plugin-custom-navigation.mjs';
9
10
 
10
11
  const REMOTE_CSS_IMPORT_PATTERN =
11
12
  /@import\s+(?:url\(\s*['"]?((?:https?:)?\/\/[^'")\s]+)['"]?\s*\)|['"]((?:https?:)?\/\/[^'"\s]+)['"])/g;
@@ -69,7 +70,7 @@ function createLucideColorCheckPlugin(importSources = ['@open-dy/lucide-taro'])
69
70
  const cssImportGuardPlugin = {
70
71
  processors: {
71
72
  css: {
72
- preprocess(text) {
73
+ preprocess(text, filename) {
73
74
  const lines = text.replace(/\/\*[\s\S]*?\*\//g, comment => {
74
75
  if (comment.includes('eslint-')) return comment;
75
76
  return comment.replace(/[^\n]/g, ' ');
@@ -101,6 +102,18 @@ const cssImportGuardPlugin = {
101
102
  ].join(' ');
102
103
  });
103
104
 
105
+ // Scope this guard to the SDK-based host app; OpenCard has its own CSS pipeline.
106
+ if (filename.replaceAll('\\', '/').endsWith('/src/app.css')) {
107
+ const css = lines.join('\n');
108
+ const imports = [...css.matchAll(/@import\s+(?:url\(\s*)?['"]([^'"]+)['"]/g)]
109
+ .map(match => match[1]);
110
+ const usesSdkTheme = imports.some(value => /^@[^/]+\/vibecoding-sdk-taro\/ui\/tailwind\.css$/.test(value));
111
+ const hasUtilities = imports.some(value => ['weapp-tailwindcss', 'tailwindcss', 'tailwindcss/utilities.css', 'weapp-tailwindcss/utilities.css'].includes(value))
112
+ || /@tailwind\s+utilities\s*;/.test(css);
113
+ if (usesSdkTheme && !hasUtilities) {
114
+ virtualLines[0] = `${virtualLines[0] ?? ''} __cssMissingTailwindEntry();`;
115
+ }
116
+ }
104
117
  return [virtualLines.join('\n')];
105
118
  },
106
119
  postprocess(messages) {
@@ -249,6 +262,16 @@ function collectStaticStrings(node, result = []) {
249
262
 
250
263
  const tailwindEnforcementPlugin = {
251
264
  rules: {
265
+ 'require-utilities-entry': {
266
+ create(context) {
267
+ return {
268
+ CallExpression(node) {
269
+ if (node.callee?.name !== '__cssMissingTailwindEntry') return;
270
+ context.report({ node, message: 'src/app.css 缺少 Tailwind 工具类入口。请保留模板的 @import "weapp-tailwindcss";;SDK ui/tailwind.css 只提供主题和组件扫描,不能替代此入口。' });
271
+ },
272
+ };
273
+ },
274
+ },
252
275
  'no-arbitrary-font-size': {
253
276
  create(context) {
254
277
  function reportArbitraryFontSize(node, className) {
@@ -440,15 +463,25 @@ export function createMicroappTaroEslintConfig(options = {}) {
440
463
  'tailwindcss/no-custom-classname': 'off',
441
464
  },
442
465
  },
466
+ {
467
+ files: ['src/**/*.{js,jsx,ts,tsx}'],
468
+ plugins: { customNavigation },
469
+ rules: {
470
+ 'customNavigation/no-navigation-control-apis': 'error',
471
+ },
472
+ },
443
473
  {
444
474
  files: ['src/**/*.{js,jsx,ts,tsx}'],
445
475
  ignores: ['src/network.ts'],
446
476
  plugins: {
447
477
  lucide: lucideColorCheckPlugin,
448
478
  microappPages,
479
+ customNavigation,
449
480
  tailwind: tailwindEnforcementPlugin,
450
481
  },
451
482
  rules: {
483
+ 'customNavigation/require-custom-navigation-style': 'error',
484
+ 'customNavigation/pages-must-use-custom-nav-space': 'error',
452
485
  'microappPages/nav-url-in-app-pages': 'error',
453
486
  // 'microappPages/page-dirs-in-app-pages': 'error',
454
487
  'microappPages/declared-pages-must-exist': 'error',
@@ -508,6 +541,7 @@ export function createMicroappTaroEslintConfig(options = {}) {
508
541
  },
509
542
  processor: 'local/css',
510
543
  rules: {
544
+ 'tailwind/require-utilities-entry': 'error',
511
545
  'no-undef': 'off',
512
546
  'tailwind/no-arbitrary-font-size': 'error',
513
547
  'no-restricted-syntax': ['error', ...baseRestrictedSyntaxRules],