@panelwave/player 1.1.0 → 1.2.0
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 +35 -15
- package/fesm2022/panelwave-player.mjs +48 -30
- package/fesm2022/panelwave-player.mjs.map +1 -1
- package/index.d.ts +32 -6
- package/package.json +4 -4
package/index.d.ts
CHANGED
|
@@ -2010,6 +2010,26 @@ interface PanelChangeEvent {
|
|
|
2010
2010
|
/** Transition used */
|
|
2011
2011
|
transition?: string;
|
|
2012
2012
|
}
|
|
2013
|
+
/**
|
|
2014
|
+
* Payload of `<pw-player-shell>`'s `(panelChange)` output.
|
|
2015
|
+
*
|
|
2016
|
+
* Panels are keyed by id in `chapter.panels`; the optional `Panel.id` of the
|
|
2017
|
+
* format is not required and is usually absent, so read the id from
|
|
2018
|
+
* `panelId`, not from `panel`.
|
|
2019
|
+
*/
|
|
2020
|
+
interface PlayerPanelChangeEvent {
|
|
2021
|
+
/** The panel that is now current (the manifest object, variants unresolved). */
|
|
2022
|
+
panel: Panel;
|
|
2023
|
+
/** The chapter the panel belongs to. */
|
|
2024
|
+
chapter: Chapter;
|
|
2025
|
+
/** Id of the current panel: its key in `chapter.panels`. */
|
|
2026
|
+
panelId: string;
|
|
2027
|
+
/**
|
|
2028
|
+
* Id of the panel that was current before this change (it may belong to
|
|
2029
|
+
* the previous chapter). Undefined for the first panel after a (re)load.
|
|
2030
|
+
*/
|
|
2031
|
+
previousPanelId?: string;
|
|
2032
|
+
}
|
|
2013
2033
|
/**
|
|
2014
2034
|
* Decision event payload
|
|
2015
2035
|
*/
|
|
@@ -5831,12 +5851,10 @@ declare class PlayerShellComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
5831
5851
|
*/
|
|
5832
5852
|
ready: EventEmitter<void>;
|
|
5833
5853
|
/**
|
|
5834
|
-
*
|
|
5854
|
+
* The current panel changed. Carries the panel's id (`panelId`, its key in
|
|
5855
|
+
* `chapter.panels`) and the id of the panel before it (`previousPanelId`).
|
|
5835
5856
|
*/
|
|
5836
|
-
panelChange: EventEmitter<
|
|
5837
|
-
panel: Panel;
|
|
5838
|
-
chapter: Chapter;
|
|
5839
|
-
}>;
|
|
5857
|
+
panelChange: EventEmitter<PlayerPanelChangeEvent>;
|
|
5840
5858
|
/**
|
|
5841
5859
|
* Chapter changed
|
|
5842
5860
|
*/
|
|
@@ -6091,6 +6109,8 @@ declare class PlayerShellComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
6091
6109
|
private analyticsSessionEnded;
|
|
6092
6110
|
private workCompleteTracked;
|
|
6093
6111
|
private lastTrackedPanelId?;
|
|
6112
|
+
/** Id of the panel of the last `panelChange` emission (its `previousPanelId` source). */
|
|
6113
|
+
private lastPanelChangeId?;
|
|
6094
6114
|
/** Bound pagehide handler so add/removeEventListener match. */
|
|
6095
6115
|
private readonly onPageHide;
|
|
6096
6116
|
private readonly playerState;
|
|
@@ -6183,6 +6203,12 @@ declare class PlayerShellComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
6183
6203
|
* one-time `work_complete` signal.
|
|
6184
6204
|
*/
|
|
6185
6205
|
private trackPanelView;
|
|
6206
|
+
/**
|
|
6207
|
+
* A panel's id: its key in `chapter.panels`. Panels don't reliably carry
|
|
6208
|
+
* their own id (`Panel.id` is optional in the format), so resolve it by
|
|
6209
|
+
* identity, as getCurrentPanelId() does.
|
|
6210
|
+
*/
|
|
6211
|
+
private panelIdOf;
|
|
6186
6212
|
/** An end panel (no outgoing edges) of the manifest's last chapter. */
|
|
6187
6213
|
private isEndOfWork;
|
|
6188
6214
|
/**
|
|
@@ -7345,4 +7371,4 @@ declare class PlayerComponent {
|
|
|
7345
7371
|
}
|
|
7346
7372
|
|
|
7347
7373
|
export { ANONYMOUS_READER, ActionModalComponent, AgeGateComponent, AudioEngineService, BranchChooserComponent, CANVAS_PANEL_BUDGET, CanvasCameraService, CanvasStageComponent, ComicBalloon, DEFAULT_BALLOON_CONFIG, DEFAULT_STALL_TIMEOUT_MS, DEFAULT_VIDEO_MUTED, DEFAULT_VIDEO_PLAY_MODE, DEFAULT_VIDEO_START_MODE, EntitlementError, EntitlementService, ExportService, FlowEngineService, HotspotActionService, HotspotsOverlayComponent, HttpEntitlementAdapter, ImageCacheService, ManifestService, MockEntitlementAdapter, NullEntitlementAdapter, PANEL_AUDIO_LEAVE_FADE_MS, PanelAudioService, PaywallOverlayComponent, PaywallService, PlayerComponent, PlayerEvent, PlayerService, PlayerShellComponent, PlayerStateService, PluginHostService, PluginSandboxComponent, PreloadService, PwIconComponent, RESERVED_NAMESPACES, SpeechBubblesComponent, TrackingService, TranslationService, UserGestureService, VISIBILITY_THRESHOLD, VariableStoreService, VideoControllerService, VideoLayerComponent, VideoSequencerService, VisibilityService, applyVariantOverrides, balloonConfigToRenderOptions, balloonConfigToTailOptions, busForRole, chapterOrderFromManifest, createBalloon, evaluatePanelAccess, evaluateWorkAccess, findWorkGateRule, fromManifestRule, isExtraLocked, mergeBalloonConfig, readingOrderFromManifest, resolveMuted, resolvePanelVariant, resolvePanels, resolvePlayMode, resolveStartMode, resolveVideoConfig, rulesFromManifest, satisfiesRule, selectVariant, toEntitlementStatus };
|
|
7348
|
-
export type { AccessDecision, AgeVerificationResult, AssetBase, AssetCatalogItem, AssetCatalogItemAudio, AssetCatalogItemImage, AssetCatalogItemJson, AssetCatalogItemPluginPayload, AssetCatalogItemSubtitle, AssetCatalogItemVector, AssetCatalogItemVideo, AssetCategory, AssetCommon, AssetRef, AssetReference, AssetVariant, Assets, AudioLayer, AudioRole, AudioTrack, AudioVariant, BalloonConfig, BalloonConfigOverride, BalloonOptions, BalloonRenderResult, BalloonType, Bookmark, BoundingBox, BranchChoice, BubbleStyle, BubbleTail, CameraMove, CameraMovePath, CameraState, CameraZoomProfile, CanvasBackground, CanvasCameraPolicy, CanvasDecoration, CanvasFitMode, CanvasFreeRoam, CanvasLayout, CanvasOverviewPolicy, CanvasPlacement, CanvasRevealMode, Chapter, Character$1 as Character, ContentWarning, Creator, DecisionEvent, DeepLinkTarget, DeviceVariables, Edge, EffectiveVideoConfig, EntitlementAdapter$1 as EntitlementAdapter, EntitlementContext, EntitlementErrorCode, EntitlementSnapshot, EntitlementSnapshotResponse, EntitlementStatus, EntitlementVariables, ErrorEvent$1 as ErrorEvent, EvaluatorEntitlementType, EvaluatorRule, EvaluatorScope, ExtraImage, ExtraItem, Extras, FormatView, Graph, HideBorderConfig, Hotspot, HotspotAction, HotspotCircle, HotspotGoToAction, HotspotOpenExtrasAction, HotspotOpenModalAction, HotspotPluginEventAction, HotspotPolygon, HotspotRect, HotspotSetVariablesAction, HotspotShape, HotspotUiEffect, HttpEntitlementAdapterConfig, ImageLayer, ImageVariant, JsonLogic, JsonLogicExpression, JsonValue, JsonVariant, Layer, LayerKind, LayerViewMode, LocaleCode, LocalizedString, LockReason, Meta, Mutation, MutationOperation, NavigationPath, NodeMetadata, NormalizedPoint, NormalizedRect, OutputFormat, OutputPreset, OverlayState, Page, PageLayout, Panel, PanelAudioRole, PanelAudioTrack, PanelChangeEvent, PanelPartial, PanelPlacement, PanelRef, PanelVariant, PanelWaveManifest, PanelwaveHeader, Paywall, PaywallAction, PaywallEvent, PaywallGate$1 as PaywallGate, PaywallProduct, PaywallRule, PlaybackState, PlayerError, PlayerErrorCode, PlayerEventData, PlayerOptions, PlayerPreferences, PlayerState, PlayerStatistics, PluginInstance$1 as PluginInstance, PluginLayer, PreferenceVariables, PreloadItem, PreloadPriority, PreloadSettings, PreloadStatus$1 as PreloadStatus, PreviewInfo, PurchaseInfo, ReadingProgress, ResolvedPanel, ResolvedPanelAudio, SequenceAudioTrack, SequencedVideo, SequencedVideoInfo, Settings, SpeechBubble, StagePlacement, SubtitleVariant, TailConfig, TailCurve, TailOptions, TextLayer, TextStyle, Tracking, TrackingConfig$1 as TrackingConfig, TrackingEvent, Transform, Transition, TraversalOptions, TraversalResult, UIDefaults, UISettings, UserInfo, UserVariables, VariableChangeEvent, VariableContext, VariableDefinition, VariableMutation, VariableScope, VariableStore, VariableType, VariableValidationResult, Variables, VariantContext, VectorVariant, VideoEvent, VideoLayer, VideoPlayMode, VideoPoster, VideoStartMode, VideoState, VideoStatus, VideoTrackingPayload, VideoTrigger, VideoVariant, ViewMode, ViewportState, VisibilityChange, WorldPoint, WorldRect };
|
|
7374
|
+
export type { AccessDecision, AgeVerificationResult, AssetBase, AssetCatalogItem, AssetCatalogItemAudio, AssetCatalogItemImage, AssetCatalogItemJson, AssetCatalogItemPluginPayload, AssetCatalogItemSubtitle, AssetCatalogItemVector, AssetCatalogItemVideo, AssetCategory, AssetCommon, AssetRef, AssetReference, AssetVariant, Assets, AudioLayer, AudioRole, AudioTrack, AudioVariant, BalloonConfig, BalloonConfigOverride, BalloonOptions, BalloonRenderResult, BalloonType, Bookmark, BoundingBox, BranchChoice, BubbleStyle, BubbleTail, CameraMove, CameraMovePath, CameraState, CameraZoomProfile, CanvasBackground, CanvasCameraPolicy, CanvasDecoration, CanvasFitMode, CanvasFreeRoam, CanvasLayout, CanvasOverviewPolicy, CanvasPlacement, CanvasRevealMode, Chapter, Character$1 as Character, ContentWarning, Creator, DecisionEvent, DeepLinkTarget, DeviceVariables, Edge, EffectiveVideoConfig, EntitlementAdapter$1 as EntitlementAdapter, EntitlementContext, EntitlementErrorCode, EntitlementSnapshot, EntitlementSnapshotResponse, EntitlementStatus, EntitlementVariables, ErrorEvent$1 as ErrorEvent, EvaluatorEntitlementType, EvaluatorRule, EvaluatorScope, ExtraImage, ExtraItem, Extras, FormatView, Graph, HideBorderConfig, Hotspot, HotspotAction, HotspotCircle, HotspotGoToAction, HotspotOpenExtrasAction, HotspotOpenModalAction, HotspotPluginEventAction, HotspotPolygon, HotspotRect, HotspotSetVariablesAction, HotspotShape, HotspotUiEffect, HttpEntitlementAdapterConfig, ImageLayer, ImageVariant, JsonLogic, JsonLogicExpression, JsonValue, JsonVariant, Layer, LayerKind, LayerViewMode, LocaleCode, LocalizedString, LockReason, Meta, Mutation, MutationOperation, NavigationPath, NodeMetadata, NormalizedPoint, NormalizedRect, OutputFormat, OutputPreset, OverlayState, Page, PageLayout, Panel, PanelAudioRole, PanelAudioTrack, PanelChangeEvent, PanelPartial, PanelPlacement, PanelRef, PanelVariant, PanelWaveManifest, PanelwaveHeader, Paywall, PaywallAction, PaywallEvent, PaywallGate$1 as PaywallGate, PaywallProduct, PaywallRule, PlaybackState, PlayerError, PlayerErrorCode, PlayerEventData, PlayerOptions, PlayerPanelChangeEvent, PlayerPreferences, PlayerState, PlayerStatistics, PluginInstance$1 as PluginInstance, PluginLayer, PreferenceVariables, PreloadItem, PreloadPriority, PreloadSettings, PreloadStatus$1 as PreloadStatus, PreviewInfo, PurchaseInfo, ReadingProgress, ResolvedPanel, ResolvedPanelAudio, SequenceAudioTrack, SequencedVideo, SequencedVideoInfo, Settings, SpeechBubble, StagePlacement, SubtitleVariant, TailConfig, TailCurve, TailOptions, TextLayer, TextStyle, Tracking, TrackingConfig$1 as TrackingConfig, TrackingEvent, Transform, Transition, TraversalOptions, TraversalResult, UIDefaults, UISettings, UserInfo, UserVariables, VariableChangeEvent, VariableContext, VariableDefinition, VariableMutation, VariableScope, VariableStore, VariableType, VariableValidationResult, Variables, VariantContext, VectorVariant, VideoEvent, VideoLayer, VideoPlayMode, VideoPoster, VideoStartMode, VideoState, VideoStatus, VideoTrackingPayload, VideoTrigger, VideoVariant, ViewMode, ViewportState, VisibilityChange, WorldPoint, WorldRect };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panelwave/player",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Open-source Angular library for PanelWave interactive graphic novels",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"url": "https://github.com/panelwave/player/issues"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"@angular/common": "^20.0.0",
|
|
23
|
-
"@angular/core": "^20.0.0",
|
|
24
|
-
"@ngx-translate/core": "^17.0.0",
|
|
22
|
+
"@angular/common": "^20.0.0 || ^21.0.0 || ^22.0.0",
|
|
23
|
+
"@angular/core": "^20.0.0 || ^21.0.0 || ^22.0.0",
|
|
24
|
+
"@ngx-translate/core": "^17.0.0 || ^18.0.0",
|
|
25
25
|
"rxjs": "^7.8.0"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|