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,20 @@
|
||||
import type { Ref } from 'vue';
|
||||
import { useContextFactory } from '@robonen/vue';
|
||||
|
||||
export interface NumberFieldContext {
|
||||
value: Ref<number | null>;
|
||||
min: Ref<number | undefined>;
|
||||
max: Ref<number | undefined>;
|
||||
step: Ref<number>;
|
||||
disabled: Ref<boolean>;
|
||||
readonly: Ref<boolean>;
|
||||
increment: (delta?: number) => void;
|
||||
decrement: (delta?: number) => void;
|
||||
setValue: (v: number | null) => void;
|
||||
inputId: string;
|
||||
}
|
||||
|
||||
const ctx = useContextFactory<NumberFieldContext>('NumberFieldContext');
|
||||
|
||||
export const provideNumberFieldContext = ctx.provide;
|
||||
export const useNumberFieldContext = ctx.inject;
|
||||
Reference in New Issue
Block a user