mirror of
https://github.com/moeru-ai/airi.git
synced 2026-08-15 11:53:32 +00:00
|
Some checks are pending
CI / Build Test (ui-transitions) (push) Waiting to run
CI / Unit Test (push) Waiting to run
CI / Build Test (stage-tamagotchi-godot) (push) Waiting to run
CI / Build Test (stage-web) (push) Waiting to run
CI / Type Check (push) Waiting to run
CI / Check Provenance (push) Waiting to run
CI / Lint (push) Waiting to run
CI / Build Test (stage-tamagotchi) (push) Waiting to run
CI / Build Test (ui-loading-screens) (push) Waiting to run
Cloudflare Pages (Auth UI) / Deploy - ui-server-auth (push) Waiting to run
Cloudflare Workers / Deploy - stage-web (push) Waiting to run
|
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| stories | ||
| .env | ||
| env.d.ts | ||
| histoire.config.ts | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| uno.config.ts | ||
| vite.config.ts | ||
| vitest.config.ts | ||
Stage UI
Shared core for stage
Button analytics
Register the shared plugin once in each Vue application:
import { trackButtonPlugin } from '@proj-airi/stage-ui/directives/track-button'
createApp(App)
.use(trackButtonPlugin)
.mount('#app')
Buttons that represent a product-analysis click intent can then declare a typed event without wrapping their business handler:
<Button
v-track-button="{ name: 'update_check_clicked', channel: selectedChannel }"
@click="checkForUpdates()"
/>
Keep async outcomes, confirmed state changes, impressions, and lifecycle events in their owning business flows instead of attaching them to the initial click.
Histoire (UI storyboard)
pnpm -F @proj-airi/stage-ui run story:dev
Project structure
- If a story is bound to a specific component, it can be placed beside the component in the
srcfolder. e.g.,MyComponent.story.vue - If a story is not bound to a specific component, then it should be placed in the
storiesfolder. e.g.,MyStory.story.vue