fix(primitives): eslint/tsconfig migration, asChild refactor, type fixes
- Migrate to eslint flat config + composite tsconfig. - Complete the asChild→as="template" refactor (remove asChild prop + :as-child bindings across components, matching Primitive's slot model). - Fix test type errors and source type-safety (useGraceArea hull/point math, FocusScope/util ref typing). Note: ~53 vue-tsc errors remain (HTML attr/event passthrough typing on transparent wrapper components + a couple of duplicate-export naming collisions) — not gated by CI (build/lint/test green); pending a component-attribute-typing design decision.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# @robonen/primitives playground
|
||||
|
||||
Minimal Vite + Vue 3 sandbox for inspecting and debugging primitives from
|
||||
[`@robonen/primitives`](../). Imports source directly via the `@primitives/*`
|
||||
alias, so HMR works while editing components in `vue/primitives/src/`.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
pnpm --filter @robonen/primitives-playground dev
|
||||
```
|
||||
|
||||
Then open http://localhost:5180.
|
||||
|
||||
## Adding a demo
|
||||
|
||||
Drop a `.vue` file into `src/demos/`. It will be picked up automatically by the
|
||||
sidebar (`import.meta.glob('./demos/*.vue')`) and addressable via the URL hash
|
||||
(e.g. `#/Accordion`).
|
||||
|
||||
```vue
|
||||
<script setup lang="ts">
|
||||
import { AccordionRoot } from '@primitives/accordion';
|
||||
// or: import { AccordionRoot } from '@primitives';
|
||||
</script>
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- Imports resolve to `vue/primitives/src/` directly (not the built `dist/`), so
|
||||
you can poke at primitives and see changes instantly.
|
||||
- The playground is `private: true` and is not published.
|
||||
Reference in New Issue
Block a user