@lumiastream/ui 0.2.7 → 0.2.8-alpha.10

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/README.md CHANGED
@@ -72,6 +72,15 @@ Artifacts land in `dist/` and are what gets published to npm.
72
72
  1. Run `pnpm storybook` for hot‑reloading Storybook and `pnpm watch` for the library bundle.
73
73
  2. Commit with Conventional Commits (`feat:`, `fix:` …) so the release pipeline can auto‑generate changelogs.
74
74
 
75
+ ### Running live inside other repos
76
+
77
+ To iterate on this library against a real consumer (Overlay-UI or LumiaStream)
78
+ without publishing a new npm version each time, see **[LOCAL_DEV.md](./LOCAL_DEV.md)**.
79
+ It covers the symlink workflow for both pnpm (Overlay-UI) and npm (LumiaStream),
80
+ the Vite config requirements that have to stay in place for the symlinked
81
+ workflow to work, and a troubleshooting table for the symptoms we've hit in
82
+ practice.
83
+
75
84
  ---
76
85
 
77
86
  ## 🪪 License
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;
@@ -498,6 +498,8 @@ type OverlayLayerBounds = {
498
498
  zIndex?: number;
499
499
  matrix?: string;
500
500
  clipPath?: string;
501
+ autoWidth?: boolean;
502
+ autoHeight?: boolean;
501
503
  };
502
504
  type OverlayLayerState = {
503
505
  id: string;
@@ -606,6 +608,7 @@ interface SEText {
606
608
  scrolling?: {
607
609
  direction?: string;
608
610
  speed?: number;
611
+ enabled?: boolean;
609
612
  };
610
613
  css?: Record<string, unknown>;
611
614
  }
@@ -689,13 +692,67 @@ declare const SE_WIDGET_TO_MARKETPLACE_CANDIDATES: Record<string, number[]>;
689
692
  declare function getMarketplaceCandidates(seWidgetType: string): number[];
690
693
  declare function hasMarketplaceCandidates(seWidgetType: string): boolean;
691
694
 
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;
695
+ declare const SE_IMPORT_FLAGS: {};
696
+ declare function isWidgetFlaggedOff(_seType: string): boolean;
697
697
  declare const FLAG_OFF_REASONS: Record<string, string>;
698
698
 
699
+ interface SEAccountClaims {
700
+ channel: string;
701
+ user: string;
702
+ authToken: string;
703
+ provider: string;
704
+ provider_id: string;
705
+ role: string;
706
+ exp: number;
707
+ jti: string;
708
+ channel_id?: string;
709
+ user_id?: string;
710
+ }
711
+ type SEAuthErrorCode = 'invalid-jwt' | 'expired' | 'unauthorized' | 'forbidden';
712
+ declare class SEAuthError extends Error {
713
+ code: SEAuthErrorCode;
714
+ constructor(code: SEAuthErrorCode, message: string);
715
+ }
716
+ declare function decodeJwtPayload(jwt: string): SEAccountClaims;
717
+ declare class SEClient {
718
+ private readonly claims;
719
+ constructor(claims: SEAccountClaims);
720
+ static fromJwt(jwt: string): SEClient;
721
+ get channelId(): string;
722
+ get provider(): string;
723
+ get providerId(): string;
724
+ get userId(): string;
725
+ get jti(): string;
726
+ get expiresAt(): Date;
727
+ provenance(): {
728
+ jti: string;
729
+ channelId: string;
730
+ provider: string;
731
+ importedAt: string;
732
+ };
733
+ get<T>(path: string): Promise<T>;
734
+ }
735
+ interface SEChannelSummary {
736
+ _id: string;
737
+ provider: string;
738
+ providerId: string;
739
+ username: string;
740
+ alias?: string;
741
+ displayName?: string;
742
+ avatar?: string;
743
+ role?: string;
744
+ authorized?: boolean;
745
+ inactive?: boolean;
746
+ isPartner?: boolean;
747
+ broadcasterType?: string;
748
+ }
749
+ interface SEUsersCurrentResponse {
750
+ _id: string;
751
+ suspended?: boolean;
752
+ channels: SEChannelSummary[];
753
+ }
754
+ declare function fetchUsableChannels(client: SEClient): Promise<SEChannelSummary[]>;
755
+
699
756
  interface SEExistingAsset {
700
757
  file_name?: string;
701
758
  name?: string;
@@ -737,12 +794,14 @@ interface SEImportBindings {
737
794
  };
738
795
  CustomEmbed?: ComponentType<SECustomEmbedProps>;
739
796
  t?: (key: string) => string | undefined;
797
+ onAuthError?: (err: SEAuthError) => void;
740
798
  }
741
799
 
742
800
  interface SEImportWizardProps {
743
801
  bindings: SEImportBindings;
802
+ initialUrl?: string;
744
803
  }
745
- declare function SEImportWizard({ bindings }: SEImportWizardProps): react_jsx_runtime.JSX.Element;
804
+ declare function SEImportWizard({ bindings, initialUrl, }: SEImportWizardProps): react_jsx_runtime.JSX.Element;
746
805
 
747
806
  interface MarketplacePickerProps {
748
807
  seWidgetType: string;
@@ -801,4 +860,4 @@ declare function buildAIPromptForSEWidget(widget: SEWidget, canvas?: {
801
860
  height: number;
802
861
  }): string;
803
862
 
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 };
863
+ 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 };