|
|
@ -8,10 +8,18 @@ import type { |
|
|
|
} from "@ldo/connected-solid"; |
|
|
|
} from "@ldo/connected-solid"; |
|
|
|
import type { UseResourceOptions, createUseResource } from "@ldo/react"; |
|
|
|
import type { UseResourceOptions, createUseResource } from "@ldo/react"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @internal |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* Creates a useRootContainerFor function |
|
|
|
|
|
|
|
*/ |
|
|
|
export function createUseRootContainerFor( |
|
|
|
export function createUseRootContainerFor( |
|
|
|
dataset: ConnectedLdoDataset<SolidConnectedPlugin[]>, |
|
|
|
dataset: ConnectedLdoDataset<SolidConnectedPlugin[]>, |
|
|
|
useResource: ReturnType<typeof createUseResource<ConnectedPlugin[]>>, |
|
|
|
useResource: ReturnType<typeof createUseResource<ConnectedPlugin[]>>, |
|
|
|
) { |
|
|
|
) { |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Gets the root container for a specific URI |
|
|
|
|
|
|
|
*/ |
|
|
|
return function useRootContainerFor( |
|
|
|
return function useRootContainerFor( |
|
|
|
uri?: SolidContainerUri | SolidLeafUri, |
|
|
|
uri?: SolidContainerUri | SolidLeafUri, |
|
|
|
options?: UseResourceOptions<"solid">, |
|
|
|
options?: UseResourceOptions<"solid">, |
|
|
|