import { type CurrentWritable } from '@threlte/core'; type UseDimensionsContext = { width: CurrentWritable; height: CurrentWritable; }; export declare const flexContextName = "__threlte-flex-dimensions"; /** * Creates a context for useDimensions. */ export declare const createUseDimensionsContext: () => UseDimensionsContext; /** * The hook `useDimensions` can be used to retrieve the computed width and * height of a `` or `` component as * [CurrentWritable](https://threlte.xyz/docs/reference/core/utilities#currentwritable) * stores. * * ## Usage * * ### In a `` component * * Because there's no viewport to measure, the width and height of a `` * component need to be set manually. Nevertheless, the dimensions of the * contents of the `` component will be measured after a layout reflow and * can be retrieved using `useDimensions` in a direct child component to * ``. * * ### In a `` component * * By default `@threlte/flex` controls elements position only. In some cases you * may want to control element sizing too. Since `@threlte/flex` has no * information about how the inner content size works, you need to set your * content size manually. You can do this by using `useDimensions` hook in a * direct child component to ``. * * @example * ```svelte * * * * * * * ``` */ export declare const useDimensions: () => UseDimensionsContext; export {};