Conversation
Add @dunky.dev/state-machine-vue, mirroring the React package's API one-for-one (useMachine, useSelector, normalize, mergeProps, ComponentEffect/ComponentEffects) implemented with Vue reactivity: - useMachine builds machine+connector once in setup(), drives a shallowRef off the connector snapshot (exposed as a ComputedRef), pushes props via watch->setProps, runs start/stop on the mount lifecycle, and runs each ComponentEffect as its own dep-keyed watch. - useSelector returns a value-deduped readonly ref. - normalize translates agnostic bindings to Vue DOM/ARIA props (onPress->onClick, onValueChange->onInput, focusable->tabindex, ...). - mergeProps merges consumer + component props with Vue's class/style conventions. Wire the package into tsdown, tsconfig paths, the docs sidebar, and a new libs/vue.mdx; add a changeset. Add sandbox/vue (SFCs) driving the shared cmdk core through the new bindings. Co-authored-by: Claude <noreply@anthropic.com>
Rewrite the useMachine / useSelector / normalize / mergeProps examples in the Vue README and docs page to lead with SFC <script setup> + <template> (v-bind) syntax instead of h() render functions — matching how the sandbox is written and what Vue developers expect. Keep a short note that the same api/normalize output works in JSX or a manual h() render function. Co-authored-by: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
# Conflicts: # tsconfig.json
- Rename @dunky.dev/state-machine-vue -> @dunky.dev/vue-state-machine, matching the <substrate>-state-machine naming every other target uses. - Version 0.3.2, in step with the fixed @dunky.dev/* group. - Ship src alongside dist (parity with #53). - Drop the ComponentEffects alias — react removed it; every target exports the ComponentEffect tuple alone. - Kebab-case the sandbox SFC filenames and format, fixing the lint and format CI failures. - Add vue to the substrate enumerations in AGENTS/ARCHITECTURE. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Member
Author
|
Brought the branch up to date with main and fixed the red checks:
Verified locally: 360/360 tests, typecheck, build + publint all green. The dunky-ui Vue substrate ( |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Same code — the mechanism essays in useMachine/useSelector/normalize/ mergeProps compressed to the load-bearing constraints (props-proxy identity, array-of-getters watch sources, Vue's event-name casing). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The tables show the common subset; the source is the exhaustive list — same pointer the react docs carry. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Semantic resolution beyond the textual conflict: normalize's maps are now vocabulary-typed (HandlerTargets/AttrTargets + key-cast reads), the shared conformance fixture covers the vue ledgers, workspace deps pin exact per the versioning policy, and the never-published package starts at 0.0.0 instead of the lockstep-era 0.3.2. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
@dunky.dev/state-machine-vue— Vue 3 bindings for the renderer-agnostic core, mirroring the React package's API one-for-one.Package (
packages/vue)useMachine(createConfig, connect, effects, props)— builds machine + connector once insetup(), drives ashallowRefoff the connector snapshot (exposed as aComputedRef), pushes prop changes viawatch → setProps, runsstart/stopon the mount lifecycle, and runs eachComponentEffectas its own dep-keyedwatch. Returns{ api, machine }.useSelector(machine, selector, isEqual?)— value-deduped readonly ref, disposed on scope teardown.normalize(bindings)— agnostic bindings → Vue DOM/ARIA props (onPress→onClick,onValueChange→onInput,focusable→tabindex, payload adapters).mergeProps(consumer, library)— handler chaining + Vueclass/styleconventions.Wiring & docs
tsdown.config.ts,tsconfig.jsonpaths, the docs sidebar; newwebsite/.../libs/vue.mdx; changeset added.sandbox/vue— SFC sandbox driving the shared@sandbox/cmdk-coremachine (needs@vitejs/plugin-vue@^6for Vite 8).<script setup>+<template>(v-bind), noth().Verification
vitest run packages/vue— 48/48 passpnpm test:ci(full repo) — 355/355 passpnpm typecheck(repo) +vue-tsc(sandbox) — cleanpnpm build— vue package builds with isolated-declarations + publint clean