@streamscloud/embeddable 3.0.0 → 3.1.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.
@@ -51,6 +51,8 @@ const mapToShortVideoViewerProductModel = (payload) => {
51
51
  link: payload.link,
52
52
  currency: payload.priceAndAvailability.currency,
53
53
  price: payload.priceAndAvailability.price,
54
- salePrice: effectiveSalePrice?.salePrice ?? null
54
+ salePrice: effectiveSalePrice?.salePrice ?? null,
55
+ brandName: payload.brand?.name ?? null,
56
+ shortDescription: payload.shortDescription ?? null
55
57
  };
56
58
  };
@@ -13,11 +13,15 @@ export type ShortVideoViewerPayloadFragment = {
13
13
  title: string;
14
14
  id: string;
15
15
  link: string | null;
16
+ shortDescription: string | null;
16
17
  media: Array<{
17
18
  url: string;
18
19
  thumbnailUrl: string | null;
19
20
  type: SchemaTypes.MediaType;
20
21
  }>;
22
+ brand: {
23
+ name: string;
24
+ } | null;
21
25
  priceAndAvailability: {
22
26
  currency: SchemaTypes.Currency;
23
27
  price: number;
@@ -44,6 +44,12 @@ export const ShortVideoViewerPayloadFragmentDoc = {
44
44
  { kind: 'Field', name: { kind: 'Name', value: 'title' } },
45
45
  { kind: 'Field', name: { kind: 'Name', value: 'id' } },
46
46
  { kind: 'Field', name: { kind: 'Name', value: 'link' } },
47
+ { kind: 'Field', name: { kind: 'Name', value: 'shortDescription' } },
48
+ {
49
+ kind: 'Field',
50
+ name: { kind: 'Name', value: 'brand' },
51
+ selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'name' } }] }
52
+ },
47
53
  {
48
54
  kind: 'Field',
49
55
  name: { kind: 'Name', value: 'priceAndAvailability' },
@@ -16,6 +16,10 @@ fragment ShortVideoViewerPayloadFragment on Post {
16
16
  title
17
17
  id
18
18
  link
19
+ shortDescription
20
+ brand {
21
+ name
22
+ }
19
23
  priceAndAvailability {
20
24
  currency
21
25
  price
@@ -37,4 +37,6 @@ export type ShortVideoViewerProductModel = {
37
37
  price: number;
38
38
  currency: Currency;
39
39
  salePrice: number | null;
40
+ brandName?: string | null;
41
+ shortDescription?: string | null;
40
42
  };
@@ -19,7 +19,7 @@ import { GetShortVideosDocument } from './operations.generated';
19
19
  import { ShortVideosPlayerLocalization } from './short-videos-player-localization';
20
20
  import { ShortVideosPlayerUiManager } from './ui-manager.svelte';
21
21
  import { onMount, untrack } from 'svelte';
22
- let { input, localization: localizationInit, initiator, on } = $props();
22
+ let { input, localization: localizationInit, on } = $props();
23
23
  const localization = $derived(new ShortVideosPlayerLocalization(localizationInit));
24
24
  let everTouched = $state(false);
25
25
  let buffer = $state(input.type === 'provider' ? new PlayerBuffer(input.provider) : null);
@@ -35,7 +35,7 @@ const initBuffer = (input) => __awaiter(void 0, void 0, void 0, function* () {
35
35
  var _a, _b;
36
36
  try {
37
37
  const { graphqlOrigin, ids, initialId } = input;
38
- const graphql = createLocalGQLClient(graphqlOrigin, { 'x-initiator': initiator || 'player/short-videos' });
38
+ const graphql = createLocalGQLClient(graphqlOrigin, { 'x-initiator': input.initiator || 'player/short-videos' });
39
39
  const payload = yield graphql
40
40
  .query(GetShortVideosDocument, {
41
41
  input: {
@@ -4,7 +4,6 @@ import type { PlayerInput } from './types';
4
4
  type Props = {
5
5
  input: PlayerInput;
6
6
  localization: IShortVideosPlayerLocalization | Locale;
7
- initiator?: string;
8
7
  on?: {
9
8
  closePlayer?: () => void;
10
9
  };
@@ -19,11 +19,15 @@ export type GetShortVideosQuery = {
19
19
  title: string;
20
20
  id: string;
21
21
  link: string | null;
22
+ shortDescription: string | null;
22
23
  media: Array<{
23
24
  url: string;
24
25
  thumbnailUrl: string | null;
25
26
  type: SchemaTypes.MediaType;
26
27
  }>;
28
+ brand: {
29
+ name: string;
30
+ } | null;
27
31
  priceAndAvailability: {
28
32
  currency: SchemaTypes.Currency;
29
33
  price: number;
@@ -86,6 +86,12 @@ export const GetShortVideosDocument = {
86
86
  { kind: 'Field', name: { kind: 'Name', value: 'title' } },
87
87
  { kind: 'Field', name: { kind: 'Name', value: 'id' } },
88
88
  { kind: 'Field', name: { kind: 'Name', value: 'link' } },
89
+ { kind: 'Field', name: { kind: 'Name', value: 'shortDescription' } },
90
+ {
91
+ kind: 'Field',
92
+ name: { kind: 'Name', value: 'brand' },
93
+ selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'name' } }] }
94
+ },
89
95
  {
90
96
  kind: 'Field',
91
97
  name: { kind: 'Name', value: 'priceAndAvailability' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/embeddable",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "author": "StreamsCloud",
5
5
  "repository": "https://github.com/StreamsCloud/streamscloud-frontend-packages.git",
6
6
  "type": "module",