@byomakase/omakase-player 1.3.1-RC1 → 1.3.1-RC2

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.
@@ -7988,6 +7988,7 @@ declare const OMAKASE_VTT_CUE_DATA_KEY_MAPPING: {
7988
7988
  export declare class OmakaseAudioSelector extends OmakaseDropdownSelector {
7989
7989
  protected readonly dropdownIdPrefix = "omakase-audio-dropdown";
7990
7990
  protected readonly dropdownClass: string;
7991
+ protected readonly toggleIconClass: string;
7991
7992
  private get refreshEventTypes();
7992
7993
  refresh(): void;
7993
7994
  protected renderDropdownLists(dropdownId: string): string;
@@ -9088,6 +9089,8 @@ declare abstract class OmakaseDropdownSelector extends OmakaseDropdownSelector_b
9088
9089
  private _dropdownLists;
9089
9090
  private _toggle;
9090
9091
  private _toggleContent;
9092
+ private _slottedToggleContent;
9093
+ private _defaultToggle;
9091
9094
  private _unavailable;
9092
9095
  protected _playerBreaker: ObserverBreaker;
9093
9096
  protected _connectionBreaker: ObserverBreaker;
@@ -9095,6 +9098,13 @@ declare abstract class OmakaseDropdownSelector extends OmakaseDropdownSelector_b
9095
9098
  protected abstract readonly dropdownIdPrefix: string;
9096
9099
  /** Class set on the rendered `omakase-dropdown`. */
9097
9100
  protected abstract readonly dropdownClass: string;
9101
+ /**
9102
+ * Class of the icon shown by the default toggle in the `icon` representation.
9103
+ */
9104
+ protected readonly toggleIconClass: string | undefined;
9105
+ /** Alignment of the options when the `option-alignment` attribute isn't set. */
9106
+ protected readonly defaultOptionAlignment: OmakaseDropdownAlignment;
9107
+ static get observedAttributes(): string[];
9098
9108
  /** Markup of the `omakase-dropdown-list`s, given the id of the dropdown they're in. */
9099
9109
  protected abstract renderDropdownLists(dropdownId: string): string;
9100
9110
  /**
@@ -9114,9 +9124,18 @@ declare abstract class OmakaseDropdownSelector extends OmakaseDropdownSelector_b
9114
9124
  get dropdownList(): OmakaseDropdownList | undefined;
9115
9125
  get dropdownLists(): OmakaseDropdownList[];
9116
9126
  get toggle(): OmakaseDropdownToggle | undefined;
9117
- /** The elements given in the `toggle` slot. */
9127
+ /** The elements shown in the toggle: those given in the `toggle` slot, else the default icon button, if shown. */
9118
9128
  get toggleContent(): HTMLElement[];
9119
9129
  get alignment(): OmakaseDropdownAlignment;
9130
+ /**
9131
+ * `icon` (the default for selectors that have an icon) shows the selector's icon in the toggle, `label` shows the
9132
+ * selected option's label. Ignored when content is given in the `toggle` slot.
9133
+ */
9134
+ get representation(): OmakaseDropdownSelectorRepresentation;
9135
+ set representation(representation: OmakaseDropdownSelectorRepresentation);
9136
+ /** Horizontal alignment of the options (and the list titles) inside the dropdown. */
9137
+ get optionAlignment(): OmakaseDropdownAlignment;
9138
+ set optionAlignment(optionAlignment: OmakaseDropdownAlignment);
9120
9139
  get caret(): boolean;
9121
9140
  set caret(caret: boolean);
9122
9141
  get toggleBackground(): boolean;
@@ -9138,6 +9157,12 @@ declare abstract class OmakaseDropdownSelector extends OmakaseDropdownSelector_b
9138
9157
  protected setDisabled(disabled: boolean): void;
9139
9158
  private updateDisabled;
9140
9159
  private render;
9160
+ /** What the toggle shows: the slotted content, else the default icon button, else nothing (the toggle then shows the label). */
9161
+ private getToggleContent;
9162
+ private getDefaultToggle;
9163
+ /** Switches the toggle between the default icon and the label when the representation changes after rendering. */
9164
+ private updateToggleContent;
9165
+ private updateOptionAlignment;
9141
9166
  /**
9142
9167
  * Anchors the bottom edge of a dropdown opening above to the toggle's top edge, and for `right` alignment its right
9143
9168
  * edge to the toggle's right edge (as a `right` offset, since the list can grow wider than its nominal width).
@@ -9531,20 +9556,27 @@ export declare const OmakaseDropdownSelectorAttributes: {
9531
9556
  CARET: string;
9532
9557
  TOGGLE_BACKGROUND: string;
9533
9558
  EXPAND_DIRECTION: string;
9559
+ REPRESENTATION: string;
9560
+ OPTION_ALIGNMENT: string;
9534
9561
  };
9535
9562
 
9536
9563
  export declare type OmakaseDropdownSelectorExpandDirection = 'left' | 'right';
9537
9564
 
9565
+ declare type OmakaseDropdownSelectorRepresentation = 'icon' | 'label';
9566
+
9538
9567
  export declare class OmakaseDropdownToggle extends HTMLElement {
9539
9568
  static get observedAttributes(): string[];
9540
9569
  private _dropdown?;
9541
9570
  private _span?;
9571
+ private _titleListener?;
9542
9572
  get span(): HTMLSpanElement | undefined;
9543
9573
  setLabel(label: string | undefined): void;
9544
9574
  private updateTitle;
9545
9575
  get isDisabled(): boolean;
9546
9576
  set isDisabled(isDisabled: boolean);
9547
9577
  constructor();
9578
+ showLabel(): void;
9579
+ showContent(content: HTMLElement[]): void;
9548
9580
  connectedCallback(): void;
9549
9581
  private _bindDropdown;
9550
9582
  }
@@ -12148,6 +12180,8 @@ export declare const OmakaseMenuAttributes: {
12148
12180
  CARET: string;
12149
12181
  TOGGLE_BACKGROUND: string;
12150
12182
  EXPAND_DIRECTION: string;
12183
+ REPRESENTATION: string;
12184
+ OPTION_ALIGNMENT: string;
12151
12185
  };
12152
12186
 
12153
12187
  export declare interface OmakaseMenuOption {
@@ -12969,6 +13003,7 @@ export declare const OmakasePlayAndRewindButtonAttributes: {
12969
13003
  export declare class OmakasePlaybackRateSelector extends OmakaseDropdownSelector {
12970
13004
  protected readonly dropdownIdPrefix = "omakase-playback-rate-dropdown";
12971
13005
  protected readonly dropdownClass: string;
13006
+ protected readonly defaultOptionAlignment = "center";
12972
13007
  private _rates;
12973
13008
  static get observedAttributes(): string[];
12974
13009
  attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
@@ -12999,6 +13034,8 @@ export declare const OmakasePlaybackRateSelectorAttributes: {
12999
13034
  CARET: string;
13000
13035
  TOGGLE_BACKGROUND: string;
13001
13036
  EXPAND_DIRECTION: string;
13037
+ REPRESENTATION: string;
13038
+ OPTION_ALIGNMENT: string;
13002
13039
  };
13003
13040
 
13004
13041
  export declare class OmakasePlayButton extends OmakasePlayButton_base {
@@ -15251,6 +15288,7 @@ export declare const OmakaseSplitMarkerButtonAttributes: {
15251
15288
  export declare class OmakaseTextSelector extends OmakaseDropdownSelector {
15252
15289
  protected readonly dropdownIdPrefix = "omakase-text-dropdown";
15253
15290
  protected readonly dropdownClass: string;
15291
+ protected readonly toggleIconClass: string;
15254
15292
  static get observedAttributes(): string[];
15255
15293
  attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
15256
15294
  get offOption(): boolean;
@@ -15279,6 +15317,8 @@ export declare const OmakaseTextSelectorAttributes: {
15279
15317
  CARET: string;
15280
15318
  TOGGLE_BACKGROUND: string;
15281
15319
  EXPAND_DIRECTION: string;
15320
+ REPRESENTATION: string;
15321
+ OPTION_ALIGNMENT: string;
15282
15322
  };
15283
15323
 
15284
15324
  export declare enum OmakaseThemeActionIcon {
@@ -17229,6 +17269,7 @@ declare interface OmakaseTrackCommonApi {
17229
17269
  export declare class OmakaseTrackSelector extends OmakaseDropdownSelector {
17230
17270
  protected readonly dropdownIdPrefix = "omakase-track-dropdown";
17231
17271
  protected readonly dropdownClass: string;
17272
+ protected readonly toggleIconClass: string;
17232
17273
  private _mainMediaType;
17233
17274
  static get observedAttributes(): string[];
17234
17275
  attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
@@ -17282,6 +17323,8 @@ export declare const OmakaseTrackSelectorAttributes: {
17282
17323
  CARET: string;
17283
17324
  TOGGLE_BACKGROUND: string;
17284
17325
  EXPAND_DIRECTION: string;
17326
+ REPRESENTATION: string;
17327
+ OPTION_ALIGNMENT: string;
17285
17328
  };
17286
17329
 
17287
17330
  export declare type OmakaseVolumeFlyoutDirection = 'left' | 'right' | 'up' | 'down';