I'm looking for assistance on retrieving all the unique AstroComponentFactory items from a slot inside a component. For example, I want to write this:
<Combobox.Container>
<Combobox.Options>
<Combobox.Option value="apple" label="Apple" />
<Combobox.Option value="banana" label="Banana" />
<Combobox.Option value="orange" label="Orange" />
</Combobox.Options>
</Combobox.Container>
And from this, I need to retrieve each Combobox.Option to render the custom dropdown element and to render the options inside the native select element. Yes, I know I can pass in a props array/object like this:
const options = [
{ label: "Apple", value: "apple", },
...
];
But I'm looking to create a headless library of sorts with the former syntax. If I could grab an array of items inside a slot like an array of AstroComponentFactory items, I feel like I could hack up a way to make it work. Anyone have ideas or suggestions?