Codync
免费开源的 1:1 Grok Bot 与 Muse 替代方案。可在 iPhone、Mac 或 Linux 桌面上将 Claude 代码、Codex、Cursor 以及 40 多个编码代理作为持久机器人使用。支持群组聊天、线程、应用。
AI 翻译
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Morphing status icon for Svelte 5 — idle, loading, success, error, warning with smooth spring morphs
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗A status icon for Svelte 5. One stroke pours between idle, a spinner, a check, a cross, and a warning. The path is resampled so the spring can carry the same ink into the next shape, with a quiet color shift alongside.
Live demo: morph-status-svelte.vercel.app
npm install morph-status-svelte
Peer dependency: svelte ^5. The icon’s CSS ships inside the component. There are no other runtime dependencies.
<script lang="ts">
import { MorphStatus, type StatusName } from 'morph-status-svelte';
let phase = $state<StatusName>('idle');
</script>
<MorphStatus
state={phase}
size={32}
strokeWidth={10}
stiffness={0.2}
damping={0.72}
onchange={(next) => console.log('morph', next)}
oncomplete={(next) => console.log('settled', next)}
/>
Keep the variable you pass out of the name state — a local called state collides with the $state rune.
A save button is the usual place it shows up. announce={false} leaves the accessible name to the button.
<script lang="ts">
import { MorphStatus, type StatusName } from 'morph-status-svelte';
let phase = $state<StatusName>('idle');
async function save() {
phase = 'loading';
const ok = await persist();
phase = ok ? 'success' : 'error';
}
</script>
<button type="button" onclick={save} disabled={phase === 'loading'}>
<MorphStatus state={phase} size={22} announce={false} />
{phase === 'loading' ? 'Saving' : 'Save'}
</button>
| Prop | Default | |
|---|---|---|
state | 'idle' | 'idle' | 'loading' | 'success' | 'error' | 'warning' |
size | 32 | CSS pixels. The drawing is a 100×100 grid, so it stays sharp at any size. |
strokeWidth | 10 | Stroke width in that 100×100 grid. |
colors | system colors | Partial map of hex or rgb() colors per state. |
stiffness | 0.2 | Svelte spring stiffness, clamped to 0–1. Higher is faster. |
damping | 0.72 | Svelte spring damping, clamped to 0–1. Lower overshoots. |
label | — | One accessible name for every state. |
labels | Idle, Loading, Success, Error, Warning | Accessible name per state. |
announce | true | Polite live region. Set false inside a control that already has a name. |
onchange | — | Called when a morph starts, after the first render. |
oncomplete | — | Called when the springs settle on the new state. |
class | — | Class on the root element. |
Default colors are the Apple system set: gray, blue, green, red, yellow.
<MorphStatus
state={phase}
colors={{ success: '#63E6BE', error: '#FF375F' }}
/>
prefers-reduced-motion: reduce snaps the spring and holds the spinner still.role="status") whose label follows the state. Pass label for a single name, or labels to rename each one.Requires Node >=22.17.
npm install
npm run dev
The demo serves at http://127.0.0.1:4731. npm run build builds the demo site. npm run package writes the library to dist/ and runs publint. npm run check and npm run lint cover types and ESLint.
In this repo the demo imports the component through #lib. Published apps import morph-status-svelte.
MIT © Emil Majer