import type { Updater } from './core' export function createGridState( initialValue: TState, ): [() => TState, (updater: Updater) => void] { let value = $state(initialValue) return [ () => value, (updater: Updater) => { if (updater instanceof Function) value = updater(value) else value = updater }, ] } export const createSvGridState = createGridState