@lumiastream/ui 0.2.7 → 0.2.8-alpha.2

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 (3) hide show
  1. package/dist/index.d.ts +64 -8
  2. package/dist/index.js +2145 -502
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -485,7 +485,7 @@ declare const resolvePlatformChatterProfileUrl: ({ platform, username, displayna
485
485
  declare const normalizeHttpUrl: (value: unknown) => string | null;
486
486
  declare const resolveChatterProfileUrlWithResolvers: ({ platform, username, displayname, userId, extraSettings, resolvers, }: ResolveChatterProfileUrlWithResolversInput) => Promise<string | null>;
487
487
 
488
- type ModuleType = 'alert' | 'emotebox' | 'emotealert' | 'text' | 'image' | 'audio' | 'video' | 'camera' | 'slideshow' | 'shape' | 'svg' | 'colorbox' | 'goal' | 'timer' | 'gradientlight' | 'browsersource' | 'chatbox' | 'credits' | 'eventlist' | 'eventrotate' | 'hfx' | 'hfxalert' | 'clip' | 'youtube' | 'spinwheel' | 'raffle' | 'viewerqueue' | 'loyaltyleaderboard' | 'viewerprofiles' | 'achievements' | 'poll' | 'tournaments' | 'spotify' | 'nowplaying' | 'youtubemusic' | 'brbscreen' | 'vlc' | 'tts' | 'livecaption' | 'custom' | 'group';
488
+ type ModuleType = 'alert' | 'emotebox' | 'emotealert' | 'text' | 'image' | 'audio' | 'video' | 'camera' | 'slideshow' | 'shape' | 'svg' | 'colorbox' | 'goal' | 'timer' | 'gradientlight' | 'browsersource' | 'chatbox' | 'credits' | 'eventlist' | 'eventrotate' | 'hfx' | 'hfxalert' | 'clip' | 'youtube' | 'spinwheel' | 'raffle' | 'viewerqueue' | 'loyaltyleaderboard' | 'viewerprofiles' | 'achievements' | 'poll' | 'tournaments' | 'spotify' | 'nowplaying' | 'youtubemusic' | 'brbscreen' | 'vlc' | 'tts' | 'livecaption' | 'custom' | 'tipjar' | 'hypetrain' | 'streamboss' | 'songrequest' | 'group';
489
489
  type OverlayLayerType = 'layer' | 'group';
490
490
  type OverlayLayerBounds = {
491
491
  height: number;
@@ -689,13 +689,67 @@ declare const SE_WIDGET_TO_MARKETPLACE_CANDIDATES: Record<string, number[]>;
689
689
  declare function getMarketplaceCandidates(seWidgetType: string): number[];
690
690
  declare function hasMarketplaceCandidates(seWidgetType: string): boolean;
691
691
 
692
- declare const SE_IMPORT_FLAGS: {
693
- readonly IMPORT_MERCH_PRODUCTS: false;
694
- readonly IMPORT_SEASONAL: false;
695
- };
696
- declare function isWidgetFlaggedOff(seType: string): boolean;
692
+ declare const SE_IMPORT_FLAGS: {};
693
+ declare function isWidgetFlaggedOff(_seType: string): boolean;
697
694
  declare const FLAG_OFF_REASONS: Record<string, string>;
698
695
 
696
+ interface SEAccountClaims {
697
+ channel: string;
698
+ user: string;
699
+ authToken: string;
700
+ provider: string;
701
+ provider_id: string;
702
+ role: string;
703
+ exp: number;
704
+ jti: string;
705
+ channel_id?: string;
706
+ user_id?: string;
707
+ }
708
+ type SEAuthErrorCode = 'invalid-jwt' | 'expired' | 'unauthorized' | 'forbidden';
709
+ declare class SEAuthError extends Error {
710
+ code: SEAuthErrorCode;
711
+ constructor(code: SEAuthErrorCode, message: string);
712
+ }
713
+ declare function decodeJwtPayload(jwt: string): SEAccountClaims;
714
+ declare class SEClient {
715
+ private readonly claims;
716
+ constructor(claims: SEAccountClaims);
717
+ static fromJwt(jwt: string): SEClient;
718
+ get channelId(): string;
719
+ get provider(): string;
720
+ get providerId(): string;
721
+ get userId(): string;
722
+ get jti(): string;
723
+ get expiresAt(): Date;
724
+ provenance(): {
725
+ jti: string;
726
+ channelId: string;
727
+ provider: string;
728
+ importedAt: string;
729
+ };
730
+ get<T>(path: string): Promise<T>;
731
+ }
732
+ interface SEChannelSummary {
733
+ _id: string;
734
+ provider: string;
735
+ providerId: string;
736
+ username: string;
737
+ alias?: string;
738
+ displayName?: string;
739
+ avatar?: string;
740
+ role?: string;
741
+ authorized?: boolean;
742
+ inactive?: boolean;
743
+ isPartner?: boolean;
744
+ broadcasterType?: string;
745
+ }
746
+ interface SEUsersCurrentResponse {
747
+ _id: string;
748
+ suspended?: boolean;
749
+ channels: SEChannelSummary[];
750
+ }
751
+ declare function fetchUsableChannels(client: SEClient): Promise<SEChannelSummary[]>;
752
+
699
753
  interface SEExistingAsset {
700
754
  file_name?: string;
701
755
  name?: string;
@@ -737,12 +791,14 @@ interface SEImportBindings {
737
791
  };
738
792
  CustomEmbed?: ComponentType<SECustomEmbedProps>;
739
793
  t?: (key: string) => string | undefined;
794
+ onAuthError?: (err: SEAuthError) => void;
740
795
  }
741
796
 
742
797
  interface SEImportWizardProps {
743
798
  bindings: SEImportBindings;
799
+ initialUrl?: string;
744
800
  }
745
- declare function SEImportWizard({ bindings }: SEImportWizardProps): react_jsx_runtime.JSX.Element;
801
+ declare function SEImportWizard({ bindings, initialUrl, }: SEImportWizardProps): react_jsx_runtime.JSX.Element;
746
802
 
747
803
  interface MarketplacePickerProps {
748
804
  seWidgetType: string;
@@ -801,4 +857,4 @@ declare function buildAIPromptForSEWidget(widget: SEWidget, canvas?: {
801
857
  height: number;
802
858
  }): string;
803
859
 
804
- export { type AIGeneratedCustomOverlay, type AssetMirrorProgress, type BuildChatMessageContentOptions, type ChatMessageContentItem, type ChatMessageEmoteStore, type ChatMessageToken, type ChatMessageTokenizationOptions, type ChatboxMediaPreview, type ChatboxMediaPreviewKind, type ChatterProfileResolver, type ChatterProfileResolverPayload, type ChatterProfileUrlInput, FLAG_OFF_REASONS, type IVariables, type ImportCoverage, type ImportResult, LSButton, type LSButtonProps, LSCheckbox, LSCheckboxField, LSColorPicker, type LSColorPickerProps, LSFontPicker, LSInput, type LSInputProps$1 as LSInputProps, LSMultiSelect, LSRadio, LSRadioGroup, LSSelect, LSSliderInput, type LSInputProps as LSSliderInputProps, LSTextField, type LSTextFieldProps, type LSVariableInputContextValue, LSVariableInputField, type LSVariableInputFieldProps, LSVariableInputProvider, MEDIA_PREVIEW_USER_LEVEL_VALUES, MarketplacePicker, type MarketplacePickerProps, type MediaPreviewRoleSettings, type MediaPreviewRoleSettingsInput, type MediaPreviewUserLevel, type MessageLinkPart, type ModuleType, type OverlayLayerBounds, type OverlayLayerState, type OverlayLayerType, type OverlayModuleAlertState, type OverlayModuleState, type OverlaySettings, type OverlayState, type ResolveChatterProfileUrlWithResolversInput, type ReviewItem, type SEBootstrapResponse, type SECustomEmbedProps, type SEExistingAsset, type SEImportBindings, SEImportWizard, type SEImportWizardProps, type SESaveOverlayBody, type SEUploadAssetResult, type SEWidget, SE_IMPORT_FLAGS, SE_WIDGET_TO_MARKETPLACE_CANDIDATES, type TransplantedUnit, applyReviewAction, buildAIPromptForSEWidget, buildBootstrapUrl, buildChatMessageContent, codeMirrorlinterOptions, extractSEOverlayId, extractSEPreviewParts, fetchSEBootstrap, filenameFromURL, findSEAssetURLs, getAILandingBounds, getMarketplaceCandidates, getMediaPreviewFromUrl, getNormalizedUserLevels, hasMarketplaceCandidates, importSEBootstrap, isMediaPreviewAllowedForUser, isSEBootstrap, isWidgetFlaggedOff, listTransplantableLayers, mirrorOneAsset, normalizeHttpUrl, normalizeMediaPreviewUserLevels, parseMessageLinks, resolveChatterProfileUrlWithResolvers, resolveMediaPreviewRoleSettings, resolveMediaPreviewSetting, resolvePlatformChatterProfileUrl, rewriteAssetURLs, tokenizeChatMessage, transplantLayer, variableCompletionOptions };
860
+ export { type AIGeneratedCustomOverlay, type AssetMirrorProgress, type BuildChatMessageContentOptions, type ChatMessageContentItem, type ChatMessageEmoteStore, type ChatMessageToken, type ChatMessageTokenizationOptions, type ChatboxMediaPreview, type ChatboxMediaPreviewKind, type ChatterProfileResolver, type ChatterProfileResolverPayload, type ChatterProfileUrlInput, FLAG_OFF_REASONS, type IVariables, type ImportCoverage, type ImportResult, LSButton, type LSButtonProps, LSCheckbox, LSCheckboxField, LSColorPicker, type LSColorPickerProps, LSFontPicker, LSInput, type LSInputProps$1 as LSInputProps, LSMultiSelect, LSRadio, LSRadioGroup, LSSelect, LSSliderInput, type LSInputProps as LSSliderInputProps, LSTextField, type LSTextFieldProps, type LSVariableInputContextValue, LSVariableInputField, type LSVariableInputFieldProps, LSVariableInputProvider, MEDIA_PREVIEW_USER_LEVEL_VALUES, MarketplacePicker, type MarketplacePickerProps, type MediaPreviewRoleSettings, type MediaPreviewRoleSettingsInput, type MediaPreviewUserLevel, type MessageLinkPart, type ModuleType, type OverlayLayerBounds, type OverlayLayerState, type OverlayLayerType, type OverlayModuleAlertState, type OverlayModuleState, type OverlaySettings, type OverlayState, type ResolveChatterProfileUrlWithResolversInput, type ReviewItem, type SEAccountClaims, SEAuthError, type SEAuthErrorCode, type SEBootstrapResponse, type SEChannelSummary, SEClient, type SECustomEmbedProps, type SEExistingAsset, type SEImportBindings, SEImportWizard, type SEImportWizardProps, type SESaveOverlayBody, type SEUploadAssetResult, type SEUsersCurrentResponse, type SEWidget, SE_IMPORT_FLAGS, SE_WIDGET_TO_MARKETPLACE_CANDIDATES, type TransplantedUnit, applyReviewAction, buildAIPromptForSEWidget, buildBootstrapUrl, buildChatMessageContent, codeMirrorlinterOptions, decodeJwtPayload, extractSEOverlayId, extractSEPreviewParts, fetchSEBootstrap, fetchUsableChannels, filenameFromURL, findSEAssetURLs, getAILandingBounds, getMarketplaceCandidates, getMediaPreviewFromUrl, getNormalizedUserLevels, hasMarketplaceCandidates, importSEBootstrap, isMediaPreviewAllowedForUser, isSEBootstrap, isWidgetFlaggedOff, listTransplantableLayers, mirrorOneAsset, normalizeHttpUrl, normalizeMediaPreviewUserLevels, parseMessageLinks, resolveChatterProfileUrlWithResolvers, resolveMediaPreviewRoleSettings, resolveMediaPreviewSetting, resolvePlatformChatterProfileUrl, rewriteAssetURLs, tokenizeChatMessage, transplantLayer, variableCompletionOptions };