@almadar/std 1.0.0 → 1.0.1

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 (40) hide show
  1. package/dist/behaviors/async.d.ts +8 -8
  2. package/dist/behaviors/async.js +548 -500
  3. package/dist/behaviors/async.js.map +1 -1
  4. package/dist/behaviors/data-management.d.ts +11 -19
  5. package/dist/behaviors/data-management.js +468 -449
  6. package/dist/behaviors/data-management.js.map +1 -1
  7. package/dist/behaviors/feedback.d.ts +6 -6
  8. package/dist/behaviors/feedback.js +312 -278
  9. package/dist/behaviors/feedback.js.map +1 -1
  10. package/dist/behaviors/game-core.d.ts +11 -12
  11. package/dist/behaviors/game-core.js +357 -406
  12. package/dist/behaviors/game-core.js.map +1 -1
  13. package/dist/behaviors/game-entity.d.ts +13 -14
  14. package/dist/behaviors/game-entity.js +622 -592
  15. package/dist/behaviors/game-entity.js.map +1 -1
  16. package/dist/behaviors/game-ui.d.ts +9 -10
  17. package/dist/behaviors/game-ui.js +522 -459
  18. package/dist/behaviors/game-ui.js.map +1 -1
  19. package/dist/behaviors/index.d.ts +3 -3
  20. package/dist/behaviors/index.js +3876 -3843
  21. package/dist/behaviors/index.js.map +1 -1
  22. package/dist/behaviors/registry.d.ts +14 -24
  23. package/dist/behaviors/registry.js +3868 -3803
  24. package/dist/behaviors/registry.js.map +1 -1
  25. package/dist/behaviors/types.d.ts +14 -138
  26. package/dist/behaviors/types.js +10 -47
  27. package/dist/behaviors/types.js.map +1 -1
  28. package/dist/behaviors/ui-interaction.d.ts +13 -20
  29. package/dist/behaviors/ui-interaction.js +961 -1043
  30. package/dist/behaviors/ui-interaction.js.map +1 -1
  31. package/dist/index.d.ts +44 -11
  32. package/dist/index.js +3913 -3870
  33. package/dist/index.js.map +1 -1
  34. package/dist/modules/index.js +11 -0
  35. package/dist/modules/index.js.map +1 -1
  36. package/dist/modules/str.js +11 -0
  37. package/dist/modules/str.js.map +1 -1
  38. package/dist/registry.js +11 -0
  39. package/dist/registry.js.map +1 -1
  40. package/package.json +3 -2
@@ -1,33 +1,31 @@
1
- import { BehaviorCategory, StandardBehavior, BehaviorMetadata } from './types.js';
2
- import '@almadar/core/types';
1
+ import { BehaviorMetadata } from './types.js';
2
+ import { OrbitalSchema } from '@almadar/core/types';
3
3
 
4
4
  /**
5
5
  * Standard Behaviors Registry
6
6
  *
7
7
  * Combined registry of all Standard Behaviors with lookup functions.
8
+ * Note: Behaviors are now typed as OrbitalSchema (OrbitalSchema).
8
9
  *
9
10
  * @packageDocumentation
10
11
  */
11
12
 
12
13
  /**
13
14
  * All Standard Behaviors combined into a single array.
15
+ * Each behavior is now a OrbitalSchema (OrbitalSchema).
14
16
  */
15
- declare const STANDARD_BEHAVIORS: StandardBehavior[];
17
+ declare const STANDARD_BEHAVIORS: OrbitalSchema[];
16
18
  /**
17
19
  * Behavior registry indexed by name for fast lookup.
18
20
  */
19
- declare const BEHAVIOR_REGISTRY: Record<string, StandardBehavior>;
20
- /**
21
- * Behaviors grouped by category.
22
- */
23
- declare const BEHAVIORS_BY_CATEGORY: Record<BehaviorCategory, StandardBehavior[]>;
21
+ declare const BEHAVIOR_REGISTRY: Record<string, OrbitalSchema>;
24
22
  /**
25
23
  * Get a behavior by name.
26
24
  *
27
- * @param name - Behavior name (e.g., 'std/List')
25
+ * @param name - Behavior name (e.g., 'std-list')
28
26
  * @returns The behavior or undefined if not found
29
27
  */
30
- declare function getBehavior(name: string): StandardBehavior | undefined;
28
+ declare function getBehavior(name: string): OrbitalSchema | undefined;
31
29
  /**
32
30
  * Check if a behavior exists.
33
31
  *
@@ -35,13 +33,6 @@ declare function getBehavior(name: string): StandardBehavior | undefined;
35
33
  * @returns true if the behavior exists
36
34
  */
37
35
  declare function isKnownBehavior(name: string): boolean;
38
- /**
39
- * Get all behaviors in a category.
40
- *
41
- * @param category - Behavior category
42
- * @returns Array of behaviors in that category
43
- */
44
- declare function getBehaviorsByCategory(category: BehaviorCategory): StandardBehavior[];
45
36
  /**
46
37
  * Get all behavior names.
47
38
  *
@@ -53,7 +44,7 @@ declare function getAllBehaviorNames(): string[];
53
44
  *
54
45
  * @returns Array of all behaviors
55
46
  */
56
- declare function getAllBehaviors(): StandardBehavior[];
47
+ declare function getAllBehaviors(): OrbitalSchema[];
57
48
  /**
58
49
  * Get metadata for all behaviors (lightweight).
59
50
  *
@@ -61,26 +52,26 @@ declare function getAllBehaviors(): StandardBehavior[];
61
52
  */
62
53
  declare function getAllBehaviorMetadata(): BehaviorMetadata[];
63
54
  /**
64
- * Find behaviors that match a use case.
55
+ * Find behaviors that match a use case based on description.
65
56
  *
66
57
  * @param useCase - Use case description to match
67
58
  * @returns Array of matching behaviors
68
59
  */
69
- declare function findBehaviorsForUseCase(useCase: string): StandardBehavior[];
60
+ declare function findBehaviorsForUseCase(useCase: string): OrbitalSchema[];
70
61
  /**
71
62
  * Get behaviors that handle a specific event.
72
63
  *
73
64
  * @param event - Event name
74
65
  * @returns Array of behaviors that handle this event
75
66
  */
76
- declare function getBehaviorsForEvent(event: string): StandardBehavior[];
67
+ declare function getBehaviorsForEvent(event: string): OrbitalSchema[];
77
68
  /**
78
69
  * Get behaviors that have a specific state.
79
70
  *
80
71
  * @param state - State name
81
72
  * @returns Array of behaviors that have this state
82
73
  */
83
- declare function getBehaviorsWithState(state: string): StandardBehavior[];
74
+ declare function getBehaviorsWithState(state: string): OrbitalSchema[];
84
75
  /**
85
76
  * Validate that a behavior reference is valid.
86
77
  *
@@ -93,11 +84,10 @@ declare function validateBehaviorReference(name: string): string | null;
93
84
  */
94
85
  declare function getBehaviorLibraryStats(): {
95
86
  totalBehaviors: number;
96
- byCategory: Record<string, number>;
97
87
  totalStates: number;
98
88
  totalEvents: number;
99
89
  totalTransitions: number;
100
90
  totalTicks: number;
101
91
  };
102
92
 
103
- export { BEHAVIORS_BY_CATEGORY, BEHAVIOR_REGISTRY, STANDARD_BEHAVIORS, findBehaviorsForUseCase, getAllBehaviorMetadata, getAllBehaviorNames, getAllBehaviors, getBehavior, getBehaviorLibraryStats, getBehaviorsByCategory, getBehaviorsForEvent, getBehaviorsWithState, isKnownBehavior, validateBehaviorReference };
93
+ export { BEHAVIOR_REGISTRY, STANDARD_BEHAVIORS, findBehaviorsForUseCase, getAllBehaviorMetadata, getAllBehaviorNames, getAllBehaviors, getBehavior, getBehaviorLibraryStats, getBehaviorsForEvent, getBehaviorsWithState, isKnownBehavior, validateBehaviorReference };