@almadar/std 1.0.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 (78) hide show
  1. package/LICENSE +72 -0
  2. package/dist/behaviors/action-affinity.d.ts +88 -0
  3. package/dist/behaviors/action-affinity.js +290 -0
  4. package/dist/behaviors/action-affinity.js.map +1 -0
  5. package/dist/behaviors/async.d.ts +20 -0
  6. package/dist/behaviors/async.js +542 -0
  7. package/dist/behaviors/async.js.map +1 -0
  8. package/dist/behaviors/data-management.d.ts +40 -0
  9. package/dist/behaviors/data-management.js +495 -0
  10. package/dist/behaviors/data-management.js.map +1 -0
  11. package/dist/behaviors/feedback.d.ts +18 -0
  12. package/dist/behaviors/feedback.js +307 -0
  13. package/dist/behaviors/feedback.js.map +1 -0
  14. package/dist/behaviors/game-core.d.ts +40 -0
  15. package/dist/behaviors/game-core.js +443 -0
  16. package/dist/behaviors/game-core.js.map +1 -0
  17. package/dist/behaviors/game-entity.d.ts +39 -0
  18. package/dist/behaviors/game-entity.js +643 -0
  19. package/dist/behaviors/game-entity.js.map +1 -0
  20. package/dist/behaviors/game-ui.d.ts +29 -0
  21. package/dist/behaviors/game-ui.js +493 -0
  22. package/dist/behaviors/game-ui.js.map +1 -0
  23. package/dist/behaviors/index.d.ts +11 -0
  24. package/dist/behaviors/index.js +4539 -0
  25. package/dist/behaviors/index.js.map +1 -0
  26. package/dist/behaviors/registry.d.ts +103 -0
  27. package/dist/behaviors/registry.js +4166 -0
  28. package/dist/behaviors/registry.js.map +1 -0
  29. package/dist/behaviors/types.d.ts +179 -0
  30. package/dist/behaviors/types.js +111 -0
  31. package/dist/behaviors/types.js.map +1 -0
  32. package/dist/behaviors/ui-interaction.d.ts +36 -0
  33. package/dist/behaviors/ui-interaction.js +1104 -0
  34. package/dist/behaviors/ui-interaction.js.map +1 -0
  35. package/dist/index.d.ts +195 -0
  36. package/dist/index.js +8209 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/modules/array.d.ts +28 -0
  39. package/dist/modules/array.js +556 -0
  40. package/dist/modules/array.js.map +1 -0
  41. package/dist/modules/async.d.ts +22 -0
  42. package/dist/modules/async.js +112 -0
  43. package/dist/modules/async.js.map +1 -0
  44. package/dist/modules/format.d.ts +21 -0
  45. package/dist/modules/format.js +129 -0
  46. package/dist/modules/format.js.map +1 -0
  47. package/dist/modules/index.d.ts +12 -0
  48. package/dist/modules/index.js +3131 -0
  49. package/dist/modules/index.js.map +1 -0
  50. package/dist/modules/math.d.ts +22 -0
  51. package/dist/modules/math.js +215 -0
  52. package/dist/modules/math.js.map +1 -0
  53. package/dist/modules/nn.d.ts +23 -0
  54. package/dist/modules/nn.js +189 -0
  55. package/dist/modules/nn.js.map +1 -0
  56. package/dist/modules/object.d.ts +22 -0
  57. package/dist/modules/object.js +257 -0
  58. package/dist/modules/object.js.map +1 -0
  59. package/dist/modules/str.d.ts +21 -0
  60. package/dist/modules/str.js +344 -0
  61. package/dist/modules/str.js.map +1 -0
  62. package/dist/modules/tensor.d.ts +23 -0
  63. package/dist/modules/tensor.js +427 -0
  64. package/dist/modules/tensor.js.map +1 -0
  65. package/dist/modules/time.d.ts +24 -0
  66. package/dist/modules/time.js +323 -0
  67. package/dist/modules/time.js.map +1 -0
  68. package/dist/modules/train.d.ts +23 -0
  69. package/dist/modules/train.js +308 -0
  70. package/dist/modules/train.js.map +1 -0
  71. package/dist/modules/validate.d.ts +23 -0
  72. package/dist/modules/validate.js +301 -0
  73. package/dist/modules/validate.js.map +1 -0
  74. package/dist/registry.d.ts +140 -0
  75. package/dist/registry.js +3240 -0
  76. package/dist/registry.js.map +1 -0
  77. package/dist/types-I95R8_FN.d.ts +91 -0
  78. package/package.json +59 -0
@@ -0,0 +1,103 @@
1
+ import { BehaviorCategory, StandardBehavior, BehaviorMetadata } from './types.js';
2
+ import '@almadar/core/types';
3
+
4
+ /**
5
+ * Standard Behaviors Registry
6
+ *
7
+ * Combined registry of all Standard Behaviors with lookup functions.
8
+ *
9
+ * @packageDocumentation
10
+ */
11
+
12
+ /**
13
+ * All Standard Behaviors combined into a single array.
14
+ */
15
+ declare const STANDARD_BEHAVIORS: StandardBehavior[];
16
+ /**
17
+ * Behavior registry indexed by name for fast lookup.
18
+ */
19
+ declare const BEHAVIOR_REGISTRY: Record<string, StandardBehavior>;
20
+ /**
21
+ * Behaviors grouped by category.
22
+ */
23
+ declare const BEHAVIORS_BY_CATEGORY: Record<BehaviorCategory, StandardBehavior[]>;
24
+ /**
25
+ * Get a behavior by name.
26
+ *
27
+ * @param name - Behavior name (e.g., 'std/List')
28
+ * @returns The behavior or undefined if not found
29
+ */
30
+ declare function getBehavior(name: string): StandardBehavior | undefined;
31
+ /**
32
+ * Check if a behavior exists.
33
+ *
34
+ * @param name - Behavior name
35
+ * @returns true if the behavior exists
36
+ */
37
+ 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
+ /**
46
+ * Get all behavior names.
47
+ *
48
+ * @returns Array of all behavior names
49
+ */
50
+ declare function getAllBehaviorNames(): string[];
51
+ /**
52
+ * Get all behaviors.
53
+ *
54
+ * @returns Array of all behaviors
55
+ */
56
+ declare function getAllBehaviors(): StandardBehavior[];
57
+ /**
58
+ * Get metadata for all behaviors (lightweight).
59
+ *
60
+ * @returns Array of behavior metadata
61
+ */
62
+ declare function getAllBehaviorMetadata(): BehaviorMetadata[];
63
+ /**
64
+ * Find behaviors that match a use case.
65
+ *
66
+ * @param useCase - Use case description to match
67
+ * @returns Array of matching behaviors
68
+ */
69
+ declare function findBehaviorsForUseCase(useCase: string): StandardBehavior[];
70
+ /**
71
+ * Get behaviors that handle a specific event.
72
+ *
73
+ * @param event - Event name
74
+ * @returns Array of behaviors that handle this event
75
+ */
76
+ declare function getBehaviorsForEvent(event: string): StandardBehavior[];
77
+ /**
78
+ * Get behaviors that have a specific state.
79
+ *
80
+ * @param state - State name
81
+ * @returns Array of behaviors that have this state
82
+ */
83
+ declare function getBehaviorsWithState(state: string): StandardBehavior[];
84
+ /**
85
+ * Validate that a behavior reference is valid.
86
+ *
87
+ * @param name - Behavior name
88
+ * @returns Error message if invalid, null if valid
89
+ */
90
+ declare function validateBehaviorReference(name: string): string | null;
91
+ /**
92
+ * Get statistics about the behavior library.
93
+ */
94
+ declare function getBehaviorLibraryStats(): {
95
+ totalBehaviors: number;
96
+ byCategory: Record<string, number>;
97
+ totalStates: number;
98
+ totalEvents: number;
99
+ totalTransitions: number;
100
+ totalTicks: number;
101
+ };
102
+
103
+ export { BEHAVIORS_BY_CATEGORY, BEHAVIOR_REGISTRY, STANDARD_BEHAVIORS, findBehaviorsForUseCase, getAllBehaviorMetadata, getAllBehaviorNames, getAllBehaviors, getBehavior, getBehaviorLibraryStats, getBehaviorsByCategory, getBehaviorsForEvent, getBehaviorsWithState, isKnownBehavior, validateBehaviorReference };