@almadar/ui 5.84.0 → 5.86.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.
Files changed (41) hide show
  1. package/dist/avl/index.cjs +1379 -5162
  2. package/dist/avl/index.js +431 -4214
  3. package/dist/components/game/2d/{organisms → molecules}/SequenceBar.d.ts +8 -3
  4. package/dist/components/game/2d/molecules/index.d.ts +15 -27
  5. package/dist/components/game/shared/index.d.ts +0 -2
  6. package/dist/components/game/shared/lib/puzzleObject.d.ts +1 -1
  7. package/dist/components/index.cjs +1445 -4940
  8. package/dist/components/index.js +487 -3961
  9. package/dist/providers/index.cjs +1209 -4992
  10. package/dist/providers/index.js +370 -4153
  11. package/dist/runtime/index.cjs +1211 -4994
  12. package/dist/runtime/index.js +382 -4165
  13. package/package.json +1 -1
  14. package/dist/components/game/2d/organisms/BuilderBoard.d.ts +0 -60
  15. package/dist/components/game/2d/organisms/CanvasEffect.d.ts +0 -70
  16. package/dist/components/game/2d/organisms/CardBattlerBoard.d.ts +0 -45
  17. package/dist/components/game/2d/organisms/ClassifierBoard.d.ts +0 -66
  18. package/dist/components/game/2d/organisms/DebuggerBoard.d.ts +0 -61
  19. package/dist/components/game/2d/organisms/EventHandlerBoard.d.ts +0 -42
  20. package/dist/components/game/2d/organisms/NegotiatorBoard.d.ts +0 -56
  21. package/dist/components/game/2d/organisms/SequencerBoard.d.ts +0 -69
  22. package/dist/components/game/2d/organisms/SimulatorBoard.d.ts +0 -58
  23. package/dist/components/game/2d/organisms/StateArchitectBoard.d.ts +0 -61
  24. package/dist/components/game/2d/organisms/VisualNovelBoard.d.ts +0 -44
  25. package/dist/components/game/shared/canvasEffects.d.ts +0 -50
  26. package/dist/components/game/shared/combatPresets.d.ts +0 -15
  27. package/dist/components/game/shared/hooks/useCanvasEffects.d.ts +0 -27
  28. /package/dist/components/game/2d/{organisms → molecules}/ActionPalette.d.ts +0 -0
  29. /package/dist/components/game/2d/{organisms → molecules}/ActionTile.d.ts +0 -0
  30. /package/dist/components/game/2d/{organisms → molecules}/EventLog.d.ts +0 -0
  31. /package/dist/components/game/2d/{organisms → molecules}/ObjectRulePanel.d.ts +0 -0
  32. /package/dist/components/game/2d/{organisms → molecules}/RuleEditor.d.ts +0 -0
  33. /package/dist/components/game/2d/{organisms → molecules}/SimulationCanvas.d.ts +0 -0
  34. /package/dist/components/game/2d/{organisms → molecules}/SimulationControls.d.ts +0 -0
  35. /package/dist/components/game/2d/{organisms → molecules}/SimulationGraph.d.ts +0 -0
  36. /package/dist/components/game/2d/{organisms → molecules}/StateJsonView.d.ts +0 -0
  37. /package/dist/components/game/2d/{organisms → molecules}/StateNode.d.ts +0 -0
  38. /package/dist/components/game/2d/{organisms → molecules}/TraitSlot.d.ts +0 -0
  39. /package/dist/components/game/2d/{organisms → molecules}/TraitStateViewer.d.ts +0 -0
  40. /package/dist/components/game/2d/{organisms → molecules}/TransitionArrow.d.ts +0 -0
  41. /package/dist/components/game/2d/{organisms → molecules}/VariablePanel.d.ts +0 -0
@@ -1,50 +0,0 @@
1
- /**
2
- * Canvas Effect Engine
3
- *
4
- * Pure functions for spawning, updating, and drawing canvas effects.
5
- * No React dependencies — called from the RAF loop via useCanvasEffects hook.
6
- *
7
- * Ported from trait-wars and generalized for any almadar-ui client.
8
- */
9
- import type { CanvasParticle, CanvasSequence, CanvasOverlay, CanvasEffectState, ParticleEmitterConfig, SequenceConfig, OverlayConfig } from './effects';
10
- /**
11
- * Draw a sprite tinted with an RGB color onto the main canvas.
12
- * Uses offscreen canvas with `source-atop` compositing to recolor
13
- * white-on-transparent sprites.
14
- */
15
- export declare function drawTintedImage(ctx: CanvasRenderingContext2D, img: HTMLImageElement | ImageBitmap, x: number, y: number, w: number, h: number, tint: {
16
- r: number;
17
- g: number;
18
- b: number;
19
- }, alpha: number, blendMode?: GlobalCompositeOperation): void;
20
- /**
21
- * Spawn a burst of particles from an emitter config.
22
- */
23
- export declare function spawnParticles(config: ParticleEmitterConfig, animTime: number): CanvasParticle[];
24
- /**
25
- * Spawn a frame sequence animation.
26
- */
27
- export declare function spawnSequence(config: SequenceConfig, animTime: number): CanvasSequence;
28
- /**
29
- * Spawn an overlay effect.
30
- */
31
- export declare function spawnOverlay(config: OverlayConfig, animTime: number): CanvasOverlay;
32
- /**
33
- * Advance effect state by one frame. Returns new state with expired effects removed.
34
- */
35
- export declare function updateEffectState(state: CanvasEffectState, animTime: number, deltaMs: number): CanvasEffectState;
36
- type GetImageFn = (url: string) => HTMLImageElement | undefined;
37
- /**
38
- * Draw all active effects onto the canvas.
39
- */
40
- export declare function drawEffectState(ctx: CanvasRenderingContext2D, state: CanvasEffectState, animTime: number, getImage: GetImageFn): void;
41
- export declare function hasActiveEffects(state: CanvasEffectState): boolean;
42
- /**
43
- * Collect all sprite URLs from an EffectAssetManifest for preloading.
44
- */
45
- export declare function getAllEffectSpriteUrls(manifest: {
46
- baseUrl: string;
47
- particles?: Record<string, string[] | string | undefined>;
48
- animations?: Record<string, string[] | undefined>;
49
- }): string[];
50
- export {};
@@ -1,15 +0,0 @@
1
- /**
2
- * Combat Presets
3
- *
4
- * Maps combat actions to composed effect layers (particles + sequences + overlays).
5
- * Each preset factory takes a screen-space origin and returns a CombatPreset.
6
- *
7
- * Generalized from trait-wars: uses EffectAssetManifest instead of TraitWarsAssetManifest.
8
- */
9
- import type { CombatActionType, CombatPreset, EffectAssetManifest } from './effects';
10
- type PresetFactory = (originX: number, originY: number) => CombatPreset;
11
- /**
12
- * Create combat preset factories from an effect asset manifest.
13
- */
14
- export declare function createCombatPresets(manifest: EffectAssetManifest): Record<CombatActionType, PresetFactory>;
15
- export {};
@@ -1,27 +0,0 @@
1
- import type { AssetUrl } from '@almadar/core';
2
- import type { CombatActionType, EffectAssetManifest } from '../effects';
3
- export interface UseCanvasEffectsOptions {
4
- /** Effect asset manifest (baseUrl + particles + animations) */
5
- manifest: EffectAssetManifest;
6
- }
7
- export interface UseCanvasEffectsResult {
8
- /** All effect sprite URLs for preloading via useImageCache */
9
- effectSpriteUrls: AssetUrl[];
10
- /** Spawn a combat effect at the given screen position */
11
- spawnEffect: (type: CombatActionType, screenX: number, screenY: number) => void;
12
- /** Draw all active effects — call inside draw() after units, before ctx.restore() */
13
- drawEffects: (ctx: CanvasRenderingContext2D, animTime: number, getImage: (url: string) => HTMLImageElement | undefined) => void;
14
- /** Whether there are active effects (keeps RAF alive) */
15
- hasActiveEffects: boolean;
16
- /** Screen shake offset to apply to container transform */
17
- screenShake: {
18
- x: number;
19
- y: number;
20
- };
21
- /** Screen flash overlay (null = no flash) */
22
- screenFlash: {
23
- color: string;
24
- alpha: number;
25
- } | null;
26
- }
27
- export declare function useCanvasEffects({ manifest, }: UseCanvasEffectsOptions): UseCanvasEffectsResult;