@streamscloud/embeddable 7.1.0 → 7.2.0-1759155152977

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -75,8 +75,7 @@ export class InternalMediaCenterConfig {
75
75
  const settings = payload.data.embedMediaPagePlayerSettings;
76
76
  return {
77
77
  logo: settings.logo?.url || null,
78
- postCategories: settings.postCategories.map((c) => ({ id: c.id, name: c.name })),
79
- streamCategories: settings.streamCategories.map((c) => ({ id: c.id, name: c.name }))
78
+ contentCategories: settings.contentCategories.map((c) => ({ id: c.id, name: c.name, parentId: c.parentId }))
80
79
  };
81
80
  };
82
81
  }
@@ -8,13 +8,10 @@ export type GetMediaPageSettingsQuery = {
8
8
  logo: {
9
9
  url: string;
10
10
  } | null;
11
- postCategories: Array<{
12
- id: string;
13
- name: string;
14
- }>;
15
- streamCategories: Array<{
11
+ contentCategories: Array<{
16
12
  id: string;
17
13
  name: string;
14
+ parentId: string | null;
18
15
  }>;
19
16
  } | null;
20
17
  };
@@ -44,23 +44,13 @@ export const GetMediaPageSettingsDocument = {
44
44
  },
45
45
  {
46
46
  kind: 'Field',
47
- name: { kind: 'Name', value: 'postCategories' },
47
+ name: { kind: 'Name', value: 'contentCategories' },
48
48
  selectionSet: {
49
49
  kind: 'SelectionSet',
50
50
  selections: [
51
51
  { kind: 'Field', name: { kind: 'Name', value: 'id' } },
52
- { kind: 'Field', name: { kind: 'Name', value: 'name' } }
53
- ]
54
- }
55
- },
56
- {
57
- kind: 'Field',
58
- name: { kind: 'Name', value: 'streamCategories' },
59
- selectionSet: {
60
- kind: 'SelectionSet',
61
- selections: [
62
- { kind: 'Field', name: { kind: 'Name', value: 'id' } },
63
- { kind: 'Field', name: { kind: 'Name', value: 'name' } }
52
+ { kind: 'Field', name: { kind: 'Name', value: 'name' } },
53
+ { kind: 'Field', name: { kind: 'Name', value: 'parentId' } }
64
54
  ]
65
55
  }
66
56
  }
@@ -120,7 +110,7 @@ export const GetShortVideosDocument = {
120
110
  },
121
111
  {
122
112
  kind: 'FragmentDefinition',
123
- name: { kind: 'Name', value: 'ShortVideoViewerPayloadFragment' },
113
+ name: { kind: 'Name', value: 'PostViewerPayloadFragment' },
124
114
  typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Post' } },
125
115
  selectionSet: {
126
116
  kind: 'SelectionSet',
@@ -294,7 +284,7 @@ export const GetShortVideosDocument = {
294
284
  selectionSet: {
295
285
  kind: 'SelectionSet',
296
286
  selections: [
297
- { kind: 'FragmentSpread', name: { kind: 'Name', value: 'ShortVideoViewerPayloadFragment' } },
287
+ { kind: 'FragmentSpread', name: { kind: 'Name', value: 'PostViewerPayloadFragment' } },
298
288
  {
299
289
  kind: 'Field',
300
290
  name: { kind: 'Name', value: 'ownerProfile' },
@@ -3,13 +3,10 @@ query GetMediaPageSettings($mediaPageId: String!) {
3
3
  logo {
4
4
  url
5
5
  }
6
- postCategories {
7
- id
8
- name
9
- }
10
- streamCategories {
6
+ contentCategories {
11
7
  id
12
8
  name
9
+ parentId
13
10
  }
14
11
  }
15
12
  }
@@ -37,12 +37,12 @@ export interface IMediaCenterConfig {
37
37
  }
38
38
  export type MediaCenterSettings = {
39
39
  logo: string | null;
40
- postCategories: MediaCenterCategoryModel[];
41
- streamCategories: MediaCenterCategoryModel[];
40
+ contentCategories: MediaCenterCategoryModel[];
42
41
  };
43
42
  export type MediaCenterCategoryModel = {
44
43
  id: string;
45
44
  name: string;
45
+ parentId: string | null;
46
46
  };
47
47
  export type MediaCenterStreamPreviewModel = {
48
48
  id: string;
@@ -44,7 +44,7 @@ let streamsInCategoryData = $state.raw(null);
44
44
  let scrollResizeObserver = null;
45
45
  const overlayActivated = $derived(overviewOpened || streamsInCategoryOpened);
46
46
  const categories = $derived.by(() => {
47
- return (mediaCenterSettings === null || mediaCenterSettings === void 0 ? void 0 : mediaCenterSettings.postCategories) || [];
47
+ return (mediaCenterSettings === null || mediaCenterSettings === void 0 ? void 0 : mediaCenterSettings.contentCategories.filter((c) => !c.parentId)) || [];
48
48
  });
49
49
  const logo = $derived.by(() => {
50
50
  if (!mediaCenterSettings) {
@@ -8,7 +8,7 @@ export const ShortVideosPlayerPayloadFragmentDoc = {
8
8
  selectionSet: {
9
9
  kind: 'SelectionSet',
10
10
  selections: [
11
- { kind: 'FragmentSpread', name: { kind: 'Name', value: 'ShortVideoViewerPayloadFragment' } },
11
+ { kind: 'FragmentSpread', name: { kind: 'Name', value: 'PostViewerPayloadFragment' } },
12
12
  {
13
13
  kind: 'Field',
14
14
  name: { kind: 'Name', value: 'ownerProfile' },
@@ -25,7 +25,7 @@ export const ShortVideosPlayerPayloadFragmentDoc = {
25
25
  },
26
26
  {
27
27
  kind: 'FragmentDefinition',
28
- name: { kind: 'Name', value: 'ShortVideoViewerPayloadFragment' },
28
+ name: { kind: 'Name', value: 'PostViewerPayloadFragment' },
29
29
  typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Post' } },
30
30
  selectionSet: {
31
31
  kind: 'SelectionSet',
@@ -242,7 +242,7 @@ export const GetShortVideosDocument = {
242
242
  },
243
243
  {
244
244
  kind: 'FragmentDefinition',
245
- name: { kind: 'Name', value: 'ShortVideoViewerPayloadFragment' },
245
+ name: { kind: 'Name', value: 'PostViewerPayloadFragment' },
246
246
  typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Post' } },
247
247
  selectionSet: {
248
248
  kind: 'SelectionSet',
@@ -416,7 +416,7 @@ export const GetShortVideosDocument = {
416
416
  selectionSet: {
417
417
  kind: 'SelectionSet',
418
418
  selections: [
419
- { kind: 'FragmentSpread', name: { kind: 'Name', value: 'ShortVideoViewerPayloadFragment' } },
419
+ { kind: 'FragmentSpread', name: { kind: 'Name', value: 'PostViewerPayloadFragment' } },
420
420
  {
421
421
  kind: 'Field',
422
422
  name: { kind: 'Name', value: 'ownerProfile' },
@@ -9,7 +9,7 @@ query GetShortVideos($input: EmbedPostsInput!, $image_scale: ImageScale = ORIGIN
9
9
  }
10
10
 
11
11
  fragment ShortVideosPlayerPayloadFragment on Post {
12
- ...ShortVideoViewerPayloadFragment
12
+ ...PostViewerPayloadFragment
13
13
  ownerProfile {
14
14
  id
15
15
  type
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/embeddable",
3
- "version": "7.1.0",
3
+ "version": "7.2.0-1759155152977",
4
4
  "author": "StreamsCloud",
5
5
  "repository": {
6
6
  "type": "git",