feat: Add support for Frigate reviews / detections [initial PR] (#2315)

- Add support for Frigate reviews / detections.
 - Add support for GenAI metadata.
- Significant internal refactor to more flexible "UnifiedQuery" to allow
mixing cameras with simple metadata and review metadata (e.g. a timeline
view of a Frigate camera with reviews, and a Reolink camera with simple
metadata).
 - Add support for folder media as camera media.

There are a few more PRs to commit prior to this going live, but
commiting this for now due to the scale of the change.

BREAKING CHANGE: `media_type` and `events_type` are retired under
`live`, `viewer` and `timeline` configuration sections, instead media
type is associated (once) with the camera under `media`.
This commit is contained in:
Dermot Duffy
2026-01-19 13:32:50 -08:00
committed by GitHub
parent 6eb0a87ca8
commit fc32727860
215 changed files with 14491 additions and 6160 deletions
+20 -11
View File
@@ -143,7 +143,8 @@ describe('CarouselController', () => {
carousel.selectSlide(11);
expect(getEmblaApi()?.scrollTo).toBeCalledWith(11, false);
// Should not call scrollTo or fire event because index is out of bounds
expect(getEmblaApi()?.scrollTo).not.toBeCalled();
expect(forceSelectListener).not.toBeCalled();
});
@@ -257,7 +258,7 @@ describe('CarouselController', () => {
);
});
it('should recreate carousel when children are added', () => {
it('should reinit carousel when children are added', () => {
const children = createTestSlideNodes();
const root = createRoot();
const parent = createParent({ children: children });
@@ -269,13 +270,17 @@ describe('CarouselController', () => {
expect(originalEmblaApi).toBeTruthy();
originalEmblaApi?.slideNodes.mockReturnValue(children);
parent.appendChild(document.createElement('div'));
const newChild = document.createElement('div');
parent.appendChild(newChild);
callMutationHandler();
expect(originalEmblaApi?.destroy).toBeCalled();
expect(getEmblaApi()).not.toBe(originalEmblaApi);
// Should call reInit instead of destroy/recreate
expect(originalEmblaApi?.reInit).toBeCalledWith({
slides: [...children, newChild],
});
expect(EmblaCarousel).toBeCalledTimes(2);
// Should still be same carousel instance (no new creation)
expect(EmblaCarousel).toBeCalledTimes(1);
});
it('should not recreate carousel when children have not changed', () => {
@@ -298,7 +303,7 @@ describe('CarouselController', () => {
expect(EmblaCarousel).toBeCalledTimes(1);
});
it('should recreate carousel when children are added to slot', () => {
it('should reinit carousel when children are added to slot', () => {
const children = createTestSlideNodes();
const slot = createSlot();
const host = createSlotHost({ slot: slot, children: children });
@@ -312,12 +317,16 @@ describe('CarouselController', () => {
originalEmblaApi?.slideNodes.mockReturnValue(children);
host.appendChild(document.createElement('div'));
const newChild = document.createElement('div');
host.appendChild(newChild);
slot.dispatchEvent(new Event('slotchange'));
expect(originalEmblaApi?.destroy).toBeCalled();
expect(getEmblaApi()).not.toBe(originalEmblaApi);
// Should call reInit instead of destroy/recreate
expect(originalEmblaApi?.reInit).toBeCalledWith({
slides: [...children, newChild],
});
expect(EmblaCarousel).toBeCalledTimes(2);
// Should still be same carousel instance (no new creation)
expect(EmblaCarousel).toBeCalledTimes(1);
});
});