mirror of
https://github.com/hiaaryan/sileo.git
synced 2026-04-26 23:45:50 +03:00
[PR #10] feat: add Vue 3 support via sileo/vue subpath export #22
Labels
No labels
bug
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/sileo#22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hiaaryan/sileo/pull/10
Author: @LokiWasHere
Created: 2/16/2026
Status: 🔄 Open
Base:
main← Head:vue-package📝 Commits (1)
75998a6feat: add Vue support and update README.md📊 Changes
16 files changed (+1991 additions, -726 deletions)
View changed files
📝
README.md(+56 -2)📝
bun.lock(+43 -6)📝
package.json(+27 -3)➕
src/core/store.ts(+207 -0)📝
src/core/types.ts(+8 -5)📝
src/index.ts(+3 -2)📝
src/react/icons.tsx(+0 -0)➕
src/react/index.ts(+22 -0)📝
src/react/sileo.tsx(+1 -2)➕
src/react/toaster.tsx(+262 -0)📝
src/styles.css(+263 -263)➖
src/toast.tsx(+0 -443)➕
src/vue/icons.ts(+63 -0)➕
src/vue/index.ts(+26 -0)➕
src/vue/sileo.ts(+737 -0)➕
src/vue/toaster.ts(+273 -0)📄 Description
Summary
Add Vue 3 support alongside the existing React adapter, making sileo a framework-agnostic toast library, closes #8.
src/core/) containing the toast store, API singleton, and generic types, with framework-specific adapters insrc/react/andsrc/vue/ToasterandSileocomponents to Vue 3 usingdefineComponent+h()render functions (no.vueSFCs, no SFC compiler needed) producing identical DOM structure and data attributes so all existing CSS animations work as-isisMountedgate for SSR/Nuxt compatibilitySileoOptions<Renderable>so each adapter re-exports types specialized to its framework (ReactNodefor React,VNodefor Vue)"sileo/vue"subpath export while keeping"sileo"fully backwards compatible for existing React consumers — zero breaking changesUsage
Test plan
import { sileo, Toaster } from "sileo") still work without changesimport { sileo, Toaster } from "sileo/vue"resolves correctly in a Vue 3 projectsuccess,error,warning,info,action,promise,dismiss,clear) from both adaptersbun run buildand confirm both entry points produce correct bundles with proper type declarations🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.