@nice2dev/game-engine 1.3.12 → 1.3.14
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/CHANGELOG.md +8 -0
- package/package.json +2 -2
- package/dist/types/accessibility/index.d.ts +0 -1
- package/dist/types/ai/index.d.ts +0 -1
- package/dist/types/animation/index.d.ts +0 -1
- package/dist/types/audio/HRTFAudio.d.ts +0 -180
- package/dist/types/audio/index.d.ts +0 -2
- package/dist/types/community/Community.d.ts +0 -112
- package/dist/types/community/index.d.ts +0 -1
- package/dist/types/core/TypeSafety.d.ts +0 -190
- package/dist/types/core/index.d.ts +0 -7
- package/dist/types/devtools/AssetStore.d.ts +0 -133
- package/dist/types/devtools/index.d.ts +0 -3
- package/dist/types/dialogue/index.d.ts +0 -2
- package/dist/types/docs/APIPlayground.d.ts +0 -26
- package/dist/types/docs/Cookbook.d.ts +0 -18
- package/dist/types/docs/Guides.d.ts +0 -18
- package/dist/types/docs/index.d.ts +0 -4
- package/dist/types/ecs/ECSOptimized.d.ts +0 -131
- package/dist/types/ecs/index.d.ts +0 -2
- package/dist/types/editor/NiceAnimationTimeline.d.ts +0 -114
- package/dist/types/editor/NiceLevelEditor.d.ts +0 -232
- package/dist/types/editor/NiceMaterialEditor.d.ts +0 -105
- package/dist/types/editor/NiceNodeGraph.d.ts +0 -87
- package/dist/types/editor/NiceParticleEditor.d.ts +0 -127
- package/dist/types/editor/behavior-tree/BTDebugPanel.d.ts +0 -102
- package/dist/types/editor/behavior-tree/BTEditorCanvas.d.ts +0 -79
- package/dist/types/editor/behavior-tree/BTEditorNode.d.ts +0 -58
- package/dist/types/editor/behavior-tree/BTEditorToolbar.d.ts +0 -75
- package/dist/types/editor/behavior-tree/BTNodePalette.d.ts +0 -72
- package/dist/types/editor/behavior-tree/BTPropertyPanel.d.ts +0 -66
- package/dist/types/editor/behavior-tree/BehaviorTreeEditor.d.ts +0 -186
- package/dist/types/editor/behavior-tree/index.d.ts +0 -14
- package/dist/types/editor/behavior-tree/serialization.d.ts +0 -30
- package/dist/types/editor/behavior-tree/types.d.ts +0 -299
- package/dist/types/editor/index.d.ts +0 -20
- package/dist/types/editor/state-machine/SMEditorCanvas.d.ts +0 -61
- package/dist/types/editor/state-machine/StateMachineEditor.d.ts +0 -139
- package/dist/types/editor/state-machine/index.d.ts +0 -11
- package/dist/types/editor/state-machine/serialization.d.ts +0 -23
- package/dist/types/editor/state-machine/types.d.ts +0 -241
- package/dist/types/engine/index.d.ts +0 -2
- package/dist/types/enterprise/index.d.ts +0 -1
- package/dist/types/epic/index.d.ts +0 -10
- package/dist/types/i18n/index.d.ts +0 -2
- package/dist/types/input/index.d.ts +0 -3
- package/dist/types/kids/index.d.ts +0 -2
- package/dist/types/legendary/index.d.ts +0 -57
- package/dist/types/monetization/index.d.ts +0 -1
- package/dist/types/multiplayer/NiceNetcode.d.ts +0 -434
- package/dist/types/multiplayer/index.d.ts +0 -5
- package/dist/types/network/index.d.ts +0 -2
- package/dist/types/pathfinding/index.d.ts +0 -1
- package/dist/types/performance/AssetCompression.d.ts +0 -137
- package/dist/types/performance/WASMModules.d.ts +0 -65
- package/dist/types/performance/WebGPUCompute.d.ts +0 -71
- package/dist/types/performance/index.d.ts +0 -1
- package/dist/types/physics/RapierIntegration.d.ts +0 -404
- package/dist/types/physics/index.d.ts +0 -2
- package/dist/types/plugins/index.d.ts +0 -2
- package/dist/types/procedural/index.d.ts +0 -2
- package/dist/types/release/index.d.ts +0 -1
- package/dist/types/rendering/WebGPUv2.d.ts +0 -173
- package/dist/types/rendering/index.d.ts +0 -3
- package/dist/types/runtime3d/index.d.ts +0 -2
- package/dist/types/scene/index.d.ts +0 -2
- package/dist/types/scripting/WasmCompiler.d.ts +0 -182
- package/dist/types/scripting/index.d.ts +0 -19
- package/dist/types/social/index.d.ts +0 -1
- package/dist/types/systems/NiceAI.d.ts +0 -637
- package/dist/types/systems/NiceAbility.d.ts +0 -225
- package/dist/types/systems/NiceAccessibility.d.ts +0 -230
- package/dist/types/systems/NiceAchievement.d.ts +0 -153
- package/dist/types/systems/NiceAchievementUI.d.ts +0 -196
- package/dist/types/systems/NiceAchievements.d.ts +0 -230
- package/dist/types/systems/NiceAction.d.ts +0 -81
- package/dist/types/systems/NiceAlchemy.d.ts +0 -195
- package/dist/types/systems/NiceAnalytics.d.ts +0 -493
- package/dist/types/systems/NiceAnimation.d.ts +0 -350
- package/dist/types/systems/NiceArena.d.ts +0 -215
- package/dist/types/systems/NiceAssetLoader.d.ts +0 -136
- package/dist/types/systems/NiceAuction.d.ts +0 -157
- package/dist/types/systems/NiceAudio.d.ts +0 -224
- package/dist/types/systems/NiceAugment.d.ts +0 -187
- package/dist/types/systems/NiceAura.d.ts +0 -193
- package/dist/types/systems/NiceBank.d.ts +0 -158
- package/dist/types/systems/NiceBattlePass.d.ts +0 -150
- package/dist/types/systems/NiceBehavior.d.ts +0 -160
- package/dist/types/systems/NiceBinding.d.ts +0 -96
- package/dist/types/systems/NiceBlacksmith.d.ts +0 -221
- package/dist/types/systems/NiceBuff.d.ts +0 -177
- package/dist/types/systems/NiceBuilding.d.ts +0 -207
- package/dist/types/systems/NiceBullet.d.ts +0 -167
- package/dist/types/systems/NiceCamera.d.ts +0 -252
- package/dist/types/systems/NiceCard.d.ts +0 -171
- package/dist/types/systems/NiceChat.d.ts +0 -148
- package/dist/types/systems/NiceCheat.d.ts +0 -375
- package/dist/types/systems/NiceClimbing.d.ts +0 -186
- package/dist/types/systems/NiceCloud.d.ts +0 -422
- package/dist/types/systems/NiceCollision.d.ts +0 -238
- package/dist/types/systems/NiceCombo.d.ts +0 -131
- package/dist/types/systems/NiceCommand.d.ts +0 -112
- package/dist/types/systems/NiceCompanion.d.ts +0 -182
- package/dist/types/systems/NiceController.d.ts +0 -144
- package/dist/types/systems/NiceCooking.d.ts +0 -193
- package/dist/types/systems/NiceCoroutine.d.ts +0 -101
- package/dist/types/systems/NiceCrafting.d.ts +0 -228
- package/dist/types/systems/NiceCutscene.d.ts +0 -437
- package/dist/types/systems/NiceDaily.d.ts +0 -133
- package/dist/types/systems/NiceDamage.d.ts +0 -271
- package/dist/types/systems/NiceDayNight.d.ts +0 -126
- package/dist/types/systems/NiceDebug.d.ts +0 -255
- package/dist/types/systems/NiceDestructible.d.ts +0 -150
- package/dist/types/systems/NiceDialogue.d.ts +0 -629
- package/dist/types/systems/NiceDungeon.d.ts +0 -202
- package/dist/types/systems/NiceECS.d.ts +0 -151
- package/dist/types/systems/NiceEnchant.d.ts +0 -148
- package/dist/types/systems/NiceEntityPool.d.ts +0 -127
- package/dist/types/systems/NiceEquipment.d.ts +0 -137
- package/dist/types/systems/NiceEvent.d.ts +0 -202
- package/dist/types/systems/NiceEventBus.d.ts +0 -164
- package/dist/types/systems/NiceFaction.d.ts +0 -173
- package/dist/types/systems/NiceFarming.d.ts +0 -163
- package/dist/types/systems/NiceFishing.d.ts +0 -196
- package/dist/types/systems/NiceFlocking.d.ts +0 -156
- package/dist/types/systems/NiceFog.d.ts +0 -137
- package/dist/types/systems/NiceFormation.d.ts +0 -140
- package/dist/types/systems/NiceGacha.d.ts +0 -134
- package/dist/types/systems/NiceGambling.d.ts +0 -175
- package/dist/types/systems/NiceGem.d.ts +0 -165
- package/dist/types/systems/NiceGesture.d.ts +0 -502
- package/dist/types/systems/NiceGrappling.d.ts +0 -154
- package/dist/types/systems/NiceGrid.d.ts +0 -142
- package/dist/types/systems/NiceGuild.d.ts +0 -162
- package/dist/types/systems/NiceHaptics.d.ts +0 -112
- package/dist/types/systems/NiceHousing.d.ts +0 -197
- package/dist/types/systems/NiceInput.d.ts +0 -280
- package/dist/types/systems/NiceInventory.d.ts +0 -534
- package/dist/types/systems/NiceLOD.d.ts +0 -144
- package/dist/types/systems/NiceLeaderboard.d.ts +0 -191
- package/dist/types/systems/NiceLevel.d.ts +0 -304
- package/dist/types/systems/NiceLighting.d.ts +0 -214
- package/dist/types/systems/NiceLocalization.d.ts +0 -148
- package/dist/types/systems/NiceLocomotion.d.ts +0 -398
- package/dist/types/systems/NiceLogger.d.ts +0 -117
- package/dist/types/systems/NiceLoot.d.ts +0 -176
- package/dist/types/systems/NiceMail.d.ts +0 -164
- package/dist/types/systems/NiceMap.d.ts +0 -234
- package/dist/types/systems/NiceMarriage.d.ts +0 -150
- package/dist/types/systems/NiceMastery.d.ts +0 -171
- package/dist/types/systems/NiceMatch.d.ts +0 -196
- package/dist/types/systems/NiceMatch3.d.ts +0 -118
- package/dist/types/systems/NiceMessageBus.d.ts +0 -115
- package/dist/types/systems/NiceMinimap.d.ts +0 -258
- package/dist/types/systems/NiceMining.d.ts +0 -175
- package/dist/types/systems/NiceModding.d.ts +0 -452
- package/dist/types/systems/NiceMount.d.ts +0 -152
- package/dist/types/systems/NiceNavigation.d.ts +0 -307
- package/dist/types/systems/NiceNetwork.d.ts +0 -568
- package/dist/types/systems/NiceNotification.d.ts +0 -438
- package/dist/types/systems/NiceObjective.d.ts +0 -395
- package/dist/types/systems/NiceParticle.d.ts +0 -639
- package/dist/types/systems/NiceParty.d.ts +0 -168
- package/dist/types/systems/NicePerformance.d.ts +0 -144
- package/dist/types/systems/NicePet.d.ts +0 -167
- package/dist/types/systems/NicePhotoMode.d.ts +0 -270
- package/dist/types/systems/NicePhysics.d.ts +0 -326
- package/dist/types/systems/NicePlatformer.d.ts +0 -158
- package/dist/types/systems/NicePool.d.ts +0 -128
- package/dist/types/systems/NicePortal.d.ts +0 -178
- package/dist/types/systems/NicePostProcess.d.ts +0 -254
- package/dist/types/systems/NiceProcedural.d.ts +0 -202
- package/dist/types/systems/NiceProfile.d.ts +0 -223
- package/dist/types/systems/NiceProjectile.d.ts +0 -157
- package/dist/types/systems/NicePvP.d.ts +0 -199
- package/dist/types/systems/NiceQTE.d.ts +0 -160
- package/dist/types/systems/NiceQuest.d.ts +0 -620
- package/dist/types/systems/NiceRaid.d.ts +0 -215
- package/dist/types/systems/NiceRanking.d.ts +0 -399
- package/dist/types/systems/NiceReplay.d.ts +0 -180
- package/dist/types/systems/NiceReputation.d.ts +0 -151
- package/dist/types/systems/NiceResource.d.ts +0 -200
- package/dist/types/systems/NiceRhythm.d.ts +0 -148
- package/dist/types/systems/NiceRoguelike.d.ts +0 -276
- package/dist/types/systems/NiceRune.d.ts +0 -202
- package/dist/types/systems/NiceSaveSystem.d.ts +0 -194
- package/dist/types/systems/NiceSceneManager.d.ts +0 -112
- package/dist/types/systems/NiceScore.d.ts +0 -186
- package/dist/types/systems/NiceScreenFX.d.ts +0 -235
- package/dist/types/systems/NiceScreenshot.d.ts +0 -443
- package/dist/types/systems/NiceScribe.d.ts +0 -239
- package/dist/types/systems/NiceSeason.d.ts +0 -176
- package/dist/types/systems/NiceSerialization.d.ts +0 -89
- package/dist/types/systems/NiceServiceLocator.d.ts +0 -94
- package/dist/types/systems/NiceShop.d.ts +0 -528
- package/dist/types/systems/NiceSignal.d.ts +0 -112
- package/dist/types/systems/NiceSkillTree.d.ts +0 -237
- package/dist/types/systems/NiceSocial.d.ts +0 -580
- package/dist/types/systems/NiceSpawner.d.ts +0 -237
- package/dist/types/systems/NiceSpell.d.ts +0 -216
- package/dist/types/systems/NiceState.d.ts +0 -224
- package/dist/types/systems/NiceStateMachine.d.ts +0 -108
- package/dist/types/systems/NiceStatus.d.ts +0 -116
- package/dist/types/systems/NiceStealth.d.ts +0 -204
- package/dist/types/systems/NiceSteam.d.ts +0 -255
- package/dist/types/systems/NiceStreaming.d.ts +0 -173
- package/dist/types/systems/NiceSwimming.d.ts +0 -166
- package/dist/types/systems/NiceTalent.d.ts +0 -154
- package/dist/types/systems/NiceTarget.d.ts +0 -121
- package/dist/types/systems/NiceTerrain.d.ts +0 -143
- package/dist/types/systems/NiceTilemap.d.ts +0 -218
- package/dist/types/systems/NiceTimer.d.ts +0 -153
- package/dist/types/systems/NiceTournament.d.ts +0 -190
- package/dist/types/systems/NiceTrading.d.ts +0 -238
- package/dist/types/systems/NiceTransmog.d.ts +0 -142
- package/dist/types/systems/NiceTutorial.d.ts +0 -248
- package/dist/types/systems/NiceTween.d.ts +0 -164
- package/dist/types/systems/NiceUI.d.ts +0 -364
- package/dist/types/systems/NiceVFX.d.ts +0 -333
- package/dist/types/systems/NiceVehicle.d.ts +0 -176
- package/dist/types/systems/NiceVoice.d.ts +0 -502
- package/dist/types/systems/NiceWater.d.ts +0 -162
- package/dist/types/systems/NiceWave.d.ts +0 -174
- package/dist/types/systems/NiceWaypoint.d.ts +0 -165
- package/dist/types/systems/NiceWeather.d.ts +0 -225
- package/dist/types/systems/NiceXR.d.ts +0 -187
- package/dist/types/systems/index.d.ts +0 -182
- package/dist/types/templates/index.d.ts +0 -2
- package/dist/types/tilemap/index.d.ts +0 -1
- package/dist/types/tutorials/TutorialEditor.d.ts +0 -43
- package/dist/types/tutorials/VoiceNarration.d.ts +0 -75
- package/dist/types/tutorials/content/Tutorials_T04.d.ts +0 -3
- package/dist/types/tutorials/content/UITutorials.d.ts +0 -14
- package/dist/types/tutorials/content/index.d.ts +0 -5
- package/dist/types/tutorials/index.d.ts +0 -6
- package/dist/types/ui/index.d.ts +0 -2
- package/dist/types/visual-scripting/VisualScriptDebugger.d.ts +0 -145
- package/dist/types/visual-scripting/VisualScriptExecutor.d.ts +0 -100
- package/dist/types/visual-scripting/VisualScriptGraph.d.ts +0 -173
- package/dist/types/visual-scripting/VisualScriptNode.d.ts +0 -157
- package/dist/types/visual-scripting/index.d.ts +0 -6
- package/dist/types/visual-scripting/nodes/ActionNodes.d.ts +0 -152
- package/dist/types/visual-scripting/nodes/EventNodes.d.ts +0 -95
- package/dist/types/visual-scripting/nodes/FlowControlNodes.d.ts +0 -134
- package/dist/types/visual-scripting/nodes/LogicNodes.d.ts +0 -122
- package/dist/types/visual-scripting/nodes/MathNodes.d.ts +0 -170
- package/dist/types/visual-scripting/nodes/UtilityNodes.d.ts +0 -131
- package/dist/types/visual-scripting/nodes/VariableNodes.d.ts +0 -107
- package/dist/types/visual-scripting/nodes/index.d.ts +0 -21
- package/dist/types/visual-scripting/nodes/registerNodes.d.ts +0 -29
- package/dist/types/visual-scripting/types.d.ts +0 -402
- package/dist/types/xr/WebXRLayers.d.ts +0 -319
- package/dist/types/xr/index.d.ts +0 -2
|
@@ -1,438 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NiceNotification - Notification & Alert System
|
|
3
|
-
*
|
|
4
|
-
* Comprehensive notification system for managing in-game notifications,
|
|
5
|
-
* alerts, toasts, banners, and system messages.
|
|
6
|
-
*
|
|
7
|
-
* Features:
|
|
8
|
-
* - Multiple notification types (toast, banner, popup, system)
|
|
9
|
-
* - Priority queue system
|
|
10
|
-
* - Notification categories
|
|
11
|
-
* - Auto-dismiss & manual dismiss
|
|
12
|
-
* - Notification stacking
|
|
13
|
-
* - Action buttons
|
|
14
|
-
* - Sound integration
|
|
15
|
-
* - Animation support
|
|
16
|
-
* - Notification history
|
|
17
|
-
* - Do Not Disturb mode
|
|
18
|
-
* - Notification grouping
|
|
19
|
-
* - Rich content support
|
|
20
|
-
*
|
|
21
|
-
* @packageDocumentation
|
|
22
|
-
*/
|
|
23
|
-
import { EventEmitter } from 'events';
|
|
24
|
-
/** Unique notification ID */
|
|
25
|
-
export type NotificationId = string;
|
|
26
|
-
/** Unique channel ID */
|
|
27
|
-
export type ChannelId = string;
|
|
28
|
-
/** Unique group ID */
|
|
29
|
-
export type GroupId = string;
|
|
30
|
-
/** Notification type */
|
|
31
|
-
export type NotificationType = 'toast' | 'banner' | 'popup' | 'system' | 'alert' | 'snackbar';
|
|
32
|
-
/** Notification priority */
|
|
33
|
-
export type NotificationPriority = 'low' | 'normal' | 'high' | 'urgent' | 'critical';
|
|
34
|
-
/** Notification status */
|
|
35
|
-
export type NotificationStatus = 'pending' | 'showing' | 'dismissed' | 'expired' | 'action_taken';
|
|
36
|
-
/** Notification position */
|
|
37
|
-
export type NotificationPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'center';
|
|
38
|
-
/** Animation type */
|
|
39
|
-
export type AnimationType = 'fade' | 'slide' | 'scale' | 'bounce' | 'none';
|
|
40
|
-
/** Notification category */
|
|
41
|
-
export type NotificationCategory = 'info' | 'success' | 'warning' | 'error' | 'achievement' | 'reward' | 'social' | 'system' | 'quest' | 'combat' | 'trade' | 'custom';
|
|
42
|
-
/** Notification action button */
|
|
43
|
-
export interface NotificationAction {
|
|
44
|
-
id: string;
|
|
45
|
-
label: string;
|
|
46
|
-
icon?: string;
|
|
47
|
-
style?: 'primary' | 'secondary' | 'danger' | 'success';
|
|
48
|
-
callback?: () => void;
|
|
49
|
-
closeOnClick?: boolean;
|
|
50
|
-
}
|
|
51
|
-
/** Rich content for notification */
|
|
52
|
-
export interface NotificationContent {
|
|
53
|
-
title: string;
|
|
54
|
-
message: string;
|
|
55
|
-
subtitle?: string;
|
|
56
|
-
icon?: string;
|
|
57
|
-
image?: string;
|
|
58
|
-
badge?: string;
|
|
59
|
-
progress?: number;
|
|
60
|
-
customData?: Record<string, unknown>;
|
|
61
|
-
}
|
|
62
|
-
/** Notification style */
|
|
63
|
-
export interface NotificationStyle {
|
|
64
|
-
backgroundColor?: string;
|
|
65
|
-
textColor?: string;
|
|
66
|
-
borderColor?: string;
|
|
67
|
-
iconColor?: string;
|
|
68
|
-
width?: number;
|
|
69
|
-
maxWidth?: number;
|
|
70
|
-
opacity?: number;
|
|
71
|
-
blur?: boolean;
|
|
72
|
-
shadow?: boolean;
|
|
73
|
-
rounded?: boolean;
|
|
74
|
-
}
|
|
75
|
-
/** Notification sound */
|
|
76
|
-
export interface NotificationSound {
|
|
77
|
-
soundId?: string;
|
|
78
|
-
volume?: number;
|
|
79
|
-
playOnShow?: boolean;
|
|
80
|
-
playOnDismiss?: boolean;
|
|
81
|
-
}
|
|
82
|
-
/** Notification definition */
|
|
83
|
-
export interface NotificationDefinition {
|
|
84
|
-
id?: NotificationId;
|
|
85
|
-
type: NotificationType;
|
|
86
|
-
category: NotificationCategory;
|
|
87
|
-
priority: NotificationPriority;
|
|
88
|
-
content: NotificationContent;
|
|
89
|
-
position?: NotificationPosition;
|
|
90
|
-
duration?: number;
|
|
91
|
-
autoDismiss?: boolean;
|
|
92
|
-
dismissible?: boolean;
|
|
93
|
-
persistent?: boolean;
|
|
94
|
-
groupId?: GroupId;
|
|
95
|
-
channelId?: ChannelId;
|
|
96
|
-
actions?: NotificationAction[];
|
|
97
|
-
style?: NotificationStyle;
|
|
98
|
-
sound?: NotificationSound;
|
|
99
|
-
animation?: {
|
|
100
|
-
enter?: AnimationType;
|
|
101
|
-
exit?: AnimationType;
|
|
102
|
-
duration?: number;
|
|
103
|
-
};
|
|
104
|
-
metadata?: Record<string, unknown>;
|
|
105
|
-
expiresAt?: number;
|
|
106
|
-
scheduledAt?: number;
|
|
107
|
-
}
|
|
108
|
-
/** Active notification instance */
|
|
109
|
-
export interface NotificationInstance extends NotificationDefinition {
|
|
110
|
-
id: NotificationId;
|
|
111
|
-
status: NotificationStatus;
|
|
112
|
-
createdAt: number;
|
|
113
|
-
shownAt?: number;
|
|
114
|
-
dismissedAt?: number;
|
|
115
|
-
actionTakenId?: string;
|
|
116
|
-
timeRemaining?: number;
|
|
117
|
-
}
|
|
118
|
-
/** Notification channel */
|
|
119
|
-
export interface NotificationChannel {
|
|
120
|
-
id: ChannelId;
|
|
121
|
-
name: string;
|
|
122
|
-
description?: string;
|
|
123
|
-
enabled: boolean;
|
|
124
|
-
soundEnabled: boolean;
|
|
125
|
-
vibrationEnabled: boolean;
|
|
126
|
-
defaultPriority: NotificationPriority;
|
|
127
|
-
defaultDuration?: number;
|
|
128
|
-
maxConcurrent: number;
|
|
129
|
-
groupSimilar: boolean;
|
|
130
|
-
}
|
|
131
|
-
/** Notification group */
|
|
132
|
-
export interface NotificationGroup {
|
|
133
|
-
id: GroupId;
|
|
134
|
-
title: string;
|
|
135
|
-
notifications: NotificationId[];
|
|
136
|
-
collapsed: boolean;
|
|
137
|
-
createdAt: number;
|
|
138
|
-
updatedAt: number;
|
|
139
|
-
summary?: string;
|
|
140
|
-
}
|
|
141
|
-
/** Notification statistics */
|
|
142
|
-
export interface NotificationStatistics {
|
|
143
|
-
totalShown: number;
|
|
144
|
-
totalDismissed: number;
|
|
145
|
-
totalClicked: number;
|
|
146
|
-
totalExpired: number;
|
|
147
|
-
averageViewTime: number;
|
|
148
|
-
byCategory: Record<NotificationCategory, number>;
|
|
149
|
-
byPriority: Record<NotificationPriority, number>;
|
|
150
|
-
}
|
|
151
|
-
/** Do Not Disturb settings */
|
|
152
|
-
export interface DNDSettings {
|
|
153
|
-
enabled: boolean;
|
|
154
|
-
allowUrgent: boolean;
|
|
155
|
-
allowCritical: boolean;
|
|
156
|
-
scheduledStart?: number;
|
|
157
|
-
scheduledEnd?: number;
|
|
158
|
-
exceptChannels?: ChannelId[];
|
|
159
|
-
}
|
|
160
|
-
/** Filter options */
|
|
161
|
-
export interface NotificationFilter {
|
|
162
|
-
types?: NotificationType[];
|
|
163
|
-
categories?: NotificationCategory[];
|
|
164
|
-
priorities?: NotificationPriority[];
|
|
165
|
-
statuses?: NotificationStatus[];
|
|
166
|
-
channelIds?: ChannelId[];
|
|
167
|
-
fromDate?: number;
|
|
168
|
-
toDate?: number;
|
|
169
|
-
}
|
|
170
|
-
/** Notification event types */
|
|
171
|
-
export type NotificationEventType = 'notification_created' | 'notification_shown' | 'notification_dismissed' | 'notification_expired' | 'notification_clicked' | 'notification_action' | 'notification_updated' | 'group_created' | 'group_updated' | 'group_collapsed' | 'channel_changed' | 'dnd_changed' | 'queue_updated';
|
|
172
|
-
/** Notification event data */
|
|
173
|
-
export interface NotificationEvent {
|
|
174
|
-
type: NotificationEventType;
|
|
175
|
-
timestamp: number;
|
|
176
|
-
notificationId?: NotificationId;
|
|
177
|
-
groupId?: GroupId;
|
|
178
|
-
channelId?: ChannelId;
|
|
179
|
-
actionId?: string;
|
|
180
|
-
notification?: NotificationInstance;
|
|
181
|
-
}
|
|
182
|
-
/** Notification event callback */
|
|
183
|
-
export type NotificationEventCallback = (event: NotificationEvent) => void;
|
|
184
|
-
/** Notification system configuration */
|
|
185
|
-
export interface NotificationConfig {
|
|
186
|
-
maxConcurrent: number;
|
|
187
|
-
maxQueueSize: number;
|
|
188
|
-
maxHistorySize: number;
|
|
189
|
-
defaultDuration: number;
|
|
190
|
-
defaultPosition: NotificationPosition;
|
|
191
|
-
defaultAnimationDuration: number;
|
|
192
|
-
enableSounds: boolean;
|
|
193
|
-
enableVibration: boolean;
|
|
194
|
-
enableHistory: boolean;
|
|
195
|
-
enableGrouping: boolean;
|
|
196
|
-
groupingThreshold: number;
|
|
197
|
-
stackingEnabled: boolean;
|
|
198
|
-
stackingOffset: number;
|
|
199
|
-
queueProcessInterval: number;
|
|
200
|
-
defaultChannel: ChannelId;
|
|
201
|
-
}
|
|
202
|
-
/** Default configuration */
|
|
203
|
-
export declare const DEFAULT_NOTIFICATION_CONFIG: NotificationConfig;
|
|
204
|
-
/** Priority settings */
|
|
205
|
-
export declare const PRIORITY_SETTINGS: Record<NotificationPriority, {
|
|
206
|
-
autoDismiss: boolean;
|
|
207
|
-
duration: number;
|
|
208
|
-
sound: boolean;
|
|
209
|
-
vibration: boolean;
|
|
210
|
-
bypassDND: boolean;
|
|
211
|
-
}>;
|
|
212
|
-
/**
|
|
213
|
-
* Notification and alert system
|
|
214
|
-
*/
|
|
215
|
-
export declare class NiceNotification extends EventEmitter {
|
|
216
|
-
private config;
|
|
217
|
-
private notifications;
|
|
218
|
-
private queue;
|
|
219
|
-
private active;
|
|
220
|
-
private history;
|
|
221
|
-
private channels;
|
|
222
|
-
private groups;
|
|
223
|
-
private dndSettings;
|
|
224
|
-
private statistics;
|
|
225
|
-
private processInterval?;
|
|
226
|
-
private dismissTimers;
|
|
227
|
-
private idCounter;
|
|
228
|
-
constructor(config?: Partial<NotificationConfig>);
|
|
229
|
-
/**
|
|
230
|
-
* Initialize default notification channel
|
|
231
|
-
*/
|
|
232
|
-
private initializeDefaultChannel;
|
|
233
|
-
/**
|
|
234
|
-
* Start queue processor
|
|
235
|
-
*/
|
|
236
|
-
private startQueueProcessor;
|
|
237
|
-
/**
|
|
238
|
-
* Generate unique notification ID
|
|
239
|
-
*/
|
|
240
|
-
private generateId;
|
|
241
|
-
/**
|
|
242
|
-
* Emit notification event
|
|
243
|
-
*/
|
|
244
|
-
private emitEvent;
|
|
245
|
-
/**
|
|
246
|
-
* Check if notification should bypass DND
|
|
247
|
-
*/
|
|
248
|
-
private shouldBypassDND;
|
|
249
|
-
/**
|
|
250
|
-
* Check if channel is enabled
|
|
251
|
-
*/
|
|
252
|
-
private isChannelEnabled;
|
|
253
|
-
/**
|
|
254
|
-
* Show notification
|
|
255
|
-
*/
|
|
256
|
-
show(definition: NotificationDefinition): NotificationId;
|
|
257
|
-
/**
|
|
258
|
-
* Queue notification for display
|
|
259
|
-
*/
|
|
260
|
-
private queueNotification;
|
|
261
|
-
/**
|
|
262
|
-
* Insert notification into priority queue
|
|
263
|
-
*/
|
|
264
|
-
private insertIntoQueue;
|
|
265
|
-
/**
|
|
266
|
-
* Process notification queue
|
|
267
|
-
*/
|
|
268
|
-
private processQueue;
|
|
269
|
-
/**
|
|
270
|
-
* Show notification (make it active)
|
|
271
|
-
*/
|
|
272
|
-
private showNotification;
|
|
273
|
-
/**
|
|
274
|
-
* Play notification sound
|
|
275
|
-
*/
|
|
276
|
-
private playSound;
|
|
277
|
-
/**
|
|
278
|
-
* Check for expired notifications
|
|
279
|
-
*/
|
|
280
|
-
private checkExpiredNotifications;
|
|
281
|
-
/**
|
|
282
|
-
* Dismiss notification
|
|
283
|
-
*/
|
|
284
|
-
dismiss(id: NotificationId, _reason?: 'manual' | 'auto' | 'action'): boolean;
|
|
285
|
-
/**
|
|
286
|
-
* Dismiss all notifications
|
|
287
|
-
*/
|
|
288
|
-
dismissAll(filter?: NotificationFilter): number;
|
|
289
|
-
/**
|
|
290
|
-
* Handle notification click
|
|
291
|
-
*/
|
|
292
|
-
click(id: NotificationId): void;
|
|
293
|
-
/**
|
|
294
|
-
* Handle action button click
|
|
295
|
-
*/
|
|
296
|
-
handleAction(notificationId: NotificationId, actionId: string): void;
|
|
297
|
-
/**
|
|
298
|
-
* Update notification
|
|
299
|
-
*/
|
|
300
|
-
update(id: NotificationId, updates: Partial<NotificationContent>): boolean;
|
|
301
|
-
/**
|
|
302
|
-
* Update notification progress
|
|
303
|
-
*/
|
|
304
|
-
updateProgress(id: NotificationId, progress: number): boolean;
|
|
305
|
-
/**
|
|
306
|
-
* Get notification by ID
|
|
307
|
-
*/
|
|
308
|
-
get(id: NotificationId): NotificationInstance | undefined;
|
|
309
|
-
/**
|
|
310
|
-
* Get active notifications
|
|
311
|
-
*/
|
|
312
|
-
getActive(): NotificationInstance[];
|
|
313
|
-
/**
|
|
314
|
-
* Get queued notifications
|
|
315
|
-
*/
|
|
316
|
-
getQueued(): NotificationInstance[];
|
|
317
|
-
/**
|
|
318
|
-
* Get notifications by filter
|
|
319
|
-
*/
|
|
320
|
-
getFiltered(filter: NotificationFilter): NotificationInstance[];
|
|
321
|
-
/**
|
|
322
|
-
* Add notification to group
|
|
323
|
-
*/
|
|
324
|
-
private addToGroup;
|
|
325
|
-
/**
|
|
326
|
-
* Collapse notification group
|
|
327
|
-
*/
|
|
328
|
-
collapseGroup(groupId: GroupId): boolean;
|
|
329
|
-
/**
|
|
330
|
-
* Expand notification group
|
|
331
|
-
*/
|
|
332
|
-
expandGroup(groupId: GroupId): boolean;
|
|
333
|
-
/**
|
|
334
|
-
* Get group
|
|
335
|
-
*/
|
|
336
|
-
getGroup(groupId: GroupId): NotificationGroup | undefined;
|
|
337
|
-
/**
|
|
338
|
-
* Get group notifications
|
|
339
|
-
*/
|
|
340
|
-
getGroupNotifications(groupId: GroupId): NotificationInstance[];
|
|
341
|
-
/**
|
|
342
|
-
* Dismiss group
|
|
343
|
-
*/
|
|
344
|
-
dismissGroup(groupId: GroupId): number;
|
|
345
|
-
/**
|
|
346
|
-
* Register notification channel
|
|
347
|
-
*/
|
|
348
|
-
registerChannel(channel: NotificationChannel): void;
|
|
349
|
-
/**
|
|
350
|
-
* Get channel
|
|
351
|
-
*/
|
|
352
|
-
getChannel(channelId: ChannelId): NotificationChannel | undefined;
|
|
353
|
-
/**
|
|
354
|
-
* Get all channels
|
|
355
|
-
*/
|
|
356
|
-
getAllChannels(): NotificationChannel[];
|
|
357
|
-
/**
|
|
358
|
-
* Enable/disable channel
|
|
359
|
-
*/
|
|
360
|
-
setChannelEnabled(channelId: ChannelId, enabled: boolean): boolean;
|
|
361
|
-
/**
|
|
362
|
-
* Update channel settings
|
|
363
|
-
*/
|
|
364
|
-
updateChannel(channelId: ChannelId, updates: Partial<NotificationChannel>): boolean;
|
|
365
|
-
/**
|
|
366
|
-
* Enable Do Not Disturb
|
|
367
|
-
*/
|
|
368
|
-
enableDND(settings?: Partial<DNDSettings>): void;
|
|
369
|
-
/**
|
|
370
|
-
* Disable Do Not Disturb
|
|
371
|
-
*/
|
|
372
|
-
disableDND(): void;
|
|
373
|
-
/**
|
|
374
|
-
* Get DND settings
|
|
375
|
-
*/
|
|
376
|
-
getDNDSettings(): DNDSettings;
|
|
377
|
-
/**
|
|
378
|
-
* Check if DND is active
|
|
379
|
-
*/
|
|
380
|
-
isDNDActive(): boolean;
|
|
381
|
-
/**
|
|
382
|
-
* Add notification to history
|
|
383
|
-
*/
|
|
384
|
-
private addToHistory;
|
|
385
|
-
/**
|
|
386
|
-
* Get notification history
|
|
387
|
-
*/
|
|
388
|
-
getHistory(limit?: number): NotificationInstance[];
|
|
389
|
-
/**
|
|
390
|
-
* Clear history
|
|
391
|
-
*/
|
|
392
|
-
clearHistory(): void;
|
|
393
|
-
/**
|
|
394
|
-
* Update average view time
|
|
395
|
-
*/
|
|
396
|
-
private updateAverageViewTime;
|
|
397
|
-
/**
|
|
398
|
-
* Show info notification
|
|
399
|
-
*/
|
|
400
|
-
info(title: string, message: string, options?: Partial<NotificationDefinition>): NotificationId;
|
|
401
|
-
/**
|
|
402
|
-
* Show success notification
|
|
403
|
-
*/
|
|
404
|
-
success(title: string, message: string, options?: Partial<NotificationDefinition>): NotificationId;
|
|
405
|
-
/**
|
|
406
|
-
* Show warning notification
|
|
407
|
-
*/
|
|
408
|
-
warning(title: string, message: string, options?: Partial<NotificationDefinition>): NotificationId;
|
|
409
|
-
/**
|
|
410
|
-
* Show error notification
|
|
411
|
-
*/
|
|
412
|
-
error(title: string, message: string, options?: Partial<NotificationDefinition>): NotificationId;
|
|
413
|
-
/**
|
|
414
|
-
* Show confirm dialog
|
|
415
|
-
*/
|
|
416
|
-
confirm(title: string, message: string, onConfirm: () => void, onCancel?: () => void, options?: Partial<NotificationDefinition>): NotificationId;
|
|
417
|
-
/**
|
|
418
|
-
* Get notification statistics
|
|
419
|
-
*/
|
|
420
|
-
getStatistics(): NotificationStatistics;
|
|
421
|
-
/**
|
|
422
|
-
* Reset statistics
|
|
423
|
-
*/
|
|
424
|
-
resetStatistics(): void;
|
|
425
|
-
/**
|
|
426
|
-
* Clear all notifications
|
|
427
|
-
*/
|
|
428
|
-
clearAll(): void;
|
|
429
|
-
/**
|
|
430
|
-
* Destroy notification system
|
|
431
|
-
*/
|
|
432
|
-
destroy(): void;
|
|
433
|
-
}
|
|
434
|
-
/**
|
|
435
|
-
* Create notification system instance
|
|
436
|
-
*/
|
|
437
|
-
export declare function createNotificationSystem(config?: Partial<NotificationConfig>): NiceNotification;
|
|
438
|
-
export default NiceNotification;
|