@nice2dev/game-engine 1.3.13 → 1.3.15
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,238 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from 'events';
|
|
2
|
-
export type EntityId = string;
|
|
3
|
-
export type ItemId = string;
|
|
4
|
-
export type MerchantId = string;
|
|
5
|
-
export type ShopId = string;
|
|
6
|
-
export type AuctionId = string;
|
|
7
|
-
export type CurrencyId = string;
|
|
8
|
-
export type TradeRouteId = string;
|
|
9
|
-
export interface Currency {
|
|
10
|
-
id: CurrencyId;
|
|
11
|
-
name: string;
|
|
12
|
-
symbol: string;
|
|
13
|
-
exchangeRate: number;
|
|
14
|
-
divisor?: number;
|
|
15
|
-
maxStack?: number;
|
|
16
|
-
}
|
|
17
|
-
export interface Wallet {
|
|
18
|
-
entityId: EntityId;
|
|
19
|
-
balances: Map<CurrencyId, number>;
|
|
20
|
-
}
|
|
21
|
-
export interface TradeItem {
|
|
22
|
-
id: ItemId;
|
|
23
|
-
name: string;
|
|
24
|
-
baseValue: number;
|
|
25
|
-
weight: number;
|
|
26
|
-
stackable: boolean;
|
|
27
|
-
maxStack: number;
|
|
28
|
-
categories: string[];
|
|
29
|
-
quality?: number;
|
|
30
|
-
rarity?: 'common' | 'uncommon' | 'rare' | 'epic' | 'legendary';
|
|
31
|
-
}
|
|
32
|
-
export interface ItemListing {
|
|
33
|
-
itemId: ItemId;
|
|
34
|
-
quantity: number;
|
|
35
|
-
quality?: number;
|
|
36
|
-
price: number;
|
|
37
|
-
currencyId: CurrencyId;
|
|
38
|
-
stock: number;
|
|
39
|
-
maxStock: number;
|
|
40
|
-
restockRate: number;
|
|
41
|
-
lastRestock: number;
|
|
42
|
-
}
|
|
43
|
-
export type MerchantDisposition = 'friendly' | 'neutral' | 'hostile' | 'blackmarket';
|
|
44
|
-
export interface Merchant {
|
|
45
|
-
id: MerchantId;
|
|
46
|
-
name: string;
|
|
47
|
-
shopId: ShopId;
|
|
48
|
-
disposition: MerchantDisposition;
|
|
49
|
-
buyModifier: number;
|
|
50
|
-
sellModifier: number;
|
|
51
|
-
haggleThreshold: number;
|
|
52
|
-
wealth: number;
|
|
53
|
-
specialties: string[];
|
|
54
|
-
factionId?: string;
|
|
55
|
-
}
|
|
56
|
-
export interface Shop {
|
|
57
|
-
id: ShopId;
|
|
58
|
-
name: string;
|
|
59
|
-
merchantId: MerchantId;
|
|
60
|
-
inventory: Map<ItemId, ItemListing>;
|
|
61
|
-
baseCurrency: CurrencyId;
|
|
62
|
-
acceptedCurrencies: Set<CurrencyId>;
|
|
63
|
-
reputation: Map<EntityId, number>;
|
|
64
|
-
isOpen: boolean;
|
|
65
|
-
openHours?: {
|
|
66
|
-
start: number;
|
|
67
|
-
end: number;
|
|
68
|
-
};
|
|
69
|
-
restockInterval: number;
|
|
70
|
-
lastRestock: number;
|
|
71
|
-
}
|
|
72
|
-
export type TradeStatus = 'pending' | 'accepted' | 'rejected' | 'cancelled' | 'completed';
|
|
73
|
-
export interface TradeOffer {
|
|
74
|
-
id: string;
|
|
75
|
-
initiatorId: EntityId;
|
|
76
|
-
targetId: EntityId;
|
|
77
|
-
initiatorItems: {
|
|
78
|
-
itemId: ItemId;
|
|
79
|
-
quantity: number;
|
|
80
|
-
quality?: number;
|
|
81
|
-
}[];
|
|
82
|
-
targetItems: {
|
|
83
|
-
itemId: ItemId;
|
|
84
|
-
quantity: number;
|
|
85
|
-
quality?: number;
|
|
86
|
-
}[];
|
|
87
|
-
initiatorMoney: Map<CurrencyId, number>;
|
|
88
|
-
targetMoney: Map<CurrencyId, number>;
|
|
89
|
-
status: TradeStatus;
|
|
90
|
-
initiatorConfirmed: boolean;
|
|
91
|
-
targetConfirmed: boolean;
|
|
92
|
-
createdAt: number;
|
|
93
|
-
expiresAt?: number;
|
|
94
|
-
}
|
|
95
|
-
export type AuctionStatus = 'pending' | 'active' | 'ended' | 'cancelled';
|
|
96
|
-
export interface AuctionBid {
|
|
97
|
-
bidderId: EntityId;
|
|
98
|
-
amount: number;
|
|
99
|
-
timestamp: number;
|
|
100
|
-
}
|
|
101
|
-
export interface Auction {
|
|
102
|
-
id: AuctionId;
|
|
103
|
-
sellerId: EntityId;
|
|
104
|
-
itemId: ItemId;
|
|
105
|
-
quantity: number;
|
|
106
|
-
quality?: number;
|
|
107
|
-
startingPrice: number;
|
|
108
|
-
buyoutPrice?: number;
|
|
109
|
-
currencyId: CurrencyId;
|
|
110
|
-
currentBid?: AuctionBid;
|
|
111
|
-
bidHistory: AuctionBid[];
|
|
112
|
-
status: AuctionStatus;
|
|
113
|
-
startTime: number;
|
|
114
|
-
endTime: number;
|
|
115
|
-
minBidIncrement: number;
|
|
116
|
-
}
|
|
117
|
-
export interface MarketData {
|
|
118
|
-
itemId: ItemId;
|
|
119
|
-
avgPrice: number;
|
|
120
|
-
minPrice: number;
|
|
121
|
-
maxPrice: number;
|
|
122
|
-
supply: number;
|
|
123
|
-
demand: number;
|
|
124
|
-
priceHistory: {
|
|
125
|
-
timestamp: number;
|
|
126
|
-
price: number;
|
|
127
|
-
}[];
|
|
128
|
-
volumeHistory: {
|
|
129
|
-
timestamp: number;
|
|
130
|
-
volume: number;
|
|
131
|
-
}[];
|
|
132
|
-
}
|
|
133
|
-
export interface TradeRoute {
|
|
134
|
-
id: TradeRouteId;
|
|
135
|
-
name: string;
|
|
136
|
-
startLocation: string;
|
|
137
|
-
endLocation: string;
|
|
138
|
-
distance: number;
|
|
139
|
-
risk: number;
|
|
140
|
-
profitMargin: number;
|
|
141
|
-
exportItems: ItemId[];
|
|
142
|
-
importItems: ItemId[];
|
|
143
|
-
travelTime: number;
|
|
144
|
-
isActive: boolean;
|
|
145
|
-
}
|
|
146
|
-
export type TradingEventType = 'item-purchased' | 'item-sold' | 'trade-initiated' | 'trade-completed' | 'trade-cancelled' | 'auction-created' | 'auction-bid' | 'auction-ended' | 'price-changed' | 'shop-restocked' | 'route-completed' | 'reputation-changed';
|
|
147
|
-
export interface TradingEvent {
|
|
148
|
-
type: TradingEventType;
|
|
149
|
-
entityId?: EntityId;
|
|
150
|
-
shopId?: ShopId;
|
|
151
|
-
auctionId?: AuctionId;
|
|
152
|
-
data?: Record<string, unknown>;
|
|
153
|
-
}
|
|
154
|
-
export interface TradingSystemConfig {
|
|
155
|
-
baseCurrencyId?: CurrencyId;
|
|
156
|
-
maxTradeOfferAge?: number;
|
|
157
|
-
auctionMinDuration?: number;
|
|
158
|
-
auctionMaxDuration?: number;
|
|
159
|
-
priceFluctuation?: number;
|
|
160
|
-
demandImpact?: number;
|
|
161
|
-
supplyImpact?: number;
|
|
162
|
-
haggleSuccessBase?: number;
|
|
163
|
-
reputationDecayRate?: number;
|
|
164
|
-
}
|
|
165
|
-
export declare const DEFAULT_TRADING_CONFIG: TradingSystemConfig;
|
|
166
|
-
export declare class NiceTrading extends EventEmitter {
|
|
167
|
-
private currencies;
|
|
168
|
-
private items;
|
|
169
|
-
private merchants;
|
|
170
|
-
private shops;
|
|
171
|
-
private wallets;
|
|
172
|
-
private tradeOffers;
|
|
173
|
-
private auctions;
|
|
174
|
-
private marketData;
|
|
175
|
-
private tradeRoutes;
|
|
176
|
-
private nextTradeId;
|
|
177
|
-
private nextAuctionId;
|
|
178
|
-
private config;
|
|
179
|
-
constructor(config?: Partial<TradingSystemConfig>);
|
|
180
|
-
defineCurrency(currency: Currency): void;
|
|
181
|
-
getCurrency(id: CurrencyId): Currency | undefined;
|
|
182
|
-
createWallet(entityId: EntityId): void;
|
|
183
|
-
getBalance(entityId: EntityId, currencyId?: CurrencyId): number;
|
|
184
|
-
addMoney(entityId: EntityId, amount: number, currencyId?: CurrencyId): void;
|
|
185
|
-
removeMoney(entityId: EntityId, amount: number, currencyId?: CurrencyId): boolean;
|
|
186
|
-
exchangeCurrency(entityId: EntityId, fromCurrency: CurrencyId, toCurrency: CurrencyId, amount: number): boolean;
|
|
187
|
-
defineItem(item: TradeItem): void;
|
|
188
|
-
getItem(id: ItemId): TradeItem | undefined;
|
|
189
|
-
registerMerchant(merchant: Merchant): void;
|
|
190
|
-
createShop(shop: Shop): void;
|
|
191
|
-
getShop(id: ShopId): Shop | undefined;
|
|
192
|
-
addListing(shopId: ShopId, listing: ItemListing): void;
|
|
193
|
-
buyFromShop(buyerId: EntityId, shopId: ShopId, itemId: ItemId, quantity: number): {
|
|
194
|
-
success: boolean;
|
|
195
|
-
totalCost?: number;
|
|
196
|
-
reason?: string;
|
|
197
|
-
};
|
|
198
|
-
sellToShop(sellerId: EntityId, shopId: ShopId, itemId: ItemId, quantity: number): {
|
|
199
|
-
success: boolean;
|
|
200
|
-
totalValue?: number;
|
|
201
|
-
reason?: string;
|
|
202
|
-
};
|
|
203
|
-
calculateBuyPrice(listing: ItemListing, merchant: Merchant, shop: Shop, buyerId: EntityId): number;
|
|
204
|
-
calculateSellPrice(item: TradeItem, merchant: Merchant, shop: Shop, sellerId: EntityId): number;
|
|
205
|
-
private modifyReputation;
|
|
206
|
-
createTradeOffer(initiatorId: EntityId, targetId: EntityId): string;
|
|
207
|
-
addItemToTrade(tradeId: string, entityId: EntityId, itemId: ItemId, quantity: number): boolean;
|
|
208
|
-
addMoneyToTrade(tradeId: string, entityId: EntityId, amount: number, currencyId?: CurrencyId): boolean;
|
|
209
|
-
confirmTrade(tradeId: string, entityId: EntityId): boolean;
|
|
210
|
-
private executeTrade;
|
|
211
|
-
cancelTrade(tradeId: string, entityId: EntityId): boolean;
|
|
212
|
-
createAuction(sellerId: EntityId, itemId: ItemId, quantity: number, options: {
|
|
213
|
-
startingPrice: number;
|
|
214
|
-
buyoutPrice?: number;
|
|
215
|
-
duration: number;
|
|
216
|
-
quality?: number;
|
|
217
|
-
currencyId?: CurrencyId;
|
|
218
|
-
}): AuctionId;
|
|
219
|
-
placeBid(auctionId: AuctionId, bidderId: EntityId, amount: number): boolean;
|
|
220
|
-
private concludeAuction;
|
|
221
|
-
private recordTransaction;
|
|
222
|
-
getMarketData(itemId: ItemId): MarketData | undefined;
|
|
223
|
-
registerTradeRoute(route: TradeRoute): void;
|
|
224
|
-
getTradeRoute(id: TradeRouteId): TradeRoute | undefined;
|
|
225
|
-
getProfitableRoutes(): TradeRoute[];
|
|
226
|
-
update(_deltaTime: number): void;
|
|
227
|
-
private restockShop;
|
|
228
|
-
getActiveAuctions(itemId?: ItemId): Auction[];
|
|
229
|
-
searchShops(itemId: ItemId): {
|
|
230
|
-
shop: Shop;
|
|
231
|
-
listing: ItemListing;
|
|
232
|
-
}[];
|
|
233
|
-
}
|
|
234
|
-
export declare function createTradingSystem(config?: Partial<TradingSystemConfig>): NiceTrading;
|
|
235
|
-
export declare function defineCurrency(options: Currency): Currency;
|
|
236
|
-
export declare function defineTradeItem(options: TradeItem): TradeItem;
|
|
237
|
-
export declare function createMerchant(options: Merchant): Merchant;
|
|
238
|
-
export default NiceTrading;
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
export type AppearanceId = string;
|
|
2
|
-
export type OutfitId = string;
|
|
3
|
-
export type DyeId = string;
|
|
4
|
-
export type SlotType = 'head' | 'shoulders' | 'chest' | 'back' | 'hands' | 'waist' | 'legs' | 'feet' | 'main_hand' | 'off_hand' | 'ranged' | 'tabard';
|
|
5
|
-
export interface AppearanceDefinition {
|
|
6
|
-
id: AppearanceId;
|
|
7
|
-
name: string;
|
|
8
|
-
description?: string;
|
|
9
|
-
slot: SlotType;
|
|
10
|
-
sourceItemIds: string[];
|
|
11
|
-
modelId: string;
|
|
12
|
-
textures?: string[];
|
|
13
|
-
defaultDye?: DyeId;
|
|
14
|
-
supportsDye: boolean;
|
|
15
|
-
dyeChannels?: number;
|
|
16
|
-
classRestrictions?: string[];
|
|
17
|
-
raceRestrictions?: string[];
|
|
18
|
-
factionRequired?: string;
|
|
19
|
-
rarity: 'common' | 'uncommon' | 'rare' | 'epic' | 'legendary';
|
|
20
|
-
tags?: string[];
|
|
21
|
-
setId?: string;
|
|
22
|
-
hidden?: boolean;
|
|
23
|
-
}
|
|
24
|
-
export interface DyeDefinition {
|
|
25
|
-
id: DyeId;
|
|
26
|
-
name: string;
|
|
27
|
-
primaryColor: string;
|
|
28
|
-
secondaryColor?: string;
|
|
29
|
-
metallic?: boolean;
|
|
30
|
-
unlockMethod: 'default' | 'item' | 'quest' | 'achievement' | 'vendor' | 'event';
|
|
31
|
-
sourceId?: string;
|
|
32
|
-
cost?: number;
|
|
33
|
-
rarity: 'common' | 'uncommon' | 'rare' | 'epic' | 'legendary';
|
|
34
|
-
}
|
|
35
|
-
export interface AppliedTransmog {
|
|
36
|
-
slot: SlotType;
|
|
37
|
-
appearanceId: AppearanceId;
|
|
38
|
-
dyeId?: DyeId;
|
|
39
|
-
hidden: boolean;
|
|
40
|
-
appliedAt: number;
|
|
41
|
-
}
|
|
42
|
-
export interface OutfitPreset {
|
|
43
|
-
id: OutfitId;
|
|
44
|
-
name: string;
|
|
45
|
-
icon?: string;
|
|
46
|
-
slots: Map<SlotType, {
|
|
47
|
-
appearanceId: AppearanceId;
|
|
48
|
-
dyeId?: DyeId;
|
|
49
|
-
hidden: boolean;
|
|
50
|
-
}>;
|
|
51
|
-
createdAt: number;
|
|
52
|
-
lastUsed?: number;
|
|
53
|
-
}
|
|
54
|
-
export interface PlayerTransmogData {
|
|
55
|
-
playerId: string;
|
|
56
|
-
unlockedAppearances: Set<AppearanceId>;
|
|
57
|
-
unlockedDyes: Set<DyeId>;
|
|
58
|
-
currentTransmogs: Map<SlotType, AppliedTransmog>;
|
|
59
|
-
outfits: Map<OutfitId, OutfitPreset>;
|
|
60
|
-
activeOutfitId?: OutfitId;
|
|
61
|
-
totalCollected: number;
|
|
62
|
-
totalApplied: number;
|
|
63
|
-
unlockHistory: Array<{
|
|
64
|
-
type: 'appearance' | 'dye';
|
|
65
|
-
id: string;
|
|
66
|
-
timestamp: number;
|
|
67
|
-
source?: string;
|
|
68
|
-
}>;
|
|
69
|
-
}
|
|
70
|
-
export type TransmogEventType = 'appearance-unlocked' | 'dye-unlocked' | 'transmog-applied' | 'transmog-removed' | 'outfit-created' | 'outfit-applied' | 'outfit-deleted' | 'slot-hidden' | 'slot-shown';
|
|
71
|
-
export interface TransmogEvent {
|
|
72
|
-
type: TransmogEventType;
|
|
73
|
-
timestamp: number;
|
|
74
|
-
data?: unknown;
|
|
75
|
-
}
|
|
76
|
-
export type TransmogEventCallback = (event: TransmogEvent) => void;
|
|
77
|
-
export interface TransmogConfig {
|
|
78
|
-
maxOutfits: number;
|
|
79
|
-
transmogCost: number;
|
|
80
|
-
dyeCost: number;
|
|
81
|
-
freeRemoval: boolean;
|
|
82
|
-
autoUnlockOnEquip: boolean;
|
|
83
|
-
storageKey: string;
|
|
84
|
-
}
|
|
85
|
-
export declare const DEFAULT_TRANSMOG_CONFIG: TransmogConfig;
|
|
86
|
-
export declare class NiceTransmog {
|
|
87
|
-
private config;
|
|
88
|
-
private appearances;
|
|
89
|
-
private dyes;
|
|
90
|
-
private playerData;
|
|
91
|
-
private eventListeners;
|
|
92
|
-
private onDeductCost?;
|
|
93
|
-
constructor(config?: Partial<TransmogConfig>);
|
|
94
|
-
on(event: TransmogEventType, callback: TransmogEventCallback): () => void;
|
|
95
|
-
private emit;
|
|
96
|
-
setCostHandler(handler: typeof this.onDeductCost): void;
|
|
97
|
-
registerAppearance(appearance: AppearanceDefinition): void;
|
|
98
|
-
registerDye(dye: DyeDefinition): void;
|
|
99
|
-
unlockAppearance(playerId: string, appearanceId: AppearanceId, source?: string): boolean;
|
|
100
|
-
unlockAppearanceFromItem(playerId: string, itemId: string): AppearanceDefinition | null;
|
|
101
|
-
unlockDye(playerId: string, dyeId: DyeId, source?: string): boolean;
|
|
102
|
-
applyTransmog(playerId: string, slot: SlotType, appearanceId: AppearanceId, dyeId?: DyeId): boolean;
|
|
103
|
-
removeTransmog(playerId: string, slot: SlotType): boolean;
|
|
104
|
-
applyDye(playerId: string, slot: SlotType, dyeId: DyeId): boolean;
|
|
105
|
-
hideSlot(playerId: string, slot: SlotType): boolean;
|
|
106
|
-
showSlot(playerId: string, slot: SlotType): boolean;
|
|
107
|
-
createOutfit(playerId: string, name: string): OutfitPreset | null;
|
|
108
|
-
applyOutfit(playerId: string, outfitId: OutfitId): boolean;
|
|
109
|
-
updateOutfit(playerId: string, outfitId: OutfitId): boolean;
|
|
110
|
-
renameOutfit(playerId: string, outfitId: OutfitId, name: string): boolean;
|
|
111
|
-
deleteOutfit(playerId: string, outfitId: OutfitId): boolean;
|
|
112
|
-
getAppearance(id: AppearanceId): AppearanceDefinition | undefined;
|
|
113
|
-
getAllAppearances(): AppearanceDefinition[];
|
|
114
|
-
getAppearancesBySlot(slot: SlotType): AppearanceDefinition[];
|
|
115
|
-
getAppearancesBySet(setId: string): AppearanceDefinition[];
|
|
116
|
-
getDye(id: DyeId): DyeDefinition | undefined;
|
|
117
|
-
getAllDyes(): DyeDefinition[];
|
|
118
|
-
getPlayerData(playerId: string): PlayerTransmogData | undefined;
|
|
119
|
-
getUnlockedAppearances(playerId: string): AppearanceDefinition[];
|
|
120
|
-
getUnlockedAppearancesForSlot(playerId: string, slot: SlotType): AppearanceDefinition[];
|
|
121
|
-
getUnlockedDyes(playerId: string): DyeDefinition[];
|
|
122
|
-
getCurrentTransmog(playerId: string, slot: SlotType): AppliedTransmog | undefined;
|
|
123
|
-
getAllCurrentTransmogs(playerId: string): AppliedTransmog[];
|
|
124
|
-
getOutfits(playerId: string): OutfitPreset[];
|
|
125
|
-
getCollectionProgress(playerId: string): {
|
|
126
|
-
total: number;
|
|
127
|
-
unlocked: number;
|
|
128
|
-
percent: number;
|
|
129
|
-
bySlot: Record<SlotType, {
|
|
130
|
-
total: number;
|
|
131
|
-
unlocked: number;
|
|
132
|
-
}>;
|
|
133
|
-
};
|
|
134
|
-
isAppearanceUnlocked(playerId: string, appearanceId: AppearanceId): boolean;
|
|
135
|
-
isDyeUnlocked(playerId: string, dyeId: DyeId): boolean;
|
|
136
|
-
private getOrCreatePlayerData;
|
|
137
|
-
private save;
|
|
138
|
-
private load;
|
|
139
|
-
reset(): void;
|
|
140
|
-
destroy(): void;
|
|
141
|
-
}
|
|
142
|
-
export declare function createTransmogSystem(config?: Partial<TransmogConfig>): NiceTransmog;
|
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
export type TutorialId = string;
|
|
2
|
-
export type StepId = string;
|
|
3
|
-
export type HintId = string;
|
|
4
|
-
export type TooltipId = string;
|
|
5
|
-
export type StepType = 'message' | 'highlight' | 'action' | 'input' | 'choice' | 'wait' | 'checkpoint';
|
|
6
|
-
export type HighlightShape = 'rectangle' | 'circle' | 'custom';
|
|
7
|
-
export interface StepPosition {
|
|
8
|
-
x: number;
|
|
9
|
-
y: number;
|
|
10
|
-
}
|
|
11
|
-
export interface StepHighlight {
|
|
12
|
-
targetId?: string;
|
|
13
|
-
targetSelector?: string;
|
|
14
|
-
position?: StepPosition;
|
|
15
|
-
size?: {
|
|
16
|
-
width: number;
|
|
17
|
-
height: number;
|
|
18
|
-
};
|
|
19
|
-
shape: HighlightShape;
|
|
20
|
-
padding?: number;
|
|
21
|
-
pulseAnimation?: boolean;
|
|
22
|
-
}
|
|
23
|
-
export interface TutorialStep {
|
|
24
|
-
id: StepId;
|
|
25
|
-
type: StepType;
|
|
26
|
-
/** Title displayed */
|
|
27
|
-
title?: string;
|
|
28
|
-
/** Message content (supports markdown) */
|
|
29
|
-
message?: string;
|
|
30
|
-
/** Image URL */
|
|
31
|
-
image?: string;
|
|
32
|
-
/** Video URL */
|
|
33
|
-
video?: string;
|
|
34
|
-
/** Highlight configuration */
|
|
35
|
-
highlight?: StepHighlight;
|
|
36
|
-
/** Arrow pointing to target */
|
|
37
|
-
arrow?: boolean;
|
|
38
|
-
/** Position of the tutorial dialog */
|
|
39
|
-
dialogPosition?: 'top' | 'bottom' | 'left' | 'right' | 'center' | 'auto';
|
|
40
|
-
/** Required action to proceed */
|
|
41
|
-
requiredAction?: {
|
|
42
|
-
type: string;
|
|
43
|
-
target?: string;
|
|
44
|
-
value?: unknown;
|
|
45
|
-
};
|
|
46
|
-
/** Wait duration for 'wait' type (ms) */
|
|
47
|
-
waitDuration?: number;
|
|
48
|
-
/** Choices for 'choice' type */
|
|
49
|
-
choices?: Array<{
|
|
50
|
-
id: string;
|
|
51
|
-
label: string;
|
|
52
|
-
nextStepId?: StepId;
|
|
53
|
-
}>;
|
|
54
|
-
/** Allow skipping this step */
|
|
55
|
-
skippable: boolean;
|
|
56
|
-
/** Auto-proceed after delay */
|
|
57
|
-
autoProceed?: number;
|
|
58
|
-
/** On enter callback */
|
|
59
|
-
onEnter?: () => void | Promise<void>;
|
|
60
|
-
/** On exit callback */
|
|
61
|
-
onExit?: () => void | Promise<void>;
|
|
62
|
-
/** Condition to show step */
|
|
63
|
-
condition?: () => boolean;
|
|
64
|
-
/** Tags for filtering */
|
|
65
|
-
tags?: string[];
|
|
66
|
-
}
|
|
67
|
-
export interface TutorialDefinition {
|
|
68
|
-
id: TutorialId;
|
|
69
|
-
name: string;
|
|
70
|
-
description?: string;
|
|
71
|
-
/** Tutorial version (for migration) */
|
|
72
|
-
version: number;
|
|
73
|
-
/** Steps in order */
|
|
74
|
-
steps: TutorialStep[];
|
|
75
|
-
/** Required prerequisite tutorials */
|
|
76
|
-
prerequisites: TutorialId[];
|
|
77
|
-
/** Priority (higher = shown first) */
|
|
78
|
-
priority: number;
|
|
79
|
-
/** Auto-start when conditions met */
|
|
80
|
-
autoStart: boolean;
|
|
81
|
-
/** Condition to trigger */
|
|
82
|
-
triggerCondition?: () => boolean;
|
|
83
|
-
/** Allow replay */
|
|
84
|
-
replayable: boolean;
|
|
85
|
-
/** Category for grouping */
|
|
86
|
-
category?: string;
|
|
87
|
-
/** Estimated completion time (minutes) */
|
|
88
|
-
estimatedTime?: number;
|
|
89
|
-
/** Rewards on completion */
|
|
90
|
-
rewards?: Array<{
|
|
91
|
-
type: string;
|
|
92
|
-
value: unknown;
|
|
93
|
-
}>;
|
|
94
|
-
/** On complete callback */
|
|
95
|
-
onComplete?: () => void | Promise<void>;
|
|
96
|
-
/** On skip callback */
|
|
97
|
-
onSkip?: () => void | Promise<void>;
|
|
98
|
-
}
|
|
99
|
-
export interface TooltipDefinition {
|
|
100
|
-
id: TooltipId;
|
|
101
|
-
targetId?: string;
|
|
102
|
-
targetSelector?: string;
|
|
103
|
-
message: string;
|
|
104
|
-
title?: string;
|
|
105
|
-
position?: 'top' | 'bottom' | 'left' | 'right' | 'auto';
|
|
106
|
-
showOnHover?: boolean;
|
|
107
|
-
showOnce?: boolean;
|
|
108
|
-
delay?: number;
|
|
109
|
-
duration?: number;
|
|
110
|
-
dismissible?: boolean;
|
|
111
|
-
}
|
|
112
|
-
export interface HintDefinition {
|
|
113
|
-
id: HintId;
|
|
114
|
-
message: string;
|
|
115
|
-
icon?: string;
|
|
116
|
-
priority: number;
|
|
117
|
-
condition?: () => boolean;
|
|
118
|
-
showOnce?: boolean;
|
|
119
|
-
category?: string;
|
|
120
|
-
}
|
|
121
|
-
export interface TutorialProgress {
|
|
122
|
-
tutorialId: TutorialId;
|
|
123
|
-
currentStepIndex: number;
|
|
124
|
-
completedSteps: StepId[];
|
|
125
|
-
startedAt: number;
|
|
126
|
-
completedAt?: number;
|
|
127
|
-
skipped: boolean;
|
|
128
|
-
choicesMade: Record<StepId, string>;
|
|
129
|
-
}
|
|
130
|
-
export interface TutorialState {
|
|
131
|
-
activeTutorial?: TutorialId;
|
|
132
|
-
activeStep?: StepId;
|
|
133
|
-
activeTooltips: TooltipId[];
|
|
134
|
-
queuedTutorials: TutorialId[];
|
|
135
|
-
completedTutorials: TutorialId[];
|
|
136
|
-
skippedTutorials: TutorialId[];
|
|
137
|
-
progress: Map<TutorialId, TutorialProgress>;
|
|
138
|
-
shownHints: Set<HintId>;
|
|
139
|
-
shownTooltips: Set<TooltipId>;
|
|
140
|
-
isLocked: boolean;
|
|
141
|
-
}
|
|
142
|
-
export type TutorialEventType = 'tutorial-started' | 'tutorial-completed' | 'tutorial-skipped' | 'tutorial-paused' | 'tutorial-resumed' | 'step-enter' | 'step-exit' | 'step-action' | 'choice-made' | 'tooltip-shown' | 'tooltip-hidden' | 'hint-shown' | 'hint-dismissed' | 'progress-saved';
|
|
143
|
-
export interface TutorialEvent {
|
|
144
|
-
type: TutorialEventType;
|
|
145
|
-
timestamp: number;
|
|
146
|
-
tutorialId?: TutorialId;
|
|
147
|
-
stepId?: StepId;
|
|
148
|
-
data?: unknown;
|
|
149
|
-
}
|
|
150
|
-
export type TutorialEventCallback = (event: TutorialEvent) => void;
|
|
151
|
-
export interface TutorialConfig {
|
|
152
|
-
/** Storage key for progress */
|
|
153
|
-
storageKey: string;
|
|
154
|
-
/** Show skip button */
|
|
155
|
-
showSkipButton: boolean;
|
|
156
|
-
/** Show progress indicator */
|
|
157
|
-
showProgress: boolean;
|
|
158
|
-
/** Dim background during tutorials */
|
|
159
|
-
dimBackground: boolean;
|
|
160
|
-
/** Dim opacity */
|
|
161
|
-
dimOpacity: number;
|
|
162
|
-
/** Block input outside highlight */
|
|
163
|
-
blockInput: boolean;
|
|
164
|
-
/** Default dialog position */
|
|
165
|
-
defaultDialogPosition: 'top' | 'bottom' | 'left' | 'right' | 'center';
|
|
166
|
-
/** Auto-save progress */
|
|
167
|
-
autoSave: boolean;
|
|
168
|
-
/** Pause on blur */
|
|
169
|
-
pauseOnBlur: boolean;
|
|
170
|
-
/** Enable keyboard navigation */
|
|
171
|
-
keyboardNavigation: boolean;
|
|
172
|
-
}
|
|
173
|
-
export declare const DEFAULT_TUTORIAL_CONFIG: TutorialConfig;
|
|
174
|
-
export interface TutorialRenderData {
|
|
175
|
-
isActive: boolean;
|
|
176
|
-
tutorial?: TutorialDefinition;
|
|
177
|
-
step?: TutorialStep;
|
|
178
|
-
stepIndex: number;
|
|
179
|
-
totalSteps: number;
|
|
180
|
-
progress: number;
|
|
181
|
-
highlight?: StepHighlight;
|
|
182
|
-
dialogPosition: {
|
|
183
|
-
x: number;
|
|
184
|
-
y: number;
|
|
185
|
-
} | string;
|
|
186
|
-
activeTooltips: Array<TooltipDefinition & {
|
|
187
|
-
visible: boolean;
|
|
188
|
-
}>;
|
|
189
|
-
canProceed: boolean;
|
|
190
|
-
canSkip: boolean;
|
|
191
|
-
canGoBack: boolean;
|
|
192
|
-
}
|
|
193
|
-
export declare class NiceTutorial {
|
|
194
|
-
private config;
|
|
195
|
-
private tutorials;
|
|
196
|
-
private tooltips;
|
|
197
|
-
private hints;
|
|
198
|
-
private state;
|
|
199
|
-
private isPaused;
|
|
200
|
-
private actionCallbacks;
|
|
201
|
-
private eventListeners;
|
|
202
|
-
constructor(config?: Partial<TutorialConfig>);
|
|
203
|
-
on(event: TutorialEventType, callback: TutorialEventCallback): () => void;
|
|
204
|
-
private emit;
|
|
205
|
-
registerTutorial(tutorial: TutorialDefinition): void;
|
|
206
|
-
unregisterTutorial(tutorialId: TutorialId): void;
|
|
207
|
-
registerTooltip(tooltip: TooltipDefinition): void;
|
|
208
|
-
registerHint(hint: HintDefinition): void;
|
|
209
|
-
registerActionHandler(actionType: string, handler: (data: unknown) => boolean): void;
|
|
210
|
-
handleAction(actionType: string, data?: unknown): void;
|
|
211
|
-
startTutorial(tutorialId: TutorialId, force?: boolean): boolean;
|
|
212
|
-
private enterStep;
|
|
213
|
-
nextStep(): void;
|
|
214
|
-
previousStep(): void;
|
|
215
|
-
goToStep(stepId: StepId): void;
|
|
216
|
-
makeChoice(choiceId: string): void;
|
|
217
|
-
skipStep(): void;
|
|
218
|
-
skipTutorial(): void;
|
|
219
|
-
private completeTutorial;
|
|
220
|
-
private endTutorial;
|
|
221
|
-
pauseTutorial(): void;
|
|
222
|
-
resumeTutorial(): void;
|
|
223
|
-
showTooltip(tooltipId: TooltipId): void;
|
|
224
|
-
hideTooltip(tooltipId: TooltipId): void;
|
|
225
|
-
hideAllTooltips(): void;
|
|
226
|
-
getAvailableHints(): HintDefinition[];
|
|
227
|
-
showHint(hintId: HintId): void;
|
|
228
|
-
dismissHint(hintId: HintId): void;
|
|
229
|
-
isActive(): boolean;
|
|
230
|
-
getActiveTutorial(): TutorialDefinition | undefined;
|
|
231
|
-
getCurrentStep(): TutorialStep | undefined;
|
|
232
|
-
getCurrentStepIndex(): number;
|
|
233
|
-
getTotalSteps(): number;
|
|
234
|
-
getProgress(tutorialId?: TutorialId): TutorialProgress | undefined;
|
|
235
|
-
isCompleted(tutorialId: TutorialId): boolean;
|
|
236
|
-
isSkipped(tutorialId: TutorialId): boolean;
|
|
237
|
-
getCompletedTutorials(): TutorialId[];
|
|
238
|
-
getAvailableTutorials(): TutorialDefinition[];
|
|
239
|
-
checkAutoStart(): void;
|
|
240
|
-
lock(): void;
|
|
241
|
-
unlock(): void;
|
|
242
|
-
getRenderData(): TutorialRenderData;
|
|
243
|
-
private loadProgress;
|
|
244
|
-
private saveProgress;
|
|
245
|
-
resetProgress(tutorialId?: TutorialId): void;
|
|
246
|
-
destroy(): void;
|
|
247
|
-
}
|
|
248
|
-
export declare function createTutorialSystem(config?: Partial<TutorialConfig>): NiceTutorial;
|