@streamscloud/embeddable 13.3.0 → 14.0.0-rc.0

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.
Files changed (32) hide show
  1. package/dist/content-player/cmp.content-player.svelte.d.ts +15 -6
  2. package/dist/content-player/controls-and-attachments.svelte.d.ts +14 -5
  3. package/dist/content-player/overview-panel.svelte +3 -1
  4. package/dist/content-player/overview-panel.svelte.d.ts +14 -5
  5. package/dist/core/analytics.installation-id.d.ts +5 -0
  6. package/dist/core/{analytics.profile-id.js → analytics.installation-id.js} +20 -10
  7. package/dist/external-api/data-providers/internal-media-center-analytics-handler.d.ts +14 -14
  8. package/dist/external-api/data-providers/internal-media-center-analytics-handler.js +170 -19
  9. package/dist/external-api/data-providers/internal-post-analytics-handler.d.ts +7 -7
  10. package/dist/external-api/data-providers/internal-post-analytics-handler.js +72 -11
  11. package/dist/external-api/data-providers/internal-stream-analytics-handler.d.ts +12 -13
  12. package/dist/external-api/data-providers/internal-stream-analytics-handler.js +162 -18
  13. package/dist/external-api/data-providers/mapper.d.ts +3 -0
  14. package/dist/external-api/data-providers/mapper.js +18 -0
  15. package/dist/external-api/data-providers/post-data-loaders/mapper.js +1 -3
  16. package/dist/media-center/media-center/discover/discover-view.svelte +33 -11
  17. package/dist/media-center/media-center/menu/menu.svelte +5 -3
  18. package/dist/media-center/media-center/streams-in-category/streams-in-category-panel.svelte +6 -2
  19. package/dist/posts/posts-player/posts-player-view.svelte +2 -5
  20. package/dist/posts/posts-player/types.d.ts +3 -5
  21. package/dist/streams/streams-player/streams-player-view.svelte +0 -3
  22. package/dist/streams/streams-player/types.d.ts +0 -1
  23. package/dist/ui/button/resources/button-theme.svelte +4 -2
  24. package/dist/ui/icon/cmp.icon.svelte +1 -1
  25. package/dist/ui/player/button/cmp.player-button.svelte +3 -1
  26. package/dist/ui/player/button/cmp.player-buttons-group.svelte +3 -1
  27. package/dist/ui/player/slider/cmp.player-slider.svelte.d.ts +14 -5
  28. package/dist/ui/player/slider-horizontal/cmp.slider.svelte +6 -2
  29. package/dist/ui/player/slider-horizontal/cmp.slider.svelte.d.ts +12 -5
  30. package/dist/ui/shadow-dom/cmp.shadow-root.svelte +2 -2
  31. package/package.json +2 -2
  32. package/dist/core/analytics.profile-id.d.ts +0 -5
@@ -1,17 +1,26 @@
1
1
  import type { ContentPlayerConfig } from './content-player-config.svelte';
2
2
  import { type Snippet } from 'svelte';
3
- declare class __sveltets_Render<T extends {
3
+ declare function $$render<T extends {
4
4
  id: string;
5
- }> {
6
- props(): {
5
+ }>(): {
6
+ props: {
7
7
  config: ContentPlayerConfig<T>;
8
8
  nonPostItemView?: Snippet<[{
9
9
  item: T;
10
- }]> | undefined;
10
+ }]>;
11
11
  overviewPanelContent?: Snippet;
12
12
  };
13
- events(): {};
14
- slots(): {};
13
+ exports: {};
14
+ bindings: "";
15
+ slots: {};
16
+ events: {};
17
+ };
18
+ declare class __sveltets_Render<T extends {
19
+ id: string;
20
+ }> {
21
+ props(): ReturnType<typeof $$render<T>>['props'];
22
+ events(): ReturnType<typeof $$render<T>>['events'];
23
+ slots(): ReturnType<typeof $$render<T>>['slots'];
15
24
  bindings(): "";
16
25
  exports(): {};
17
26
  }
@@ -1,13 +1,22 @@
1
1
  import { ContentPlayerConfig } from './content-player-config.svelte';
2
- declare class __sveltets_Render<T extends {
2
+ declare function $$render<T extends {
3
3
  id: string;
4
- }> {
5
- props(): {
4
+ }>(): {
5
+ props: {
6
6
  config: ContentPlayerConfig<T>;
7
7
  hasOverview: boolean;
8
8
  };
9
- events(): {};
10
- slots(): {};
9
+ exports: {};
10
+ bindings: "";
11
+ slots: {};
12
+ events: {};
13
+ };
14
+ declare class __sveltets_Render<T extends {
15
+ id: string;
16
+ }> {
17
+ props(): ReturnType<typeof $$render<T>>['props'];
18
+ events(): ReturnType<typeof $$render<T>>['events'];
19
+ slots(): ReturnType<typeof $$render<T>>['slots'];
11
20
  bindings(): "";
12
21
  exports(): {};
13
22
  }
@@ -59,7 +59,6 @@ const styles = $derived.by(() => {
59
59
  z-index: 0;
60
60
  border-radius: 0.5rem 0 0 0.5rem;
61
61
  background: var(--_overview-panel--background);
62
- /* Set 'container-type: inline-size;' to reference container*/
63
62
  }
64
63
  .overview-panel__content {
65
64
  width: 100%;
@@ -71,6 +70,9 @@ const styles = $derived.by(() => {
71
70
  overflow: hidden;
72
71
  container-type: inline-size;
73
72
  }
73
+ .overview-panel {
74
+ /* Set 'container-type: inline-size;' to reference container*/
75
+ }
74
76
  @container (width < 576px) {
75
77
  .overview-panel {
76
78
  width: 100%;
@@ -1,10 +1,10 @@
1
1
  import type { ContentPlayerConfig } from './content-player-config.svelte';
2
2
  import type { ContentPlayerUIManager } from './ui-manager.svelte';
3
3
  import type { Snippet } from 'svelte';
4
- declare class __sveltets_Render<T extends {
4
+ declare function $$render<T extends {
5
5
  id: string;
6
- }> {
7
- props(): {
6
+ }>(): {
7
+ props: {
8
8
  config: ContentPlayerConfig<T>;
9
9
  uiManager: ContentPlayerUIManager;
10
10
  position: {
@@ -14,8 +14,17 @@ declare class __sveltets_Render<T extends {
14
14
  };
15
15
  children: Snippet;
16
16
  };
17
- events(): {};
18
- slots(): {};
17
+ exports: {};
18
+ bindings: "";
19
+ slots: {};
20
+ events: {};
21
+ };
22
+ declare class __sveltets_Render<T extends {
23
+ id: string;
24
+ }> {
25
+ props(): ReturnType<typeof $$render<T>>['props'];
26
+ events(): ReturnType<typeof $$render<T>>['events'];
27
+ slots(): ReturnType<typeof $$render<T>>['slots'];
19
28
  bindings(): "";
20
29
  exports(): {};
21
30
  }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Retrieves the installation ID from localStorage or generates a new one if it doesn't exist
3
+ * @returns The installation ID to use for analytics tracking
4
+ */
5
+ export declare const getOrCreateInstallationId: () => string;
@@ -1,19 +1,29 @@
1
1
  /**
2
- * Key used for storing the profile ID in local storage
2
+ * Key used for storing the installation ID in local storage (new)
3
+ */
4
+ const INSTALLATION_ID_STORAGE_KEY = 'streamscloud_installation_id';
5
+ /**
6
+ * Legacy key used for storing the profile ID in local storage (to be migrated)
3
7
  */
4
8
  const PROFILE_ID_STORAGE_KEY = 'streamscloud_profile_id';
5
9
  /**
6
- * Retrieves the profile ID from localStorage or generates a new one if it doesn't exist
7
- * @returns The profile ID to use for analytics tracking
10
+ * Retrieves the installation ID from localStorage or generates a new one if it doesn't exist
11
+ * @returns The installation ID to use for analytics tracking
8
12
  */
9
- export const getOrCreateProfileId = () => {
10
- const storedProfileId = localStorage.getItem(PROFILE_ID_STORAGE_KEY);
11
- if (!storedProfileId) {
12
- const newProfileId = safeRandomUUID();
13
- localStorage.setItem(PROFILE_ID_STORAGE_KEY, newProfileId);
14
- return newProfileId;
13
+ export const getOrCreateInstallationId = () => {
14
+ const currentId = localStorage.getItem(INSTALLATION_ID_STORAGE_KEY);
15
+ if (currentId) {
16
+ return currentId;
17
+ }
18
+ const legacyId = localStorage.getItem(PROFILE_ID_STORAGE_KEY);
19
+ if (legacyId) {
20
+ localStorage.setItem(INSTALLATION_ID_STORAGE_KEY, legacyId);
21
+ localStorage.removeItem(PROFILE_ID_STORAGE_KEY);
22
+ return legacyId;
15
23
  }
16
- return storedProfileId;
24
+ const newInstallationId = safeRandomUUID();
25
+ localStorage.setItem(INSTALLATION_ID_STORAGE_KEY, newInstallationId);
26
+ return newInstallationId;
17
27
  };
18
28
  function safeRandomUUID() {
19
29
  // 1) Native support
@@ -1,20 +1,20 @@
1
+ import type { PostType } from '../..';
1
2
  import type { IPostAnalyticsHandler } from '../../posts/posts-player/types';
2
3
  import type { IStreamAnalyticsHandler } from '../../streams/streams-player/types';
3
4
  export declare class InternalMediaCenterAnalyticsHandler implements IPostAnalyticsHandler, IStreamAnalyticsHandler {
4
5
  constructor(graphqlOrigin: string | undefined);
5
- setOrganizationId: (organizationId: string) => void;
6
- trackPostOpened: (postId: string, ownerId: string) => void;
7
- trackStreamView: (streamId: string) => void;
8
- trackStreamPageView: (pageId: string, streamId: string) => void;
9
- trackStreamEngagementTime: (streamId: string, engagementTime: number) => void;
10
- trackStreamScrollDepth: (streamId: string, scrollDepth: number) => void;
11
- trackStreamProductImpression: (productId: string, streamId: string) => void;
12
- trackStreamProductClicked: (productId: string, streamId: string) => void;
13
- reportPageVideoViews: (videoId: string, streamId: string) => void;
14
- trackShortVideoView: (videoId: string) => void;
15
- trackShortVideoProductImpression: (productId: string, videoId: string) => void;
16
- trackShortVideoProductClick: (productId: string, videoId: string) => void;
6
+ trackPostOpened: (postType: PostType, postId: string) => Promise<void>;
7
+ trackStreamView: (streamId: string) => Promise<void>;
8
+ trackStreamPageView: (pageId: string, streamId: string) => Promise<void>;
9
+ trackStreamEngagementTime: (streamId: string, engagementTime: number) => Promise<void>;
10
+ trackStreamScrollDepth: (streamId: string, scrollDepth: number) => Promise<void>;
11
+ trackStreamProductImpression: (productId: string, streamId: string) => Promise<void>;
12
+ trackStreamProductClicked: (productId: string, streamId: string) => Promise<void>;
13
+ reportPageVideoViews: (pageId: string, streamId: string) => Promise<import("@streamscloud/streams-analytics-collector").MeasurementsBatchReportResult>;
14
+ trackShortVideoView: (videoId: string) => Promise<void>;
15
+ trackShortVideoProductImpression: (productId: string, videoId: string) => Promise<void>;
16
+ trackShortVideoProductClick: (productId: string, videoId: string) => Promise<void>;
17
17
  trackShortVideoProgress: (pageId: string, videoId: string, progress: number, streamId: string) => void;
18
- trackAdClick: (adId: string) => void;
19
- trackAdImpression: (adId: string) => void;
18
+ trackAdClick: (adId: string) => Promise<void>;
19
+ trackAdImpression: (adId: string) => Promise<void>;
20
20
  }
@@ -1,24 +1,175 @@
1
- import { getOrCreateProfileId } from '../../core/analytics.profile-id';
1
+ import { getOrCreateInstallationId } from '../../core/analytics.installation-id';
2
2
  import { constructGraphQLUrl } from '../../core/graphql';
3
- import { AppEventsTracker } from '@streamscloud/streams-analytics-collector';
3
+ import { mapPostTypeToEntityType } from './mapper';
4
+ import { AnalyticsCollector, EntityRelationType, EntityType, EventType, MeasurementType, Schemas } from '@streamscloud/streams-analytics-collector';
4
5
  export class InternalMediaCenterAnalyticsHandler {
5
6
  constructor(graphqlOrigin) {
6
- AppEventsTracker.setEndpoint(constructGraphQLUrl(graphqlOrigin));
7
- AppEventsTracker.setProfileId(getOrCreateProfileId());
7
+ AnalyticsCollector.initialize({
8
+ gqlDataSenderOptions: {
9
+ endpoint: constructGraphQLUrl(graphqlOrigin)
10
+ },
11
+ schema: Schemas.external,
12
+ metadata: {
13
+ installationId: getOrCreateInstallationId()
14
+ }
15
+ });
8
16
  }
9
- setOrganizationId = (organizationId) => AppEventsTracker.setOrganizationId(organizationId);
10
- trackPostOpened = (postId, ownerId) => AppEventsTracker.trackPostOpened(postId, ownerId);
11
- trackStreamView = (streamId) => AppEventsTracker.trackStreamView(streamId);
12
- trackStreamPageView = (pageId, streamId) => AppEventsTracker.trackStreamPageView(pageId, streamId);
13
- trackStreamEngagementTime = (streamId, engagementTime) => AppEventsTracker.trackStreamEngagementTime(streamId, engagementTime);
14
- trackStreamScrollDepth = (streamId, scrollDepth) => AppEventsTracker.trackStreamScrollDepth(streamId, scrollDepth);
15
- trackStreamProductImpression = (productId, streamId) => AppEventsTracker.trackStreamProductImpression(productId, streamId);
16
- trackStreamProductClicked = (productId, streamId) => AppEventsTracker.trackStreamProductClicked(productId, streamId);
17
- reportPageVideoViews = (videoId, streamId) => AppEventsTracker.reportPageVideoViews(videoId, streamId);
18
- trackShortVideoView = (videoId) => AppEventsTracker.trackShortVideoView(videoId);
19
- trackShortVideoProductImpression = (productId, videoId) => AppEventsTracker.trackShortVideoProductImpression(productId, videoId);
20
- trackShortVideoProductClick = (productId, videoId) => AppEventsTracker.trackShortVideoProductClick(productId, videoId);
21
- trackShortVideoProgress = (pageId, videoId, progress, streamId) => AppEventsTracker.trackShortVideoProgress(pageId, videoId, progress, streamId);
22
- trackAdClick = (adId) => AppEventsTracker.trackAdClick(adId);
23
- trackAdImpression = (adId) => AppEventsTracker.trackAdImpression(adId);
17
+ trackPostOpened = (postType, postId) => AnalyticsCollector.eventsReporter.reportEvent({
18
+ entity: {
19
+ type: mapPostTypeToEntityType(postType),
20
+ id: postId
21
+ },
22
+ eventType: EventType.Viewed
23
+ });
24
+ trackStreamView = (streamId) => AnalyticsCollector.eventsReporter.reportEvent({
25
+ entity: {
26
+ type: EntityType.Stream,
27
+ id: streamId
28
+ },
29
+ eventType: EventType.Viewed
30
+ });
31
+ trackStreamPageView = (pageId, streamId) => AnalyticsCollector.eventsReporter.reportEvent({
32
+ entity: {
33
+ type: EntityType.StreamPage,
34
+ id: pageId
35
+ },
36
+ eventType: EventType.Viewed,
37
+ relatedEntities: [
38
+ {
39
+ relationType: EntityRelationType.PlacedIn,
40
+ entity: {
41
+ type: EntityType.Stream,
42
+ id: streamId
43
+ }
44
+ }
45
+ ]
46
+ });
47
+ trackStreamEngagementTime = (streamId, engagementTime) => AnalyticsCollector.measurementsReporter.reportMeasurement({
48
+ entity: {
49
+ type: EntityType.Stream,
50
+ id: streamId
51
+ },
52
+ measurementType: MeasurementType.EngagementTime,
53
+ value: engagementTime
54
+ });
55
+ trackStreamScrollDepth = (streamId, scrollDepth) => AnalyticsCollector.measurementsReporter.reportMeasurement({
56
+ entity: {
57
+ type: EntityType.Stream,
58
+ id: streamId
59
+ },
60
+ measurementType: MeasurementType.ScrollDepth,
61
+ value: scrollDepth
62
+ });
63
+ trackStreamProductImpression = (productId, streamId) => AnalyticsCollector.eventsReporter.reportEvent({
64
+ entity: {
65
+ type: EntityType.Product,
66
+ id: productId
67
+ },
68
+ eventType: EventType.Appeared,
69
+ relatedEntities: [
70
+ {
71
+ relationType: EntityRelationType.PlacedIn,
72
+ entity: {
73
+ type: EntityType.Stream,
74
+ id: streamId
75
+ }
76
+ }
77
+ ]
78
+ });
79
+ trackStreamProductClicked = (productId, streamId) => AnalyticsCollector.eventsReporter.reportEvent({
80
+ entity: {
81
+ type: EntityType.Product,
82
+ id: productId
83
+ },
84
+ eventType: EventType.Clicked,
85
+ relatedEntities: [
86
+ {
87
+ relationType: EntityRelationType.PlacedIn,
88
+ entity: {
89
+ type: EntityType.Stream,
90
+ id: streamId
91
+ }
92
+ }
93
+ ]
94
+ });
95
+ reportPageVideoViews = (pageId, streamId) => AnalyticsCollector.measurementsBatcher.reportBatch([
96
+ {
97
+ type: EntityType.StreamPage,
98
+ id: pageId
99
+ },
100
+ {
101
+ type: EntityType.Stream,
102
+ id: streamId
103
+ }
104
+ ]);
105
+ trackShortVideoView = (videoId) => AnalyticsCollector.eventsReporter.reportEvent({
106
+ entity: {
107
+ type: EntityType.ShortVideo,
108
+ id: videoId
109
+ },
110
+ eventType: EventType.Viewed
111
+ });
112
+ trackShortVideoProductImpression = (productId, videoId) => AnalyticsCollector.eventsReporter.reportEvent({
113
+ entity: {
114
+ type: EntityType.Product,
115
+ id: productId
116
+ },
117
+ eventType: EventType.Appeared,
118
+ relatedEntities: [
119
+ {
120
+ relationType: EntityRelationType.PlacedIn,
121
+ entity: {
122
+ type: EntityType.ShortVideo,
123
+ id: videoId
124
+ }
125
+ }
126
+ ]
127
+ });
128
+ trackShortVideoProductClick = (productId, videoId) => AnalyticsCollector.eventsReporter.reportEvent({
129
+ entity: {
130
+ type: EntityType.Product,
131
+ id: productId
132
+ },
133
+ eventType: EventType.Clicked,
134
+ relatedEntities: [
135
+ {
136
+ relationType: EntityRelationType.PlacedIn,
137
+ entity: {
138
+ type: EntityType.ShortVideo,
139
+ id: videoId
140
+ }
141
+ }
142
+ ]
143
+ });
144
+ trackShortVideoProgress = (pageId, videoId, progress, streamId) => AnalyticsCollector.measurementsBatcher.collect([
145
+ {
146
+ type: EntityType.StreamPage,
147
+ id: pageId
148
+ },
149
+ {
150
+ type: EntityType.Stream,
151
+ id: streamId
152
+ }
153
+ ], {
154
+ entity: {
155
+ type: EntityType.ShortVideo,
156
+ id: videoId
157
+ },
158
+ measurementType: MeasurementType.Progress,
159
+ value: progress
160
+ });
161
+ trackAdClick = (adId) => AnalyticsCollector.eventsReporter.reportEvent({
162
+ entity: {
163
+ type: EntityType.Ad,
164
+ id: adId
165
+ },
166
+ eventType: EventType.Clicked
167
+ });
168
+ trackAdImpression = (adId) => AnalyticsCollector.eventsReporter.reportEvent({
169
+ entity: {
170
+ type: EntityType.Ad,
171
+ id: adId
172
+ },
173
+ eventType: EventType.Appeared
174
+ });
24
175
  }
@@ -1,11 +1,11 @@
1
+ import type { PostType } from '../../core/enums';
1
2
  import type { IPostAnalyticsHandler } from '../../posts/posts-player';
2
3
  export declare class InternalPostAnalyticsHandler implements IPostAnalyticsHandler {
3
4
  constructor(graphqlOrigin: string | undefined);
4
- setOrganizationId: (organizationId: string) => void;
5
- trackPostOpened: (postId: string, ownerId: string) => void;
6
- trackShortVideoView: (videoId: string) => void;
7
- trackShortVideoProductImpression: (productId: string, videoId: string) => void;
8
- trackShortVideoProductClick: (productId: string, videoId: string) => void;
9
- trackAdClick: (adId: string) => void;
10
- trackAdImpression: (adId: string) => void;
5
+ trackPostOpened: (postType: PostType, postId: string) => Promise<void>;
6
+ trackShortVideoView: (videoId: string) => Promise<void>;
7
+ trackShortVideoProductImpression: (productId: string, videoId: string) => Promise<void>;
8
+ trackShortVideoProductClick: (productId: string, videoId: string) => Promise<void>;
9
+ trackAdClick: (adId: string) => Promise<void>;
10
+ trackAdImpression: (adId: string) => Promise<void>;
11
11
  }
@@ -1,16 +1,77 @@
1
- import { getOrCreateProfileId } from '../../core/analytics.profile-id';
1
+ import { getOrCreateInstallationId } from '../../core/analytics.installation-id';
2
2
  import { constructGraphQLUrl } from '../../core/graphql';
3
- import { AppEventsTracker } from '@streamscloud/streams-analytics-collector';
3
+ import { mapPostTypeToEntityType } from './mapper';
4
+ import { AnalyticsCollector, EntityRelationType, EntityType, EventType, Schemas } from '@streamscloud/streams-analytics-collector';
4
5
  export class InternalPostAnalyticsHandler {
5
6
  constructor(graphqlOrigin) {
6
- AppEventsTracker.setEndpoint(constructGraphQLUrl(graphqlOrigin));
7
- AppEventsTracker.setProfileId(getOrCreateProfileId());
7
+ AnalyticsCollector.initialize({
8
+ gqlDataSenderOptions: {
9
+ endpoint: constructGraphQLUrl(graphqlOrigin)
10
+ },
11
+ schema: Schemas.external,
12
+ metadata: {
13
+ installationId: getOrCreateInstallationId()
14
+ }
15
+ });
8
16
  }
9
- setOrganizationId = (organizationId) => AppEventsTracker.setOrganizationId(organizationId);
10
- trackPostOpened = (postId, ownerId) => AppEventsTracker.trackPostOpened(postId, ownerId);
11
- trackShortVideoView = (videoId) => AppEventsTracker.trackShortVideoView(videoId);
12
- trackShortVideoProductImpression = (productId, videoId) => AppEventsTracker.trackShortVideoProductImpression(productId, videoId);
13
- trackShortVideoProductClick = (productId, videoId) => AppEventsTracker.trackShortVideoProductClick(productId, videoId);
14
- trackAdClick = (adId) => AppEventsTracker.trackAdClick(adId);
15
- trackAdImpression = (adId) => AppEventsTracker.trackAdImpression(adId);
17
+ trackPostOpened = (postType, postId) => AnalyticsCollector.eventsReporter.reportEvent({
18
+ entity: {
19
+ type: mapPostTypeToEntityType(postType),
20
+ id: postId
21
+ },
22
+ eventType: EventType.Viewed
23
+ });
24
+ trackShortVideoView = (videoId) => AnalyticsCollector.eventsReporter.reportEvent({
25
+ entity: {
26
+ type: EntityType.ShortVideo,
27
+ id: videoId
28
+ },
29
+ eventType: EventType.Viewed
30
+ });
31
+ trackShortVideoProductImpression = (productId, videoId) => AnalyticsCollector.eventsReporter.reportEvent({
32
+ entity: {
33
+ type: EntityType.Product,
34
+ id: productId
35
+ },
36
+ eventType: EventType.Appeared,
37
+ relatedEntities: [
38
+ {
39
+ relationType: EntityRelationType.PlacedIn,
40
+ entity: {
41
+ type: EntityType.ShortVideo,
42
+ id: videoId
43
+ }
44
+ }
45
+ ]
46
+ });
47
+ trackShortVideoProductClick = (productId, videoId) => AnalyticsCollector.eventsReporter.reportEvent({
48
+ entity: {
49
+ type: EntityType.Product,
50
+ id: productId
51
+ },
52
+ eventType: EventType.Clicked,
53
+ relatedEntities: [
54
+ {
55
+ relationType: EntityRelationType.PlacedIn,
56
+ entity: {
57
+ type: EntityType.ShortVideo,
58
+ id: videoId
59
+ }
60
+ }
61
+ ]
62
+ });
63
+ trackAdClick = (adId) => AnalyticsCollector.eventsReporter.reportEvent({
64
+ entity: {
65
+ type: EntityType.Ad,
66
+ id: adId
67
+ },
68
+ eventType: EventType.Clicked
69
+ });
70
+ trackAdImpression = (adId) => AnalyticsCollector.eventsReporter.reportEvent({
71
+ entity: {
72
+ type: EntityType.Ad,
73
+ id: adId
74
+ },
75
+ eventType: EventType.Appeared
76
+ });
16
77
  }
@@ -1,18 +1,17 @@
1
1
  import type { IStreamAnalyticsHandler } from '../../streams/streams-player/types';
2
2
  export declare class InternalStreamAnalyticsHandler implements IStreamAnalyticsHandler {
3
3
  constructor(graphqlOrigin: string | undefined);
4
- setOrganizationId: (organizationId: string) => void;
5
- trackStreamView: (streamId: string) => void;
6
- trackStreamPageView: (pageId: string, streamId: string) => void;
7
- trackStreamEngagementTime: (streamId: string, engagementTime: number) => void;
8
- trackStreamScrollDepth: (streamId: string, scrollDepth: number) => void;
9
- trackStreamProductImpression: (productId: string, streamId: string) => void;
10
- trackStreamProductClicked: (productId: string, streamId: string) => void;
11
- reportPageVideoViews: (videoId: string, streamId: string) => void;
12
- trackShortVideoView: (videoId: string) => void;
13
- trackShortVideoProductImpression: (productId: string, videoId: string) => void;
14
- trackShortVideoProductClick: (productId: string, videoId: string) => void;
4
+ trackStreamView: (streamId: string) => Promise<void>;
5
+ trackStreamPageView: (pageId: string, streamId: string) => Promise<void>;
6
+ trackStreamEngagementTime: (streamId: string, engagementTime: number) => Promise<void>;
7
+ trackStreamScrollDepth: (streamId: string, scrollDepth: number) => Promise<void>;
8
+ trackStreamProductImpression: (productId: string, streamId: string) => Promise<void>;
9
+ trackStreamProductClicked: (productId: string, streamId: string) => Promise<void>;
10
+ reportPageVideoViews: (pageId: string, streamId: string) => Promise<import("@streamscloud/streams-analytics-collector").MeasurementsBatchReportResult>;
11
+ trackShortVideoView: (videoId: string) => Promise<void>;
12
+ trackShortVideoProductImpression: (productId: string, videoId: string) => Promise<void>;
13
+ trackShortVideoProductClick: (productId: string, videoId: string) => Promise<void>;
15
14
  trackShortVideoProgress: (pageId: string, videoId: string, progress: number, streamId: string) => void;
16
- trackAdClick: (adId: string) => void;
17
- trackAdImpression: (adId: string) => void;
15
+ trackAdClick: (adId: string) => Promise<void>;
16
+ trackAdImpression: (adId: string) => Promise<void>;
18
17
  }
@@ -1,23 +1,167 @@
1
- import { getOrCreateProfileId } from '../../core/analytics.profile-id';
1
+ import { getOrCreateInstallationId } from '../../core/analytics.installation-id';
2
2
  import { constructGraphQLUrl } from '../../core/graphql';
3
- import { AppEventsTracker } from '@streamscloud/streams-analytics-collector';
3
+ import { AnalyticsCollector, EntityRelationType, EntityType, EventType, MeasurementType, Schemas } from '@streamscloud/streams-analytics-collector';
4
4
  export class InternalStreamAnalyticsHandler {
5
5
  constructor(graphqlOrigin) {
6
- AppEventsTracker.setEndpoint(constructGraphQLUrl(graphqlOrigin));
7
- AppEventsTracker.setProfileId(getOrCreateProfileId());
6
+ AnalyticsCollector.initialize({
7
+ gqlDataSenderOptions: {
8
+ endpoint: constructGraphQLUrl(graphqlOrigin)
9
+ },
10
+ schema: Schemas.external,
11
+ metadata: {
12
+ installationId: getOrCreateInstallationId()
13
+ }
14
+ });
8
15
  }
9
- setOrganizationId = (organizationId) => AppEventsTracker.setOrganizationId(organizationId);
10
- trackStreamView = (streamId) => AppEventsTracker.trackStreamView(streamId);
11
- trackStreamPageView = (pageId, streamId) => AppEventsTracker.trackStreamPageView(pageId, streamId);
12
- trackStreamEngagementTime = (streamId, engagementTime) => AppEventsTracker.trackStreamEngagementTime(streamId, engagementTime);
13
- trackStreamScrollDepth = (streamId, scrollDepth) => AppEventsTracker.trackStreamScrollDepth(streamId, scrollDepth);
14
- trackStreamProductImpression = (productId, streamId) => AppEventsTracker.trackStreamProductImpression(productId, streamId);
15
- trackStreamProductClicked = (productId, streamId) => AppEventsTracker.trackStreamProductClicked(productId, streamId);
16
- reportPageVideoViews = (videoId, streamId) => AppEventsTracker.reportPageVideoViews(videoId, streamId);
17
- trackShortVideoView = (videoId) => AppEventsTracker.trackShortVideoView(videoId);
18
- trackShortVideoProductImpression = (productId, videoId) => AppEventsTracker.trackShortVideoProductImpression(productId, videoId);
19
- trackShortVideoProductClick = (productId, videoId) => AppEventsTracker.trackShortVideoProductClick(productId, videoId);
20
- trackShortVideoProgress = (pageId, videoId, progress, streamId) => AppEventsTracker.trackShortVideoProgress(pageId, videoId, progress, streamId);
21
- trackAdClick = (adId) => AppEventsTracker.trackAdClick(adId);
22
- trackAdImpression = (adId) => AppEventsTracker.trackAdImpression(adId);
16
+ trackStreamView = (streamId) => AnalyticsCollector.eventsReporter.reportEvent({
17
+ entity: {
18
+ type: EntityType.Stream,
19
+ id: streamId
20
+ },
21
+ eventType: EventType.Viewed
22
+ });
23
+ trackStreamPageView = (pageId, streamId) => AnalyticsCollector.eventsReporter.reportEvent({
24
+ entity: {
25
+ type: EntityType.StreamPage,
26
+ id: pageId
27
+ },
28
+ eventType: EventType.Viewed,
29
+ relatedEntities: [
30
+ {
31
+ relationType: EntityRelationType.PlacedIn,
32
+ entity: {
33
+ type: EntityType.Stream,
34
+ id: streamId
35
+ }
36
+ }
37
+ ]
38
+ });
39
+ trackStreamEngagementTime = (streamId, engagementTime) => AnalyticsCollector.measurementsReporter.reportMeasurement({
40
+ entity: {
41
+ type: EntityType.Stream,
42
+ id: streamId
43
+ },
44
+ measurementType: MeasurementType.EngagementTime,
45
+ value: engagementTime
46
+ });
47
+ trackStreamScrollDepth = (streamId, scrollDepth) => AnalyticsCollector.measurementsReporter.reportMeasurement({
48
+ entity: {
49
+ type: EntityType.Stream,
50
+ id: streamId
51
+ },
52
+ measurementType: MeasurementType.ScrollDepth,
53
+ value: scrollDepth
54
+ });
55
+ trackStreamProductImpression = (productId, streamId) => AnalyticsCollector.eventsReporter.reportEvent({
56
+ entity: {
57
+ type: EntityType.Product,
58
+ id: productId
59
+ },
60
+ eventType: EventType.Appeared,
61
+ relatedEntities: [
62
+ {
63
+ relationType: EntityRelationType.PlacedIn,
64
+ entity: {
65
+ type: EntityType.Stream,
66
+ id: streamId
67
+ }
68
+ }
69
+ ]
70
+ });
71
+ trackStreamProductClicked = (productId, streamId) => AnalyticsCollector.eventsReporter.reportEvent({
72
+ entity: {
73
+ type: EntityType.Product,
74
+ id: productId
75
+ },
76
+ eventType: EventType.Clicked,
77
+ relatedEntities: [
78
+ {
79
+ relationType: EntityRelationType.PlacedIn,
80
+ entity: {
81
+ type: EntityType.Stream,
82
+ id: streamId
83
+ }
84
+ }
85
+ ]
86
+ });
87
+ reportPageVideoViews = (pageId, streamId) => AnalyticsCollector.measurementsBatcher.reportBatch([
88
+ {
89
+ type: EntityType.StreamPage,
90
+ id: pageId
91
+ },
92
+ {
93
+ type: EntityType.Stream,
94
+ id: streamId
95
+ }
96
+ ]);
97
+ trackShortVideoView = (videoId) => AnalyticsCollector.eventsReporter.reportEvent({
98
+ entity: {
99
+ type: EntityType.ShortVideo,
100
+ id: videoId
101
+ },
102
+ eventType: EventType.Viewed
103
+ });
104
+ trackShortVideoProductImpression = (productId, videoId) => AnalyticsCollector.eventsReporter.reportEvent({
105
+ entity: {
106
+ type: EntityType.Product,
107
+ id: productId
108
+ },
109
+ eventType: EventType.Appeared,
110
+ relatedEntities: [
111
+ {
112
+ relationType: EntityRelationType.PlacedIn,
113
+ entity: {
114
+ type: EntityType.ShortVideo,
115
+ id: videoId
116
+ }
117
+ }
118
+ ]
119
+ });
120
+ trackShortVideoProductClick = (productId, videoId) => AnalyticsCollector.eventsReporter.reportEvent({
121
+ entity: {
122
+ type: EntityType.Product,
123
+ id: productId
124
+ },
125
+ eventType: EventType.Clicked,
126
+ relatedEntities: [
127
+ {
128
+ relationType: EntityRelationType.PlacedIn,
129
+ entity: {
130
+ type: EntityType.ShortVideo,
131
+ id: videoId
132
+ }
133
+ }
134
+ ]
135
+ });
136
+ trackShortVideoProgress = (pageId, videoId, progress, streamId) => AnalyticsCollector.measurementsBatcher.collect([
137
+ {
138
+ type: EntityType.StreamPage,
139
+ id: pageId
140
+ },
141
+ {
142
+ type: EntityType.Stream,
143
+ id: streamId
144
+ }
145
+ ], {
146
+ entity: {
147
+ type: EntityType.ShortVideo,
148
+ id: videoId
149
+ },
150
+ measurementType: MeasurementType.Progress,
151
+ value: progress
152
+ });
153
+ trackAdClick = (adId) => AnalyticsCollector.eventsReporter.reportEvent({
154
+ entity: {
155
+ type: EntityType.Ad,
156
+ id: adId
157
+ },
158
+ eventType: EventType.Clicked
159
+ });
160
+ trackAdImpression = (adId) => AnalyticsCollector.eventsReporter.reportEvent({
161
+ entity: {
162
+ type: EntityType.Ad,
163
+ id: adId
164
+ },
165
+ eventType: EventType.Appeared
166
+ });
23
167
  }
@@ -0,0 +1,3 @@
1
+ import { PostType } from '../../core/enums';
2
+ import { EntityType } from '@streamscloud/streams-analytics-collector';
3
+ export declare function mapPostTypeToEntityType(postType: PostType): EntityType;
@@ -0,0 +1,18 @@
1
+ import { PostType } from '../../core/enums';
2
+ import { EntityType } from '@streamscloud/streams-analytics-collector';
3
+ export function mapPostTypeToEntityType(postType) {
4
+ switch (postType) {
5
+ case PostType.Article:
6
+ return EntityType.Article;
7
+ case PostType.Media:
8
+ return EntityType.Media;
9
+ case PostType.Moment:
10
+ return EntityType.Moment;
11
+ case PostType.ShortVideo:
12
+ return EntityType.ShortVideo;
13
+ case PostType.Video:
14
+ return EntityType.Video;
15
+ default:
16
+ throw new Error(`Unknown PostType: ${postType}`);
17
+ }
18
+ }
@@ -1,9 +1,7 @@
1
- import { ProfileType } from '../../../core/enums';
2
1
  import { mapToPostModel } from '../../../posts/post-viewer';
3
2
  export const mapToPostPlayerModel = (payload) => {
4
3
  const viewerModel = mapToPostModel(payload);
5
4
  return {
6
- ...viewerModel,
7
- analyticsOrganizationId: payload.ownerProfile.type === ProfileType.Organization ? payload.ownerProfile.id : null
5
+ ...viewerModel
8
6
  };
9
7
  };
@@ -81,7 +81,6 @@ const localization = $derived(new DiscoverViewLocalization(context.locale));
81
81
  overflow-y: auto;
82
82
  --_cross-browser-scrollbar--thumb-color: transparent;
83
83
  --_cross-browser-scrollbar--track-color: transparent;
84
- /* Set 'container-type: inline-size;' to reference container*/
85
84
  }
86
85
  .media-center-discover:hover {
87
86
  --_cross-browser-scrollbar--thumb-color: var(--scrollbar--thumb-color, #7d7d7d);
@@ -105,6 +104,9 @@ const localization = $derived(new DiscoverViewLocalization(context.locale));
105
104
  scrollbar-width: thin;
106
105
  }
107
106
  }
107
+ .media-center-discover {
108
+ /* Set 'container-type: inline-size;' to reference container*/
109
+ }
108
110
  @container (width < 576px) {
109
111
  .media-center-discover {
110
112
  padding-inline: 0.9375rem;
@@ -116,19 +118,23 @@ const localization = $derived(new DiscoverViewLocalization(context.locale));
116
118
  margin: 0 auto;
117
119
  padding-bottom: 1.25rem;
118
120
  /* Set 'container-type: inline-size;' to reference container*/
119
- /* Set 'container-type: inline-size;' to reference container*/
120
- /* Set 'container-type: inline-size;' to reference container*/
121
121
  }
122
122
  @container (width < 992px) {
123
123
  .media-center-discover__content {
124
124
  padding-bottom: 1rem;
125
125
  }
126
126
  }
127
+ .media-center-discover__content {
128
+ /* Set 'container-type: inline-size;' to reference container*/
129
+ }
127
130
  @container (width < 768px) {
128
131
  .media-center-discover__content {
129
132
  padding-bottom: 0.8125rem;
130
133
  }
131
134
  }
135
+ .media-center-discover__content {
136
+ /* Set 'container-type: inline-size;' to reference container*/
137
+ }
132
138
  @container (width < 576px) {
133
139
  .media-center-discover__content {
134
140
  padding-bottom: 0.625rem;
@@ -139,19 +145,23 @@ const localization = $derived(new DiscoverViewLocalization(context.locale));
139
145
  flex-direction: column;
140
146
  gap: 3rem;
141
147
  /* Set 'container-type: inline-size;' to reference container*/
142
- /* Set 'container-type: inline-size;' to reference container*/
143
- /* Set 'container-type: inline-size;' to reference container*/
144
148
  }
145
149
  @container (width < 992px) {
146
150
  .media-center-discover__feed {
147
151
  gap: 2.5rem;
148
152
  }
149
153
  }
154
+ .media-center-discover__feed {
155
+ /* Set 'container-type: inline-size;' to reference container*/
156
+ }
150
157
  @container (width < 768px) {
151
158
  .media-center-discover__feed {
152
159
  gap: 2rem;
153
160
  }
154
161
  }
162
+ .media-center-discover__feed {
163
+ /* Set 'container-type: inline-size;' to reference container*/
164
+ }
155
165
  @container (width < 576px) {
156
166
  .media-center-discover__feed {
157
167
  gap: 1.5rem;
@@ -188,13 +198,13 @@ const localization = $derived(new DiscoverViewLocalization(context.locale));
188
198
  .media-center-discover__section-content--4 {
189
199
  gap: 1.25rem;
190
200
  grid-template-columns: repeat(4, minmax(0, 1fr));
191
- /* Set 'container-type: inline-size;' to reference container*/
192
- /* Set 'container-type: inline-size;' to reference container*/
193
- /* Set 'container-type: inline-size;' to reference container*/
194
201
  }
195
202
  .media-center-discover__section-content--4 :global(> :nth-child(n + 5)) {
196
203
  display: var(--_section-content--more-items--display);
197
204
  }
205
+ .media-center-discover__section-content--4 {
206
+ /* Set 'container-type: inline-size;' to reference container*/
207
+ }
198
208
  @container (width < 992px) {
199
209
  .media-center-discover__section-content--4 {
200
210
  gap: 1rem;
@@ -204,6 +214,9 @@ const localization = $derived(new DiscoverViewLocalization(context.locale));
204
214
  display: var(--_section-content--more-items--display);
205
215
  }
206
216
  }
217
+ .media-center-discover__section-content--4 {
218
+ /* Set 'container-type: inline-size;' to reference container*/
219
+ }
207
220
  @container (width < 768px) {
208
221
  .media-center-discover__section-content--4 {
209
222
  gap: 0.75rem;
@@ -216,6 +229,9 @@ const localization = $derived(new DiscoverViewLocalization(context.locale));
216
229
  display: var(--_section-content--more-items--display);
217
230
  }
218
231
  }
232
+ .media-center-discover__section-content--4 {
233
+ /* Set 'container-type: inline-size;' to reference container*/
234
+ }
219
235
  @container (width < 576px) {
220
236
  .media-center-discover__section-content--4 {
221
237
  gap: 0.625rem;
@@ -224,13 +240,13 @@ const localization = $derived(new DiscoverViewLocalization(context.locale));
224
240
  .media-center-discover__section-content--5 {
225
241
  gap: 1.875rem;
226
242
  grid-template-columns: repeat(5, minmax(0, 1fr));
227
- /* Set 'container-type: inline-size;' to reference container*/
228
- /* Set 'container-type: inline-size;' to reference container*/
229
- /* Set 'container-type: inline-size;' to reference container*/
230
243
  }
231
244
  .media-center-discover__section-content--5 :global(> :nth-child(n + 6)) {
232
245
  display: var(--_section-content--more-items--display);
233
246
  }
247
+ .media-center-discover__section-content--5 {
248
+ /* Set 'container-type: inline-size;' to reference container*/
249
+ }
234
250
  @container (width < 992px) {
235
251
  .media-center-discover__section-content--5 {
236
252
  gap: 1.5rem;
@@ -240,6 +256,9 @@ const localization = $derived(new DiscoverViewLocalization(context.locale));
240
256
  display: var(--_section-content--more-items--display);
241
257
  }
242
258
  }
259
+ .media-center-discover__section-content--5 {
260
+ /* Set 'container-type: inline-size;' to reference container*/
261
+ }
243
262
  @container (width < 768px) {
244
263
  .media-center-discover__section-content--5 {
245
264
  gap: 1.125rem;
@@ -249,6 +268,9 @@ const localization = $derived(new DiscoverViewLocalization(context.locale));
249
268
  display: var(--_section-content--more-items--display);
250
269
  }
251
270
  }
271
+ .media-center-discover__section-content--5 {
272
+ /* Set 'container-type: inline-size;' to reference container*/
273
+ }
252
274
  @container (width < 576px) {
253
275
  .media-center-discover__section-content--5 {
254
276
  gap: 0.9375rem;
@@ -239,14 +239,16 @@ const styles = $derived.by(() => {
239
239
  display: flex;
240
240
  -webkit-user-drag: none;
241
241
  user-select: none;
242
+ }
243
+ .menu-item :global([contenteditable]) {
244
+ user-select: text;
245
+ }
246
+ .menu-item {
242
247
  height: 2.25rem;
243
248
  padding-left: var(--_media-center-menu--items--padding-inline);
244
249
  --_menu-item--text--font-size: 0.9375rem;
245
250
  --_menu-item--image--size: 1.5rem;
246
251
  }
247
- .menu-item :global([contenteditable]) {
248
- user-select: text;
249
- }
250
252
  .menu-item--active {
251
253
  background-color: hsl(from var(--_media-center-menu--background-color) h s calc(l + 5)/alpha);
252
254
  border-radius: 0.25rem;
@@ -80,19 +80,23 @@ let { handler, on } = $props();
80
80
  gap: 2rem 1.25rem;
81
81
  grid-template-columns: repeat(5, minmax(0, 1fr));
82
82
  /* Set 'container-type: inline-size;' to reference container*/
83
- /* Set 'container-type: inline-size;' to reference container*/
84
- /* Set 'container-type: inline-size;' to reference container*/
85
83
  }
86
84
  @container (width < 992px) {
87
85
  .streams-in-category__section-content {
88
86
  grid-template-columns: repeat(4, minmax(0, 1fr));
89
87
  }
90
88
  }
89
+ .streams-in-category__section-content {
90
+ /* Set 'container-type: inline-size;' to reference container*/
91
+ }
91
92
  @container (width < 768px) {
92
93
  .streams-in-category__section-content {
93
94
  grid-template-columns: repeat(3, minmax(0, 1fr));
94
95
  }
95
96
  }
97
+ .streams-in-category__section-content {
98
+ /* Set 'container-type: inline-size;' to reference container*/
99
+ }
96
100
  @container (width < 576px) {
97
101
  .streams-in-category__section-content {
98
102
  grid-template-columns: repeat(2, minmax(0, 1fr));
@@ -83,14 +83,11 @@ const contentPlayerConfig = new ContentPlayerConfig({
83
83
  if (on === null || on === void 0 ? void 0 : on.backgroundImageLoaded) {
84
84
  on.backgroundImageLoaded(getPostCoverImage(post));
85
85
  }
86
- if (post.analyticsOrganizationId) {
87
- analyticsHandler === null || analyticsHandler === void 0 ? void 0 : analyticsHandler.setOrganizationId(post.analyticsOrganizationId);
88
- }
89
86
  if (post.postType === PostType.ShortVideo) {
90
87
  analyticsHandler === null || analyticsHandler === void 0 ? void 0 : analyticsHandler.trackShortVideoView(id);
91
88
  }
92
- else if (post.analyticsOrganizationId) {
93
- analyticsHandler === null || analyticsHandler === void 0 ? void 0 : analyticsHandler.trackPostOpened(id, post.analyticsOrganizationId);
89
+ else if (post.postType) {
90
+ analyticsHandler === null || analyticsHandler === void 0 ? void 0 : analyticsHandler.trackPostOpened(post.postType, id);
94
91
  }
95
92
  (_a = on === null || on === void 0 ? void 0 : on.postActivated) === null || _a === void 0 ? void 0 : _a.call(on, id);
96
93
  }
@@ -1,3 +1,4 @@
1
+ import type { PostType } from '../../core/enums';
1
2
  import type { Locale } from '../../core/locale';
2
3
  import type { ThemeValue } from '../../core/theme';
3
4
  import type { IPostModel } from '..';
@@ -6,17 +7,14 @@ import type { ICloseOrchestrator } from '../../ui/player/close-orchestrator';
6
7
  import type { PlayerColors } from '../../ui/player/colors';
7
8
  import type { IPlayerBuffer, IPlayerDataProvider } from '../../ui/player/providers';
8
9
  export interface IPostAnalyticsHandler {
9
- setOrganizationId: (organizationId: string) => void;
10
- trackPostOpened: (postId: string, ownerId: string) => void;
10
+ trackPostOpened: (postType: PostType, postId: string) => void;
11
11
  trackShortVideoView: (videoId: string) => void;
12
12
  trackShortVideoProductImpression: (productId: string, videoId: string) => void;
13
13
  trackShortVideoProductClick: (productId: string, videoId: string) => void;
14
14
  trackAdClick: (adId: string) => void;
15
15
  trackAdImpression: (adId: string) => void;
16
16
  }
17
- export type PostPlayerModel = IPostModel & {
18
- analyticsOrganizationId: string | null;
19
- };
17
+ export type PostPlayerModel = IPostModel;
20
18
  export type PostsPlayerProps = {
21
19
  dataProvider: {
22
20
  type: 'buffer';
@@ -50,9 +50,6 @@ $effect(() => {
50
50
  var _a;
51
51
  if (stream) {
52
52
  currentStreamModel = stream;
53
- if (stream.organizationId) {
54
- analyticsHandler === null || analyticsHandler === void 0 ? void 0 : analyticsHandler.setOrganizationId(stream.organizationId);
55
- }
56
53
  (_a = on === null || on === void 0 ? void 0 : on.streamActivated) === null || _a === void 0 ? void 0 : _a.call(on, { id: stream.id, title: stream.title, image: stream.cover });
57
54
  analyticsHandler === null || analyticsHandler === void 0 ? void 0 : analyticsHandler.trackStreamView(stream.id);
58
55
  startActivityTracking();
@@ -63,7 +63,6 @@ export interface IStreamsPlayerDataProvider {
63
63
  onEndReached?: () => void;
64
64
  }
65
65
  export interface IStreamAnalyticsHandler {
66
- setOrganizationId: (organizationId: string) => void;
67
66
  trackStreamView: (streamId: string) => void;
68
67
  trackStreamPageView: (pageId: string, streamId: string) => void;
69
68
  trackStreamProductImpression: (productId: string, streamId: string) => void;
@@ -36,7 +36,6 @@ let { style = undefined, size = ButtonSize.Standard, children } = $props();
36
36
  }
37
37
  .button-theme {
38
38
  display: contents;
39
- /*Size*/
40
39
  }
41
40
  .button-theme--standard {
42
41
  --button--font--color: var(--sc-mc-color--text-primary);
@@ -46,12 +45,15 @@ let { style = undefined, size = ButtonSize.Standard, children } = $props();
46
45
  --button--background--disabled: #f2f2f3;
47
46
  --button--border: 1px solid #e5e7eb;
48
47
  }
49
- :global([data-theme="dark"]) .button-theme--standard {
48
+ :global([data-theme='dark']) .button-theme--standard {
50
49
  --button--background--hover: #1f2937;
51
50
  --button--background--active: #374151;
52
51
  --button--background--disabled: #374151;
53
52
  --button--border: 1px solid #4b5563;
54
53
  }
54
+ .button-theme {
55
+ /*Size*/
56
+ }
55
57
  .button-theme--size-standard {
56
58
  --button--height: 2em;
57
59
  --button--text--font-size: 0.75em;
@@ -73,7 +73,7 @@ let { src, color = null } = $props();
73
73
  stroke: var(--_icon--stroke-color, var(--_icon--color));
74
74
  stroke-width: var(--_icon--stroke-width);
75
75
  }
76
- :global([data-theme="dark"]) .icon :global(path) {
76
+ :global([data-theme='dark']) .icon :global(path) {
77
77
  stroke: var(--_icon--stroke-color, var(--_icon--color));
78
78
  stroke-width: var(--_icon--stroke-width);
79
79
  }</style>
@@ -47,7 +47,6 @@ const styles = $derived.by(() => {
47
47
  color: var(--sc-mc-color--text-white);
48
48
  --icon--color: var(--sc-mc-color--icon-overlay);
49
49
  --icon--size: 1.75rem;
50
- /* Set 'container-type: inline-size;' to reference container*/
51
50
  }
52
51
  .player-button:hover:not(:disabled) {
53
52
  background-color: var(--_player-button--color);
@@ -64,6 +63,9 @@ const styles = $derived.by(() => {
64
63
  transform: scale(var(--_player-button--icon-scale));
65
64
  transition: 0.3s;
66
65
  }
66
+ .player-button {
67
+ /* Set 'container-type: inline-size;' to reference container*/
68
+ }
67
69
  @container (width < 576px) {
68
70
  .player-button {
69
71
  padding: 0.5rem;
@@ -47,7 +47,6 @@ const styles = $derived.by(() => {
47
47
  background: var(--_player-buttons-group--background-color);
48
48
  padding: 0.4375rem 0.0625rem;
49
49
  pointer-events: auto;
50
- /* Set 'container-type: inline-size;' to reference container*/
51
50
  }
52
51
  .player-buttons-group__action {
53
52
  --_player-action--icon-scale: 1;
@@ -73,6 +72,9 @@ const styles = $derived.by(() => {
73
72
  transform: scale(var(--_player-action--icon-scale));
74
73
  transition: 0.3s;
75
74
  }
75
+ .player-buttons-group {
76
+ /* Set 'container-type: inline-size;' to reference container*/
77
+ }
76
78
  @container (width < 576px) {
77
79
  .player-buttons-group {
78
80
  border-radius: 0.9375rem;
@@ -1,9 +1,9 @@
1
1
  import type { PlayerSliderBuffer, PlayerSliderCallbacks } from './types';
2
2
  import { type Snippet } from 'svelte';
3
- declare class __sveltets_Render<T extends {
3
+ declare function $$render<T extends {
4
4
  id: string;
5
- }> {
6
- props(): {
5
+ }>(): {
6
+ props: {
7
7
  buffer: PlayerSliderBuffer<T>;
8
8
  on?: PlayerSliderCallbacks;
9
9
  children: Snippet<[{
@@ -11,8 +11,17 @@ declare class __sveltets_Render<T extends {
11
11
  active?: boolean;
12
12
  }]>;
13
13
  };
14
- events(): {};
15
- slots(): {};
14
+ exports: {};
15
+ bindings: "";
16
+ slots: {};
17
+ events: {};
18
+ };
19
+ declare class __sveltets_Render<T extends {
20
+ id: string;
21
+ }> {
22
+ props(): ReturnType<typeof $$render<T>>['props'];
23
+ events(): ReturnType<typeof $$render<T>>['events'];
24
+ slots(): ReturnType<typeof $$render<T>>['slots'];
16
25
  bindings(): "";
17
26
  exports(): {};
18
27
  }
@@ -284,7 +284,6 @@ const showClassicArrowsAndDots = $derived([SliderMode.ArrowsAndDots, SliderMode.
284
284
  width: 100%;
285
285
  height: 100%;
286
286
  overflow: hidden;
287
- /* Set 'container-type: inline-size;' to reference container*/
288
287
  }
289
288
  .slider__slides {
290
289
  display: flex;
@@ -377,12 +376,14 @@ const showClassicArrowsAndDots = $derived([SliderMode.ArrowsAndDots, SliderMode.
377
376
  text-align: center;
378
377
  color: var(--sc-mc-color--text-white);
379
378
  visibility: hidden;
380
- /* Set 'container-type: inline-size;' to reference container*/
381
379
  }
382
380
  .slider__counts-navigation-button:disabled {
383
381
  opacity: 0.5;
384
382
  cursor: default;
385
383
  }
384
+ .slider__counts-navigation-button {
385
+ /* Set 'container-type: inline-size;' to reference container*/
386
+ }
386
387
  @container (width < 576px) {
387
388
  .slider__counts-navigation-button {
388
389
  visibility: visible;
@@ -411,6 +412,9 @@ const showClassicArrowsAndDots = $derived([SliderMode.ArrowsAndDots, SliderMode.
411
412
  position: static;
412
413
  margin-top: 1rem;
413
414
  }
415
+ .slider {
416
+ /* Set 'container-type: inline-size;' to reference container*/
417
+ }
414
418
  @container (width < 576px) {
415
419
  .slider__navigation-button {
416
420
  visibility: visible;
@@ -1,8 +1,8 @@
1
1
  import type { Locale } from '../../../core/locale';
2
2
  import { type SliderDotsConfig, SliderMode } from './types';
3
3
  import { type Snippet } from 'svelte';
4
- declare class __sveltets_Render<T> {
5
- props(): {
4
+ declare function $$render<T>(): {
5
+ props: {
6
6
  items: T[];
7
7
  initialIndex: number;
8
8
  sliderMode?: SliderMode;
@@ -11,11 +11,18 @@ declare class __sveltets_Render<T> {
11
11
  locale: Locale;
12
12
  on?: {
13
13
  indexChanged: (index: number) => void;
14
- } | undefined;
14
+ };
15
15
  children: Snippet<[T]>;
16
16
  };
17
- events(): {};
18
- slots(): {};
17
+ exports: {};
18
+ bindings: "";
19
+ slots: {};
20
+ events: {};
21
+ };
22
+ declare class __sveltets_Render<T> {
23
+ props(): ReturnType<typeof $$render<T>>['props'];
24
+ events(): ReturnType<typeof $$render<T>>['events'];
25
+ slots(): ReturnType<typeof $$render<T>>['slots'];
19
26
  bindings(): "";
20
27
  exports(): {};
21
28
  }
@@ -51,7 +51,7 @@ const styles = $derived.by(() => {
51
51
  }
52
52
  }
53
53
  :host,
54
- :global([data-theme="default"]) {
54
+ :global([data-theme='default']) {
55
55
  /* Backgrounds */
56
56
  --sc-mc-color--bg-button: #ffffff;
57
57
  --sc-mc-color--bg-card: #ffffff;
@@ -84,7 +84,7 @@ const styles = $derived.by(() => {
84
84
  --sc-mc-color--text-inactive: #e5e7eb;
85
85
  }
86
86
 
87
- :global([data-theme="dark"]) {
87
+ :global([data-theme='dark']) {
88
88
  /* Backgrounds */
89
89
  --sc-mc-color--bg-button: #111827;
90
90
  --sc-mc-color--bg-card: #000000;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/embeddable",
3
- "version": "13.3.0",
3
+ "version": "14.0.0-rc.0",
4
4
  "author": "StreamsCloud",
5
5
  "repository": {
6
6
  "type": "git",
@@ -131,7 +131,7 @@
131
131
  "peerDependencies": {
132
132
  "@fluentui/svg-icons": "^1.1.301",
133
133
  "@popperjs/core": "^2.11.8",
134
- "@streamscloud/streams-analytics-collector": "^2.0.9",
134
+ "@streamscloud/streams-analytics-collector": "^3.0.0",
135
135
  "@urql/core": "^5.1.1",
136
136
  "dequal": "^2.0.3",
137
137
  "dompurify": "^3.2.6",
@@ -1,5 +0,0 @@
1
- /**
2
- * Retrieves the profile ID from localStorage or generates a new one if it doesn't exist
3
- * @returns The profile ID to use for analytics tracking
4
- */
5
- export declare const getOrCreateProfileId: () => string;