@streamscloud/embeddable 15.0.2 → 15.1.0-1770736445096
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/ads/ad-card/cmp.ad-card.svelte +15 -21
- package/dist/ads/ad-card/cmp.ad-card.svelte.d.ts +0 -5
- package/dist/core/theme/brand-colors.svelte.d.ts +33 -0
- package/dist/core/theme/brand-colors.svelte.js +26 -0
- package/dist/core/theme/index.d.ts +3 -2
- package/dist/core/theme/index.js +1 -1
- package/dist/external-api/data-providers/internal-media-center-data-provider.svelte.js +2 -5
- package/dist/media-center/config/types.d.ts +0 -3
- package/dist/media-center/media-center/cmp.media-center-proxy.svelte +2 -9
- package/dist/media-center/media-center/footer/media-center-footer.svelte +1 -1
- package/dist/media-center/media-center/handlers/media-center-settings-handler.svelte.d.ts +1 -11
- package/dist/media-center/media-center/handlers/media-center-settings-handler.svelte.js +3 -14
- package/dist/media-center/media-center/header/media-center-header.svelte +8 -27
- package/dist/media-center/media-center/media-center-context.svelte.d.ts +0 -2
- package/dist/media-center/media-center/media-center-context.svelte.js +0 -3
- package/dist/media-center/media-center/menu/menu.svelte +2 -9
- package/dist/media-center/media-center/moments/cmp.moments-circle.svelte +1 -9
- package/dist/posts/attachments/cmp.attachments.svelte +6 -3
- package/dist/posts/attachments/cmp.attachments.svelte.d.ts +0 -6
- package/dist/posts/controls/post-actions-generator.svelte.js +3 -4
- package/dist/posts/post-viewer/cmp.post-viewer.svelte +5 -7
- package/dist/posts/post-viewer/cmp.post-viewer.svelte.d.ts +0 -4
- package/dist/posts/post-viewer/media/post-media.svelte +1 -6
- package/dist/posts/posts-player/posts-player-proxy.svelte +2 -10
- package/dist/posts/posts-player/posts-player-view.svelte +5 -13
- package/dist/posts/posts-player/types.d.ts +0 -3
- package/dist/products/product-card/cmp.product-card.svelte +4 -17
- package/dist/products/product-card/cmp.product-card.svelte.d.ts +0 -5
- package/dist/streams/controls/stream-actions-generator.svelte.js +3 -4
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte +1 -2
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte.d.ts +0 -4
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte +4 -6
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte.d.ts +0 -4
- package/dist/streams/streams-player/streams-player-proxy.svelte +2 -10
- package/dist/streams/streams-player/streams-player-view.svelte +5 -17
- package/dist/streams/streams-player/types.d.ts +0 -3
- package/dist/ui/button/resources/button-theme.svelte +5 -22
- package/dist/ui/icon/cmp.icon.svelte +0 -4
- package/dist/ui/player/button/{cmp.mobile-player-buttons-group.svelte → cmp.mobile-player-buttons.svelte} +10 -17
- package/dist/ui/player/button/cmp.player-buttons.svelte +127 -0
- package/dist/ui/player/button/{cmp.player-buttons-group.svelte.d.ts → cmp.player-buttons.svelte.d.ts} +1 -2
- package/dist/ui/player/button/cmp.responsive-player-buttons.svelte +32 -0
- package/dist/ui/player/button/{cmp.responsive-player-buttons-group.svelte.d.ts → cmp.responsive-player-buttons.svelte.d.ts} +1 -3
- package/dist/ui/player/button/index.d.ts +3 -4
- package/dist/ui/player/button/index.js +3 -4
- package/dist/ui/player/button/types.d.ts +1 -0
- package/dist/ui/player/player/cmp.player.svelte +1 -1
- package/dist/ui/player/player/controls-and-attachments.svelte +13 -26
- package/dist/ui/player/player/overview-panel.svelte +3 -9
- package/dist/ui/player/player/overview-panel.svelte.d.ts +10 -33
- package/dist/ui/player/player/player-config.svelte.d.ts +0 -1
- package/dist/ui/player/player/player-config.svelte.js +0 -3
- package/dist/ui/player/player/player-settings.svelte.d.ts +0 -5
- package/dist/ui/player/player/player-settings.svelte.js +0 -12
- package/dist/ui/shadow-dom/cmp.shadow-root.svelte +79 -62
- package/dist/ui/shadow-dom/cmp.shadow-root.svelte.d.ts +2 -1
- package/dist/ui/shadow-dom/colors.scss +53 -55
- package/package.json +1 -1
- package/dist/core/theme/theme-store.svelte.d.ts +0 -6
- package/dist/core/theme/theme-store.svelte.js +0 -10
- package/dist/ui/player/button/cmp.player-button.svelte +0 -74
- package/dist/ui/player/button/cmp.player-button.svelte.d.ts +0 -16
- package/dist/ui/player/button/cmp.player-buttons-group.svelte +0 -86
- package/dist/ui/player/button/cmp.responsive-player-buttons-group.svelte +0 -53
- package/dist/ui/player/colors/index.d.ts +0 -1
- package/dist/ui/player/colors/index.js +0 -1
- package/dist/ui/player/colors/player-colors.d.ts +0 -25
- package/dist/ui/player/colors/player-colors.js +0 -24
- /package/dist/ui/player/button/{cmp.mobile-player-buttons-group.svelte.d.ts → cmp.mobile-player-buttons.svelte.d.ts} +0 -0
|
@@ -121,7 +121,7 @@ const handleSliderMounted = (node) => {
|
|
|
121
121
|
{/snippet}
|
|
122
122
|
</PlayerSlider>
|
|
123
123
|
{#if overviewPanelContent && config.playerBuffer.loaded.length > 0}
|
|
124
|
-
<OverviewPanel
|
|
124
|
+
<OverviewPanel position={overviewPosition} uiManager={uiManager}>
|
|
125
125
|
{@render overviewPanelContent()}
|
|
126
126
|
</OverviewPanel>
|
|
127
127
|
{/if}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts" generics="T extends { id: string }">import { slideHorizontally } from '../../../core/transitions';
|
|
2
|
-
import {
|
|
2
|
+
import { PlayerButtons, ResponsivePlayerButtons } from '../button';
|
|
3
3
|
import { PlayerConfig } from './player-config.svelte.js';
|
|
4
4
|
import IconCalendarWeekNumbers from '@fluentui/svg-icons/icons/calendar_week_numbers_24_regular.svg?raw';
|
|
5
5
|
import IconChevronDown from '@fluentui/svg-icons/icons/chevron_down_28_regular.svg?raw';
|
|
@@ -62,30 +62,18 @@ const variables = $derived.by(() => {
|
|
|
62
62
|
<div class="controls-and-attachments" style={variables}>
|
|
63
63
|
<div class="controls-and-attachments__spacer"> </div>
|
|
64
64
|
<div class="controls-and-attachments__left">
|
|
65
|
-
<
|
|
66
|
-
actions={allActions}
|
|
67
|
-
scaleEffect={true}
|
|
68
|
-
activeColor={config.playerColors.button}
|
|
69
|
-
backgroundColor={config.playerColors.buttonInactive} />
|
|
65
|
+
<ResponsivePlayerButtons actions={allActions} scaleEffect={true} />
|
|
70
66
|
|
|
71
67
|
{#if config.playerBuffer}
|
|
72
68
|
<div
|
|
73
69
|
class="controls-and-attachments__navigation-buttons"
|
|
74
70
|
class:controls-and-attachments__navigation-buttons--invisible={config.playerBuffer.loaded.length <= 1}>
|
|
75
|
-
<
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
scaleEffect={true}
|
|
81
|
-
on={{ click: config.playerBuffer.loadPrevious }} />
|
|
82
|
-
<PlayerButton
|
|
83
|
-
icon={IconChevronDown}
|
|
84
|
-
activeColor={config.playerColors.button}
|
|
85
|
-
inactiveColor={config.playerColors.buttonInactive}
|
|
86
|
-
disabled={!config.playerBuffer.canLoadNext}
|
|
87
|
-
scaleEffect={true}
|
|
88
|
-
on={{ click: config.playerBuffer.loadNext }} />
|
|
71
|
+
<PlayerButtons
|
|
72
|
+
actions={[{ icon: IconChevronUp, callback: config.playerBuffer.loadPrevious, disabled: !config.playerBuffer.canLoadPrevious }]}
|
|
73
|
+
scaleEffect={true} />
|
|
74
|
+
<PlayerButtons
|
|
75
|
+
actions={[{ icon: IconChevronDown, callback: config.playerBuffer.loadNext, disabled: !config.playerBuffer.canLoadNext }]}
|
|
76
|
+
scaleEffect={true} />
|
|
89
77
|
</div>
|
|
90
78
|
{/if}
|
|
91
79
|
</div>
|
|
@@ -104,12 +92,7 @@ const variables = $derived.by(() => {
|
|
|
104
92
|
|
|
105
93
|
{#if showCloseButton}
|
|
106
94
|
<div class="close-button" use:handleCloseButtonMounted>
|
|
107
|
-
<
|
|
108
|
-
icon={IconDismiss}
|
|
109
|
-
zoom={0.8}
|
|
110
|
-
activeColor={config.playerColors.button ?? null}
|
|
111
|
-
inactiveColor={config.playerColors.buttonInactive ?? null}
|
|
112
|
-
on={{ click: config.closeOrchestrator.requestClose }} />
|
|
95
|
+
<PlayerButtons actions={[{ icon: IconDismiss, callback: config.closeOrchestrator.requestClose }]} zoom={0.8} />
|
|
113
96
|
</div>
|
|
114
97
|
{/if}
|
|
115
98
|
|
|
@@ -125,6 +108,8 @@ const variables = $derived.by(() => {
|
|
|
125
108
|
}
|
|
126
109
|
}
|
|
127
110
|
.controls-and-attachments {
|
|
111
|
+
--player-button--color: var(--sc-player--button);
|
|
112
|
+
--player-button--color--inactive: var(--sc-player--button-inactive);
|
|
128
113
|
position: absolute;
|
|
129
114
|
top: 0;
|
|
130
115
|
right: 0;
|
|
@@ -175,6 +160,8 @@ const variables = $derived.by(() => {
|
|
|
175
160
|
}
|
|
176
161
|
|
|
177
162
|
.close-button {
|
|
163
|
+
--player-button--color: var(--sc-player--button);
|
|
164
|
+
--player-button--color--inactive: var(--sc-player--button-inactive);
|
|
178
165
|
position: absolute;
|
|
179
166
|
top: 0;
|
|
180
167
|
right: 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">import { slideHorizontally } from '../../../core/transitions';
|
|
2
|
-
let {
|
|
2
|
+
let { uiManager, position, children } = $props();
|
|
3
3
|
const handlePanelClick = (e) => {
|
|
4
4
|
e.stopPropagation();
|
|
5
5
|
};
|
|
@@ -10,12 +10,6 @@ const styles = $derived.by(() => {
|
|
|
10
10
|
`--overview-panel--bottom: ${position.bottom}px`,
|
|
11
11
|
`--overview-panel--right: ${position.right}px`
|
|
12
12
|
];
|
|
13
|
-
if (config.playerColors.sidebarBackground) {
|
|
14
|
-
values.push(`--overview-panel--background: ${config.playerColors.sidebarBackground}`);
|
|
15
|
-
}
|
|
16
|
-
if (config.playerColors.brand) {
|
|
17
|
-
values.push(`--overview-panel--brand-color: ${config.playerColors.brand}`);
|
|
18
|
-
}
|
|
19
13
|
return values.join(';');
|
|
20
14
|
});
|
|
21
15
|
</script>
|
|
@@ -43,12 +37,12 @@ const styles = $derived.by(() => {
|
|
|
43
37
|
}
|
|
44
38
|
}
|
|
45
39
|
.overview-panel {
|
|
46
|
-
--_overview-panel--background: var(--
|
|
40
|
+
--_overview-panel--background: var(--sc-player--sidebar-background);
|
|
47
41
|
--_overview-panel--width: var(--overview-panel--width);
|
|
48
42
|
--_overview-panel--top: var(--overview-panel--top);
|
|
49
43
|
--_overview-panel--bottom: var(--overview-panel--bottom);
|
|
50
44
|
--_overview-panel--right: var(--overview-panel--right);
|
|
51
|
-
--brand-color: var(--
|
|
45
|
+
--brand-color: var(--sc-player--brand);
|
|
52
46
|
width: var(--_overview-panel--width);
|
|
53
47
|
min-width: var(--_overview-panel--width);
|
|
54
48
|
max-width: var(--_overview-panel--width);
|
|
@@ -1,37 +1,14 @@
|
|
|
1
|
-
import type { PlayerConfig } from './player-config.svelte.js';
|
|
2
1
|
import type { PlayerUIManager } from './ui-manager.svelte';
|
|
3
2
|
import type { Snippet } from 'svelte';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
position: {
|
|
11
|
-
top: number;
|
|
12
|
-
bottom: number;
|
|
13
|
-
right: number;
|
|
14
|
-
};
|
|
15
|
-
children: Snippet;
|
|
3
|
+
type Props = {
|
|
4
|
+
uiManager: PlayerUIManager;
|
|
5
|
+
position: {
|
|
6
|
+
top: number;
|
|
7
|
+
bottom: number;
|
|
8
|
+
right: number;
|
|
16
9
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
interface $$IsomorphicComponent {
|
|
23
|
-
new <T extends {
|
|
24
|
-
id: string;
|
|
25
|
-
}>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
|
|
26
|
-
$$bindings?: ReturnType<__sveltets_Render<T>['bindings']>;
|
|
27
|
-
} & ReturnType<__sveltets_Render<T>['exports']>;
|
|
28
|
-
<T extends {
|
|
29
|
-
id: string;
|
|
30
|
-
}>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {}): ReturnType<__sveltets_Render<T>['exports']>;
|
|
31
|
-
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
32
|
-
}
|
|
33
|
-
declare const OverviewPanel: $$IsomorphicComponent;
|
|
34
|
-
type OverviewPanel<T extends {
|
|
35
|
-
id: string;
|
|
36
|
-
}> = InstanceType<typeof OverviewPanel<T>>;
|
|
10
|
+
children: Snippet;
|
|
11
|
+
};
|
|
12
|
+
declare const OverviewPanel: import("svelte").Component<Props, {}, "">;
|
|
13
|
+
type OverviewPanel = ReturnType<typeof OverviewPanel>;
|
|
37
14
|
export default OverviewPanel;
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import type { Locale } from '../../../core/locale';
|
|
2
|
-
import { type ThemeValue } from '../../../core/theme';
|
|
3
|
-
import { PlayerColors } from '../colors';
|
|
4
2
|
export declare class PlayerSettings {
|
|
5
3
|
locale: Locale;
|
|
6
4
|
showStreamsCloudWatermark: boolean;
|
|
7
|
-
allPlayerColors: Record<ThemeValue, PlayerColors>;
|
|
8
5
|
constructor(init?: IContentPlayerSettings);
|
|
9
|
-
get playerColors(): PlayerColors;
|
|
10
6
|
patch: (settings?: IContentPlayerSettings) => void;
|
|
11
7
|
}
|
|
12
8
|
export type IContentPlayerSettings = {
|
|
13
9
|
locale?: Locale;
|
|
14
10
|
showStreamsCloudWatermark?: boolean;
|
|
15
|
-
playerColors?: Record<ThemeValue, PlayerColors>;
|
|
16
11
|
};
|
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import { Theme } from '../../../core/theme';
|
|
2
|
-
import { PlayerColors } from '../colors';
|
|
3
1
|
export class PlayerSettings {
|
|
4
2
|
locale = $state('en');
|
|
5
3
|
showStreamsCloudWatermark = $state(false);
|
|
6
|
-
allPlayerColors = $state.raw({
|
|
7
|
-
light: new PlayerColors(null),
|
|
8
|
-
dark: new PlayerColors(null)
|
|
9
|
-
});
|
|
10
4
|
constructor(init) {
|
|
11
5
|
this.patch(init);
|
|
12
6
|
}
|
|
13
|
-
get playerColors() {
|
|
14
|
-
return this.allPlayerColors[Theme.get()];
|
|
15
|
-
}
|
|
16
7
|
patch = (settings) => {
|
|
17
8
|
if (settings?.locale !== undefined) {
|
|
18
9
|
this.locale = settings.locale;
|
|
@@ -20,8 +11,5 @@ export class PlayerSettings {
|
|
|
20
11
|
if (settings?.showStreamsCloudWatermark !== undefined) {
|
|
21
12
|
this.showStreamsCloudWatermark = settings.showStreamsCloudWatermark;
|
|
22
13
|
}
|
|
23
|
-
if (settings?.playerColors !== undefined) {
|
|
24
|
-
this.allPlayerColors = settings.playerColors;
|
|
25
|
-
}
|
|
26
14
|
};
|
|
27
15
|
}
|
|
@@ -1,13 +1,28 @@
|
|
|
1
|
-
<script lang="ts">import {
|
|
2
|
-
let { backgroundDisabled, backgroundImageUrl,
|
|
1
|
+
<script lang="ts">import { brandColors } from '../../core/theme';
|
|
2
|
+
let { theme = 'dark', backgroundDisabled, backgroundImageUrl, children } = $props();
|
|
3
|
+
const appendBrandPair = (values, name, pair) => {
|
|
4
|
+
if (pair.light) {
|
|
5
|
+
values.push(`--sc-player--light--${name}: ${pair.light}`);
|
|
6
|
+
}
|
|
7
|
+
if (pair.dark) {
|
|
8
|
+
values.push(`--sc-player--dark--${name}: ${pair.dark}`);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
3
11
|
const styles = $derived.by(() => {
|
|
4
12
|
const values = [];
|
|
5
13
|
if (backgroundImageUrl) {
|
|
6
14
|
values.push(`--shadow-root--background-image-url: url(${backgroundImageUrl})`);
|
|
7
15
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
16
|
+
appendBrandPair(values, 'background', brandColors.playerBackground);
|
|
17
|
+
appendBrandPair(values, 'brand', brandColors.brand);
|
|
18
|
+
appendBrandPair(values, 'button', brandColors.button);
|
|
19
|
+
appendBrandPair(values, 'button-inactive', brandColors.buttonInactive);
|
|
20
|
+
appendBrandPair(values, 'card-background', brandColors.cardBackground);
|
|
21
|
+
appendBrandPair(values, 'card-button', brandColors.cardButton);
|
|
22
|
+
appendBrandPair(values, 'menu-background', brandColors.menuBackground);
|
|
23
|
+
appendBrandPair(values, 'price', brandColors.price);
|
|
24
|
+
appendBrandPair(values, 'sale-price', brandColors.salePrice);
|
|
25
|
+
appendBrandPair(values, 'sidebar-background', brandColors.sidebarBackground);
|
|
11
26
|
return values.join(';');
|
|
12
27
|
});
|
|
13
28
|
</script>
|
|
@@ -21,12 +36,13 @@ const styles = $derived.by(() => {
|
|
|
21
36
|
class:shadow-root--background-enabled={!backgroundDisabled}
|
|
22
37
|
class:shadow-root--background-active={!backgroundDisabled && backgroundImageUrl && backgroundImageUrl !== 'not-applicable'}
|
|
23
38
|
class:shadow-root--background-loading={!backgroundDisabled && !backgroundImageUrl}
|
|
24
|
-
style={
|
|
25
|
-
|
|
39
|
+
style:color-scheme={theme}
|
|
40
|
+
style={styles}>
|
|
26
41
|
{@render children()}
|
|
27
42
|
</div>
|
|
28
43
|
|
|
29
|
-
<style>@
|
|
44
|
+
<style>@charset "UTF-8";
|
|
45
|
+
@keyframes fadeIn {
|
|
30
46
|
0% {
|
|
31
47
|
opacity: 1;
|
|
32
48
|
}
|
|
@@ -37,58 +53,22 @@ const styles = $derived.by(() => {
|
|
|
37
53
|
opacity: 1;
|
|
38
54
|
}
|
|
39
55
|
}
|
|
40
|
-
|
|
41
|
-
:global([data-theme='default']) {
|
|
42
|
-
/* Backgrounds */
|
|
43
|
-
--sc-mc-color--bg-button: #ffffff;
|
|
44
|
-
--sc-mc-color--bg-card: #ffffff;
|
|
45
|
-
--sc-mc-color--bg-card-action: #f9fafb;
|
|
46
|
-
--sc-mc-color--bg-image: #d1d5db;
|
|
47
|
-
--sc-mc-color--bg-panel: #ffffff;
|
|
48
|
-
--sc-mc-color--bg-screen: #f9fafb;
|
|
49
|
-
/* Borders */
|
|
50
|
-
--sc-mc-color--border-brand: #144ab0;
|
|
51
|
-
--sc-mc-color--border-card: #f2f2f2;
|
|
52
|
-
/* Buttons */
|
|
53
|
-
--sc-mc-color--button-secondary: #9ca3af;
|
|
54
|
-
--sc-mc-color--button-player: #272727;
|
|
55
|
-
/* Icons */
|
|
56
|
-
--sc-mc-color--icon-brand: #144ab0;
|
|
57
|
-
--sc-mc-color--icon-destructive: #e71d36;
|
|
58
|
-
--sc-mc-color--icon-overlay: #ffffff;
|
|
59
|
-
--sc-mc-color--icon-overlay-shadow: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.2));
|
|
60
|
-
--sc-mc-color--icon-primary: #1f2937;
|
|
61
|
-
--sc-mc-color--icon-secondary: #9ca3af;
|
|
62
|
-
--sc-mc-color--icon-success: #0cce6b;
|
|
63
|
-
--sc-mc-color--icon-warning: #ffa62b;
|
|
64
|
-
/* Text */
|
|
65
|
-
--sc-mc-color--text-brand: #144ab0;
|
|
66
|
-
--sc-mc-color--text-inverted: #ffffff;
|
|
67
|
-
--sc-mc-color--text-primary: #000000;
|
|
68
|
-
--sc-mc-color--text-primary-shadow: 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 3px rgba(255, 255, 255, 0.1), 0 1px 6px rgba(255, 255, 255, 0.05);
|
|
69
|
-
--sc-mc-color--text-secondary: #6b7280;
|
|
70
|
-
--sc-mc-color--text-white: #ffffff;
|
|
71
|
-
--sc-mc-color--text-white-shadow: 0 1px 0 rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 6px rgba(0, 0, 0, 0.05);
|
|
72
|
-
--sc-mc-color--text-inactive: #e5e7eb;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
:global([data-theme='dark']) {
|
|
56
|
+
.shadow-root {
|
|
76
57
|
/* Backgrounds */
|
|
77
|
-
--sc-mc-color--bg-button: #111827;
|
|
78
|
-
--sc-mc-color--bg-card: #000000;
|
|
79
|
-
--sc-mc-color--bg-card-action: #111827;
|
|
80
|
-
--sc-mc-color--bg-image: #374151;
|
|
81
|
-
--sc-mc-color--bg-panel: #000000;
|
|
82
|
-
--sc-mc-color--bg-screen: #1e1e1e;
|
|
58
|
+
--sc-mc-color--bg-button: light-dark(#ffffff, #111827);
|
|
59
|
+
--sc-mc-color--bg-card: light-dark(#ffffff, #000000);
|
|
60
|
+
--sc-mc-color--bg-card-action: light-dark(#f9fafb, #111827);
|
|
61
|
+
--sc-mc-color--bg-image: light-dark(#d1d5db, #374151);
|
|
62
|
+
--sc-mc-color--bg-panel: light-dark(#ffffff, #000000);
|
|
63
|
+
--sc-mc-color--bg-screen: light-dark(#f9fafb, #1e1e1e);
|
|
83
64
|
/* Borders */
|
|
84
|
-
--sc-mc-color--border-brand: #5a8dec;
|
|
85
|
-
--sc-mc-color--border-card: #000000;
|
|
65
|
+
--sc-mc-color--border-brand: light-dark(#144ab0, #5a8dec);
|
|
86
66
|
/* Buttons */
|
|
67
|
+
--sc-mc-color--button-player: light-dark(#272727, #000000);
|
|
87
68
|
--sc-mc-color--button-secondary: #9ca3af;
|
|
88
|
-
--sc-mc-color--button-player: #000000;
|
|
89
69
|
/* Icons */
|
|
90
|
-
--sc-mc-color--icon-brand: #ffffff;
|
|
91
|
-
--sc-mc-color--icon-destructive: #d4172d;
|
|
70
|
+
--sc-mc-color--icon-brand: light-dark(#144ab0, #ffffff);
|
|
71
|
+
--sc-mc-color--icon-destructive: light-dark(#e71d36, #d4172d);
|
|
92
72
|
--sc-mc-color--icon-overlay: #ffffff;
|
|
93
73
|
--sc-mc-color--icon-overlay-shadow: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.2));
|
|
94
74
|
--sc-mc-color--icon-primary: #1f2937;
|
|
@@ -96,19 +76,56 @@ const styles = $derived.by(() => {
|
|
|
96
76
|
--sc-mc-color--icon-success: #0cce6b;
|
|
97
77
|
--sc-mc-color--icon-warning: #ffa62b;
|
|
98
78
|
/* Text */
|
|
99
|
-
--sc-mc-color--text-brand: #5a8dec;
|
|
79
|
+
--sc-mc-color--text-brand: light-dark(#144ab0, #5a8dec);
|
|
80
|
+
--sc-mc-color--text-inactive: light-dark(#e5e7eb, #d1d5db);
|
|
100
81
|
--sc-mc-color--text-inverted: #ffffff;
|
|
101
|
-
--sc-mc-color--text-primary: #ffffff;
|
|
102
|
-
--
|
|
103
|
-
--
|
|
82
|
+
--sc-mc-color--text-primary: light-dark(#000000, #ffffff);
|
|
83
|
+
--_sc-mc--text-primary-shadow-light: 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 3px rgba(255, 255, 255, 0.1), 0 1px 6px rgba(255, 255, 255, 0.05);
|
|
84
|
+
--_sc-mc--text-primary-shadow-dark: 0 1px 0 rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 6px rgba(0, 0, 0, 0.05);
|
|
85
|
+
--sc-mc-color--text-primary-shadow: light-dark(var(--_sc-mc--text-primary-shadow-light), var(--_sc-mc--text-primary-shadow-dark));
|
|
86
|
+
--sc-mc-color--text-secondary: light-dark(#6b7280, #d1d5db);
|
|
104
87
|
--sc-mc-color--text-white: #ffffff;
|
|
105
88
|
--sc-mc-color--text-white-shadow: 0 1px 0 rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 6px rgba(0, 0, 0, 0.05);
|
|
106
|
-
--sc-
|
|
89
|
+
/* Player brand colors — overridable via --sc-player--{light|dark}--{name} custom properties */
|
|
90
|
+
--sc-player--background: light-dark(
|
|
91
|
+
var(--sc-player--light--background, rgb(from var(--sc-mc-color--bg-panel) r g b / 90%)),
|
|
92
|
+
var(--sc-player--dark--background, rgb(from var(--sc-mc-color--bg-panel) r g b / 90%))
|
|
93
|
+
);
|
|
94
|
+
--sc-player--brand: light-dark(
|
|
95
|
+
var(--sc-player--light--brand, var(--sc-mc-color--border-brand)),
|
|
96
|
+
var(--sc-player--dark--brand, var(--sc-mc-color--border-brand))
|
|
97
|
+
);
|
|
98
|
+
--sc-player--button: light-dark(
|
|
99
|
+
var(--sc-player--light--button, var(--sc-mc-color--button-player)),
|
|
100
|
+
var(--sc-player--dark--button, var(--sc-mc-color--button-player))
|
|
101
|
+
);
|
|
102
|
+
--sc-player--button-inactive: light-dark(
|
|
103
|
+
var(--sc-player--light--button-inactive, rgb(from var(--sc-player--button) r g b / 60%)),
|
|
104
|
+
var(--sc-player--dark--button-inactive, rgb(from var(--sc-player--button) r g b / 60%))
|
|
105
|
+
);
|
|
106
|
+
--sc-player--card-background: light-dark(
|
|
107
|
+
var(--sc-player--light--card-background, rgb(from var(--sc-mc-color--bg-card) r g b / 90%)),
|
|
108
|
+
var(--sc-player--dark--card-background, rgb(from var(--sc-mc-color--bg-card) r g b / 90%))
|
|
109
|
+
);
|
|
110
|
+
--sc-player--card-button: light-dark(
|
|
111
|
+
var(--sc-player--light--card-button, var(--sc-mc-color--bg-button)),
|
|
112
|
+
var(--sc-player--dark--card-button, var(--sc-mc-color--bg-button))
|
|
113
|
+
);
|
|
114
|
+
--sc-player--menu-background: light-dark(
|
|
115
|
+
var(--sc-player--light--menu-background, rgb(from var(--sc-mc-color--bg-panel) r g b / 95%)),
|
|
116
|
+
var(--sc-player--dark--menu-background, rgb(from var(--sc-mc-color--bg-panel) r g b / 95%))
|
|
117
|
+
);
|
|
118
|
+
--sc-player--price: light-dark(var(--sc-player--light--price, inherit), var(--sc-player--dark--price, inherit));
|
|
119
|
+
--sc-player--sale-price: light-dark(var(--sc-player--light--sale-price, inherit), var(--sc-player--dark--sale-price, inherit));
|
|
120
|
+
--sc-player--sidebar-background: light-dark(
|
|
121
|
+
var(--sc-player--light--sidebar-background, rgb(from var(--sc-mc-color--bg-panel) r g b / 90%)),
|
|
122
|
+
var(--sc-player--dark--sidebar-background, rgb(from var(--sc-mc-color--bg-panel) r g b / 90%))
|
|
123
|
+
);
|
|
107
124
|
}
|
|
108
125
|
|
|
109
126
|
.shadow-root {
|
|
110
|
-
--_shadow-root--background-color: rgb(from var(--
|
|
111
|
-
--_shadow-root--shield-color: rgb(from var(--
|
|
127
|
+
--_shadow-root--background-color: rgb(from var(--sc-player--background, var(--sc-mc-color--bg-screen)) r g b);
|
|
128
|
+
--_shadow-root--shield-color: rgb(from var(--sc-player--background, rgb(from var(--sc-mc-color--bg-screen) r g b / 50%)) r g b / alpha);
|
|
112
129
|
--_shadow-root--background-image-url: var(--shadow-root--background-image-url);
|
|
113
130
|
width: 100%;
|
|
114
131
|
min-width: 100%;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { type ThemeValue } from '../../core/theme';
|
|
1
2
|
import type { Snippet } from 'svelte';
|
|
2
3
|
type Props = {
|
|
4
|
+
theme?: ThemeValue;
|
|
3
5
|
backgroundDisabled: boolean;
|
|
4
6
|
backgroundImageUrl: string | null | 'not-applicable';
|
|
5
|
-
backgroundColor?: string | null;
|
|
6
7
|
children: Snippet;
|
|
7
8
|
};
|
|
8
9
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
@use 'src/styles/colors';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
:global([data-theme='default']) {
|
|
3
|
+
.shadow-root {
|
|
5
4
|
/* Backgrounds */
|
|
6
|
-
--sc-mc-color--bg-button: #{colors.$color-white};
|
|
7
|
-
--sc-mc-color--bg-card: #{colors.$color-white};
|
|
8
|
-
--sc-mc-color--bg-card-action: #{colors.$color-neutral-50};
|
|
9
|
-
--sc-mc-color--bg-image: #{colors.$color-neutral-300};
|
|
10
|
-
--sc-mc-color--bg-panel: #{colors.$color-white};
|
|
11
|
-
--sc-mc-color--bg-screen: #{colors.$color-neutral-50};
|
|
5
|
+
--sc-mc-color--bg-button: light-dark(#{colors.$color-white}, #{colors.$color-neutral-900});
|
|
6
|
+
--sc-mc-color--bg-card: light-dark(#{colors.$color-white}, #{colors.$color-black});
|
|
7
|
+
--sc-mc-color--bg-card-action: light-dark(#{colors.$color-neutral-50}, #{colors.$color-neutral-900});
|
|
8
|
+
--sc-mc-color--bg-image: light-dark(#{colors.$color-neutral-300}, #{colors.$color-neutral-700});
|
|
9
|
+
--sc-mc-color--bg-panel: light-dark(#{colors.$color-white}, #{colors.$color-black});
|
|
10
|
+
--sc-mc-color--bg-screen: light-dark(#{colors.$color-neutral-50}, #{colors.$color-dark-800});
|
|
12
11
|
|
|
13
12
|
/* Borders */
|
|
14
|
-
--sc-mc-color--border-brand: #{colors.$color-primary-500};
|
|
15
|
-
--sc-mc-color--border-card: #{colors.$color-gray-100};
|
|
13
|
+
--sc-mc-color--border-brand: light-dark(#{colors.$color-primary-500}, #{colors.$color-primary-400});
|
|
16
14
|
|
|
17
15
|
/* Buttons */
|
|
16
|
+
--sc-mc-color--button-player: light-dark(#{colors.$color-dark-500}, #{colors.$color-black});
|
|
18
17
|
--sc-mc-color--button-secondary: #{colors.$color-neutral-400};
|
|
19
|
-
--sc-mc-color--button-player: #{colors.$color-dark-500};
|
|
20
18
|
|
|
21
19
|
/* Icons */
|
|
22
|
-
--sc-mc-color--icon-brand: #{colors.$color-primary-500};
|
|
23
|
-
--sc-mc-color--icon-destructive: #{colors.$color-destructive-500};
|
|
20
|
+
--sc-mc-color--icon-brand: light-dark(#{colors.$color-primary-500}, #{colors.$color-white});
|
|
21
|
+
--sc-mc-color--icon-destructive: light-dark(#{colors.$color-destructive-500}, #{colors.$color-destructive-600});
|
|
24
22
|
--sc-mc-color--icon-overlay: #{colors.$color-white};
|
|
25
23
|
--sc-mc-color--icon-overlay-shadow: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.2));
|
|
26
24
|
--sc-mc-color--icon-primary: #{colors.$color-neutral-800};
|
|
@@ -29,50 +27,50 @@
|
|
|
29
27
|
--sc-mc-color--icon-warning: #{colors.$color-warning-500};
|
|
30
28
|
|
|
31
29
|
/* Text */
|
|
32
|
-
--sc-mc-color--text-brand: #{colors.$color-primary-500};
|
|
30
|
+
--sc-mc-color--text-brand: light-dark(#{colors.$color-primary-500}, #{colors.$color-primary-400});
|
|
31
|
+
--sc-mc-color--text-inactive: light-dark(#{colors.$color-neutral-200}, #{colors.$color-neutral-300});
|
|
33
32
|
--sc-mc-color--text-inverted: #{colors.$color-white};
|
|
34
|
-
--sc-mc-color--text-primary: #{colors.$color-black};
|
|
35
|
-
--
|
|
36
|
-
--
|
|
33
|
+
--sc-mc-color--text-primary: light-dark(#{colors.$color-black}, #{colors.$color-white});
|
|
34
|
+
--_sc-mc--text-primary-shadow-light: 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 3px rgba(255, 255, 255, 0.1), 0 1px 6px rgba(255, 255, 255, 0.05);
|
|
35
|
+
--_sc-mc--text-primary-shadow-dark: 0 1px 0 rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 6px rgba(0, 0, 0, 0.05);
|
|
36
|
+
--sc-mc-color--text-primary-shadow: light-dark(var(--_sc-mc--text-primary-shadow-light), var(--_sc-mc--text-primary-shadow-dark));
|
|
37
|
+
--sc-mc-color--text-secondary: light-dark(#{colors.$color-neutral-500}, #{colors.$color-neutral-300});
|
|
37
38
|
--sc-mc-color--text-white: #{colors.$color-white};
|
|
38
39
|
--sc-mc-color--text-white-shadow: 0 1px 0 rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 6px rgba(0, 0, 0, 0.05);
|
|
39
|
-
--sc-mc-color--text-inactive: #{colors.$color-neutral-200};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
:global([data-theme='dark']) {
|
|
43
|
-
/* Backgrounds */
|
|
44
|
-
--sc-mc-color--bg-button: #{colors.$color-neutral-900};
|
|
45
|
-
--sc-mc-color--bg-card: #{colors.$color-black};
|
|
46
|
-
--sc-mc-color--bg-card-action: #{colors.$color-neutral-900};
|
|
47
|
-
--sc-mc-color--bg-image: #{colors.$color-neutral-700};
|
|
48
|
-
--sc-mc-color--bg-panel: #{colors.$color-black};
|
|
49
|
-
--sc-mc-color--bg-screen: #{colors.$color-dark-800};
|
|
50
|
-
|
|
51
|
-
/* Borders */
|
|
52
|
-
--sc-mc-color--border-brand: #{colors.$color-primary-400};
|
|
53
|
-
--sc-mc-color--border-card: #{colors.$color-black};
|
|
54
|
-
|
|
55
|
-
/* Buttons */
|
|
56
|
-
--sc-mc-color--button-secondary: #{colors.$color-neutral-400};
|
|
57
|
-
--sc-mc-color--button-player: #{colors.$color-black};
|
|
58
|
-
|
|
59
|
-
/* Icons */
|
|
60
|
-
--sc-mc-color--icon-brand: #{colors.$color-white};
|
|
61
|
-
--sc-mc-color--icon-destructive: #{colors.$color-destructive-600};
|
|
62
|
-
--sc-mc-color--icon-overlay: #{colors.$color-white};
|
|
63
|
-
--sc-mc-color--icon-overlay-shadow: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.2));
|
|
64
|
-
--sc-mc-color--icon-primary: #{colors.$color-neutral-800};
|
|
65
|
-
--sc-mc-color--icon-secondary: #{colors.$color-neutral-400};
|
|
66
|
-
--sc-mc-color--icon-success: #{colors.$color-success-500};
|
|
67
|
-
--sc-mc-color--icon-warning: #{colors.$color-warning-500};
|
|
68
40
|
|
|
69
|
-
/*
|
|
70
|
-
--sc-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
--sc-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
41
|
+
/* Player brand colors — overridable via --sc-player--{light|dark}--{name} custom properties */
|
|
42
|
+
--sc-player--background: light-dark(
|
|
43
|
+
var(--sc-player--light--background, rgb(from var(--sc-mc-color--bg-panel) r g b / 90%)),
|
|
44
|
+
var(--sc-player--dark--background, rgb(from var(--sc-mc-color--bg-panel) r g b / 90%))
|
|
45
|
+
);
|
|
46
|
+
--sc-player--brand: light-dark(
|
|
47
|
+
var(--sc-player--light--brand, var(--sc-mc-color--border-brand)),
|
|
48
|
+
var(--sc-player--dark--brand, var(--sc-mc-color--border-brand))
|
|
49
|
+
);
|
|
50
|
+
--sc-player--button: light-dark(
|
|
51
|
+
var(--sc-player--light--button, var(--sc-mc-color--button-player)),
|
|
52
|
+
var(--sc-player--dark--button, var(--sc-mc-color--button-player))
|
|
53
|
+
);
|
|
54
|
+
--sc-player--button-inactive: light-dark(
|
|
55
|
+
var(--sc-player--light--button-inactive, rgb(from var(--sc-player--button) r g b / 60%)),
|
|
56
|
+
var(--sc-player--dark--button-inactive, rgb(from var(--sc-player--button) r g b / 60%))
|
|
57
|
+
);
|
|
58
|
+
--sc-player--card-background: light-dark(
|
|
59
|
+
var(--sc-player--light--card-background, rgb(from var(--sc-mc-color--bg-card) r g b / 90%)),
|
|
60
|
+
var(--sc-player--dark--card-background, rgb(from var(--sc-mc-color--bg-card) r g b / 90%))
|
|
61
|
+
);
|
|
62
|
+
--sc-player--card-button: light-dark(
|
|
63
|
+
var(--sc-player--light--card-button, var(--sc-mc-color--bg-button)),
|
|
64
|
+
var(--sc-player--dark--card-button, var(--sc-mc-color--bg-button))
|
|
65
|
+
);
|
|
66
|
+
--sc-player--menu-background: light-dark(
|
|
67
|
+
var(--sc-player--light--menu-background, rgb(from var(--sc-mc-color--bg-panel) r g b / 95%)),
|
|
68
|
+
var(--sc-player--dark--menu-background, rgb(from var(--sc-mc-color--bg-panel) r g b / 95%))
|
|
69
|
+
);
|
|
70
|
+
--sc-player--price: light-dark(var(--sc-player--light--price, inherit), var(--sc-player--dark--price, inherit));
|
|
71
|
+
--sc-player--sale-price: light-dark(var(--sc-player--light--sale-price, inherit), var(--sc-player--dark--sale-price, inherit));
|
|
72
|
+
--sc-player--sidebar-background: light-dark(
|
|
73
|
+
var(--sc-player--light--sidebar-background, rgb(from var(--sc-mc-color--bg-panel) r g b / 90%)),
|
|
74
|
+
var(--sc-player--dark--sidebar-background, rgb(from var(--sc-mc-color--bg-panel) r g b / 90%))
|
|
75
|
+
);
|
|
78
76
|
}
|
package/package.json
CHANGED