@streamscloud/embeddable 16.0.6 → 16.0.7
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.
- package/dist/posts/posts-player/cmp.posts-player.svelte +7 -2
- package/dist/posts/posts-player/posts-player-host-settings.svelte.d.ts +20 -0
- package/dist/posts/posts-player/posts-player-host-settings.svelte.js +15 -0
- package/dist/streams/streams-player/cmp.streams-player.svelte +7 -2
- package/dist/streams/streams-player/streams-player-host-settings.svelte.d.ts +20 -0
- package/dist/streams/streams-player/streams-player-host-settings.svelte.js +15 -0
- package/package.json +4 -3
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
<script lang="ts">import { CloseOrchestrator } from '../../ui/player/close-orchestrator';
|
|
2
2
|
import { createShadowRoot } from '../../ui/shadow-dom';
|
|
3
|
+
import { PostsPlayerHostSettings } from './posts-player-host-settings.svelte';
|
|
3
4
|
import { default as PostsPlayerProxy } from './posts-player-proxy.svelte';
|
|
4
|
-
import { mount, unmount } from 'svelte';
|
|
5
|
+
import { mount, unmount, untrack } from 'svelte';
|
|
5
6
|
let { dataProvider, socialInteractionsHandler, sharingHandler, playerSettings, analyticsHandler, on } = $props();
|
|
7
|
+
const settingsHolder = untrack(() => new PostsPlayerHostSettings(playerSettings));
|
|
8
|
+
$effect(() => {
|
|
9
|
+
settingsHolder.update(playerSettings);
|
|
10
|
+
});
|
|
6
11
|
const initHost = (node) => {
|
|
7
12
|
const shadowRoot = createShadowRoot(node);
|
|
8
13
|
const mounted = mount(PostsPlayerProxy, {
|
|
@@ -11,7 +16,7 @@ const initHost = (node) => {
|
|
|
11
16
|
dataProvider,
|
|
12
17
|
socialInteractionsHandler,
|
|
13
18
|
sharingHandler,
|
|
14
|
-
playerSettings,
|
|
19
|
+
playerSettings: settingsHolder,
|
|
15
20
|
analyticsHandler,
|
|
16
21
|
closeOrchestrator: new CloseOrchestrator({
|
|
17
22
|
closeFn: async () => {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ThemeValue } from '../../core/theme';
|
|
2
|
+
import type { AppLocaleValue } from '@streamscloud/kit/core/locale';
|
|
3
|
+
export declare class PostsPlayerHostSettings {
|
|
4
|
+
locale: AppLocaleValue | undefined;
|
|
5
|
+
showStreamsCloudWatermark: boolean | undefined;
|
|
6
|
+
disableBackground: boolean | undefined;
|
|
7
|
+
theme: ThemeValue | undefined;
|
|
8
|
+
constructor(init: {
|
|
9
|
+
locale?: AppLocaleValue;
|
|
10
|
+
showStreamsCloudWatermark?: boolean;
|
|
11
|
+
disableBackground?: boolean;
|
|
12
|
+
theme?: ThemeValue;
|
|
13
|
+
} | undefined);
|
|
14
|
+
update: (data: {
|
|
15
|
+
locale?: AppLocaleValue;
|
|
16
|
+
showStreamsCloudWatermark?: boolean;
|
|
17
|
+
disableBackground?: boolean;
|
|
18
|
+
theme?: ThemeValue;
|
|
19
|
+
} | undefined) => void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export class PostsPlayerHostSettings {
|
|
2
|
+
locale = $state();
|
|
3
|
+
showStreamsCloudWatermark = $state();
|
|
4
|
+
disableBackground = $state();
|
|
5
|
+
theme = $state();
|
|
6
|
+
constructor(init) {
|
|
7
|
+
this.update(init);
|
|
8
|
+
}
|
|
9
|
+
update = (data) => {
|
|
10
|
+
this.locale = data?.locale;
|
|
11
|
+
this.showStreamsCloudWatermark = data?.showStreamsCloudWatermark;
|
|
12
|
+
this.disableBackground = data?.disableBackground;
|
|
13
|
+
this.theme = data?.theme;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
<script lang="ts">import { CloseOrchestrator } from '../../ui/player/close-orchestrator';
|
|
2
2
|
import { createShadowRoot } from '../../ui/shadow-dom';
|
|
3
|
+
import { StreamsPlayerHostSettings } from './streams-player-host-settings.svelte';
|
|
3
4
|
import { default as StreamsPlayerProxy } from './streams-player-proxy.svelte';
|
|
4
|
-
import { mount, unmount } from 'svelte';
|
|
5
|
+
import { mount, unmount, untrack } from 'svelte';
|
|
5
6
|
let { dataProvider, postSocialInteractionsHandler, sharingHandler, amplificationParameters, playerSettings, analyticsHandler, on } = $props();
|
|
7
|
+
const settingsHolder = untrack(() => new StreamsPlayerHostSettings(playerSettings));
|
|
8
|
+
$effect(() => {
|
|
9
|
+
settingsHolder.update(playerSettings);
|
|
10
|
+
});
|
|
6
11
|
const initHost = (node) => {
|
|
7
12
|
const shadowRoot = createShadowRoot(node);
|
|
8
13
|
const mounted = mount(StreamsPlayerProxy, {
|
|
@@ -13,7 +18,7 @@ const initHost = (node) => {
|
|
|
13
18
|
sharingHandler,
|
|
14
19
|
analyticsHandler,
|
|
15
20
|
amplificationParameters,
|
|
16
|
-
playerSettings,
|
|
21
|
+
playerSettings: settingsHolder,
|
|
17
22
|
closeOrchestrator: new CloseOrchestrator({
|
|
18
23
|
closeFn: async () => {
|
|
19
24
|
await unmount(mounted);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ThemeValue } from '../../core/theme';
|
|
2
|
+
import type { AppLocaleValue } from '@streamscloud/kit/core/locale';
|
|
3
|
+
export declare class StreamsPlayerHostSettings {
|
|
4
|
+
locale: AppLocaleValue | undefined;
|
|
5
|
+
showStreamsCloudWatermark: boolean | undefined;
|
|
6
|
+
disableBackground: boolean | undefined;
|
|
7
|
+
theme: ThemeValue | undefined;
|
|
8
|
+
constructor(init: {
|
|
9
|
+
locale?: AppLocaleValue;
|
|
10
|
+
showStreamsCloudWatermark?: boolean;
|
|
11
|
+
disableBackground?: boolean;
|
|
12
|
+
theme?: ThemeValue;
|
|
13
|
+
} | undefined);
|
|
14
|
+
update: (data: {
|
|
15
|
+
locale?: AppLocaleValue;
|
|
16
|
+
showStreamsCloudWatermark?: boolean;
|
|
17
|
+
disableBackground?: boolean;
|
|
18
|
+
theme?: ThemeValue;
|
|
19
|
+
} | undefined) => void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export class StreamsPlayerHostSettings {
|
|
2
|
+
locale = $state();
|
|
3
|
+
showStreamsCloudWatermark = $state();
|
|
4
|
+
disableBackground = $state();
|
|
5
|
+
theme = $state();
|
|
6
|
+
constructor(init) {
|
|
7
|
+
this.update(init);
|
|
8
|
+
}
|
|
9
|
+
update = (data) => {
|
|
10
|
+
this.locale = data?.locale;
|
|
11
|
+
this.showStreamsCloudWatermark = data?.showStreamsCloudWatermark;
|
|
12
|
+
this.disableBackground = data?.disableBackground;
|
|
13
|
+
this.theme = data?.theme;
|
|
14
|
+
};
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamscloud/embeddable",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.7",
|
|
4
4
|
"author": "StreamsCloud",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"pack": "npm run build && npm pack",
|
|
17
17
|
"preview": "vite preview",
|
|
18
18
|
"check": "svelte-check --tsconfig ./tsconfig.app.json && tsc -p tsconfig.node.json",
|
|
19
|
+
"check:strict": "svelte-check --tsconfig ./tsconfig.app.json --fail-on-warnings --output machine && eslint . --format codeframe --max-warnings 0 && prettier --check --plugin prettier-plugin-svelte --cache .",
|
|
19
20
|
"uad": "graphql-codegen --config codegen.yml && prettier --write src/**/*.generated.ts src/gql/*",
|
|
20
21
|
"uad-types-only": "graphql-codegen --config codegen.types-only.yml && prettier --write src/gql/*",
|
|
21
22
|
"lint": "prettier --check --plugin prettier-plugin-svelte . && eslint .",
|
|
@@ -133,7 +134,7 @@
|
|
|
133
134
|
}
|
|
134
135
|
},
|
|
135
136
|
"peerDependencies": {
|
|
136
|
-
"@streamscloud/kit": "^0.1.
|
|
137
|
+
"@streamscloud/kit": "^0.1.12",
|
|
137
138
|
"@streamscloud/streams-analytics-collector": "^4.0.1",
|
|
138
139
|
"svelte": "^5.51.0"
|
|
139
140
|
},
|
|
@@ -149,7 +150,7 @@
|
|
|
149
150
|
"@graphql-codegen/typescript": "^5.0.7",
|
|
150
151
|
"@graphql-codegen/typescript-operations": "^5.0.7",
|
|
151
152
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
152
|
-
"@streamscloud/kit": "^0.1.
|
|
153
|
+
"@streamscloud/kit": "^0.1.12",
|
|
153
154
|
"@streamscloud/streams-analytics-collector": "^4.0.1",
|
|
154
155
|
"@sveltejs/package": "^2.5.7",
|
|
155
156
|
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|