Add design system feature flag and runtime integration

This commit is contained in:
thePR0M3TH3AN committed 2025-10-11 16:11:43 -04:00
1 parent 8288824872
commit 8265f9e2de
42 files changed
+359 -23

No files matched your search

+6 -1
View File
@@ -1,3 +1,5 @@
import { normalizeDesignSystemContext } from "../../designSystem.js";
export class VideoCard {
constructor({
document: doc,
@@ -16,7 +18,8 @@ export class VideoCard {
state = {},
ensureGlobalMoreMenuHandlers,
onRequestCloseAllMenus,
nsfwContext = null
nsfwContext = null,
designSystem = null,
} = {}) {
if (!doc) {
throw new Error("VideoCard requires a document reference.");
@@ -76,6 +79,8 @@ export class VideoCard {
? onRequestCloseAllMenus
: null;
this.designSystem = normalizeDesignSystemContext(designSystem);
this.nsfwContext = {
isNsfw: Boolean(nsfwContext?.isNsfw),
allowNsfw: nsfwContext?.allowNsfw !== false,