@bemoje/composition 2.1.2 → 2.1.5

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 (62) hide show
  1. package/README.md +19 -35
  2. package/lib/index.cjs +823 -101
  3. package/lib/index.d.cts +2429 -16
  4. package/lib/index.d.ts +2429 -16
  5. package/lib/index.js +809 -14
  6. package/package.json +23 -209
  7. package/lib/IView.cjs +0 -2
  8. package/lib/IView.d.cts +0 -12
  9. package/lib/IView.d.ts +0 -12
  10. package/lib/IView.js +0 -1
  11. package/lib/OptionsConfigurator.cjs +0 -166
  12. package/lib/OptionsConfigurator.d.cts +0 -2229
  13. package/lib/OptionsConfigurator.d.ts +0 -2229
  14. package/lib/OptionsConfigurator.js +0 -163
  15. package/lib/View.cjs +0 -22
  16. package/lib/View.d.cts +0 -14
  17. package/lib/View.d.ts +0 -14
  18. package/lib/View.js +0 -20
  19. package/lib/inheritProxifiedPrototype.cjs +0 -19
  20. package/lib/inheritProxifiedPrototype.d.cts +0 -11
  21. package/lib/inheritProxifiedPrototype.d.ts +0 -11
  22. package/lib/inheritProxifiedPrototype.js +0 -16
  23. package/lib/inheritProxifiedPrototypeProperty.cjs +0 -45
  24. package/lib/inheritProxifiedPrototypeProperty.d.cts +0 -9
  25. package/lib/inheritProxifiedPrototypeProperty.d.ts +0 -9
  26. package/lib/inheritProxifiedPrototypeProperty.js +0 -43
  27. package/lib/inspector/Inspector.cjs +0 -227
  28. package/lib/inspector/Inspector.d.cts +0 -4
  29. package/lib/inspector/Inspector.d.ts +0 -4
  30. package/lib/inspector/Inspector.js +0 -220
  31. package/lib/inspector/defaults/ignoreValuesDefaults.cjs +0 -11
  32. package/lib/inspector/defaults/ignoreValuesDefaults.d.cts +0 -11
  33. package/lib/inspector/defaults/ignoreValuesDefaults.d.ts +0 -11
  34. package/lib/inspector/defaults/ignoreValuesDefaults.js +0 -11
  35. package/lib/inspector/defaults/ignoreValuesFilterDefaults.cjs +0 -23
  36. package/lib/inspector/defaults/ignoreValuesFilterDefaults.d.cts +0 -11
  37. package/lib/inspector/defaults/ignoreValuesFilterDefaults.d.ts +0 -11
  38. package/lib/inspector/defaults/ignoreValuesFilterDefaults.js +0 -21
  39. package/lib/inspector/defaults/inspectDefaults.cjs +0 -17
  40. package/lib/inspector/defaults/inspectDefaults.d.cts +0 -8
  41. package/lib/inspector/defaults/inspectDefaults.d.ts +0 -8
  42. package/lib/inspector/defaults/inspectDefaults.js +0 -16
  43. package/lib/inspector/defaults/inspectorDefaults.cjs +0 -15
  44. package/lib/inspector/defaults/inspectorDefaults.d.cts +0 -11
  45. package/lib/inspector/defaults/inspectorDefaults.d.ts +0 -11
  46. package/lib/inspector/defaults/inspectorDefaults.js +0 -14
  47. package/lib/inspector/types.cjs +0 -2
  48. package/lib/inspector/types.d.cts +0 -4
  49. package/lib/inspector/types.d.ts +0 -4
  50. package/lib/inspector/types.js +0 -1
  51. package/lib/parenting/ParentRelationTypes.cjs +0 -130
  52. package/lib/parenting/ParentRelationTypes.d.cts +0 -4
  53. package/lib/parenting/ParentRelationTypes.d.ts +0 -4
  54. package/lib/parenting/ParentRelationTypes.js +0 -123
  55. package/lib/parenting/Parenting.cjs +0 -88
  56. package/lib/parenting/Parenting.d.cts +0 -4
  57. package/lib/parenting/Parenting.d.ts +0 -4
  58. package/lib/parenting/Parenting.js +0 -85
  59. package/lib/parenting/types.cjs +0 -2
  60. package/lib/parenting/types.d.cts +0 -4
  61. package/lib/parenting/types.d.ts +0 -4
  62. package/lib/parenting/types.js +0 -1
package/README.md CHANGED
@@ -2,8 +2,25 @@
2
2
 
3
3
  Class composition utilities for views, proxy-based inheritance, object inspection, and parent-child relationships.
4
4
 
5
- [![TypeScript](https://img.shields.io/badge/TypeScript-5-blue)](https://www.typescriptlang.org/)
6
- [![Module](https://img.shields.io/badge/Module-ESM-yellow)](https://nodejs.org/api/esm.html)
5
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5-blue)](https://www.typescriptlang.org/) [![Module](https://img.shields.io/badge/Module-ESM-yellow)](https://nodejs.org/api/esm.html)
6
+
7
+ ## Exports
8
+
9
+ <!-- EXPORTS_START -->
10
+
11
+ - **Inspector**: Interface that target objects must implement to be inspectable. Provides standard inspection methods for debugging and serialization.
12
+ - **OptionsConfigurator**: A utility function to configure options based on a given schema or properties. This function provides a builder pattern to define and validate options, including handling default values, required keys, and optional keys.
13
+ - **ParentRelationTypes**: Manages parent-child relationships between constructor types, tracking hierarchical connections and providing debugging capabilities.
14
+ - **Parenting**: Class that handles the parent-child relationships between objects on their behalf. In order to avoid circular references, all children keep a weak reference to their parent. However, it is not guaranteed. Two objects could in principle mutually be both each other's parent and child at the same time which would allow circular references to exist.
15
+ - **View**: Base class providing view functionality over a target object using the Composition pattern.
16
+ - **ignoreValuesDefaults**: Default options for ignoring specific values during object inspection.
17
+ - **ignoreValuesFilterDefaults**: Default filter functions for ignoring values during object inspection.
18
+ - **inheritProxifiedPrototype**: Inherits prototype properties from a target class to a viewer class with proxification, excluding specified keys.
19
+ - **inheritProxifiedPrototypeProperty**: Inherits a single prototype property from a target class to a viewer class with proxification.
20
+ - **inspectDefaults**: Default options for Node.js util.inspect with enhanced settings for better debugging output.
21
+ - **inspectorDefaults**: The default inspector configuration options.
22
+
23
+ <!-- EXPORTS_END -->
7
24
 
8
25
  ## Installation
9
26
 
@@ -115,36 +132,3 @@ const child = new TreeNode('child', root)
115
132
 
116
133
  child.parenting.getParent() // => root
117
134
  ```
118
-
119
- ## API Reference
120
-
121
- ### Views
122
-
123
- | Export | Description |
124
- | ------- | --------------------------------------------------- |
125
- | `View` | Base class wrapping a target object for composition |
126
- | `IView` | Interface for the View pattern |
127
-
128
- ### Prototype Inheritance
129
-
130
- | Function | Description |
131
- | ----------------------------------- | --------------------------------------- |
132
- | `inheritProxifiedPrototype` | Inherit all prototype members via proxy |
133
- | `inheritProxifiedPrototypeProperty` | Inherit a single property via proxy |
134
-
135
- ### Inspector
136
-
137
- | Export | Description |
138
- | ---------------------------- | ----------------------------------------------------------- |
139
- | `Inspector` | Deep inspection with configurable display and serialization |
140
- | `inspectorDefaults` | Default inspector configuration |
141
- | `inspectDefaults` | Default inspect behavior |
142
- | `ignoreValuesDefaults` | Default ignored value patterns |
143
- | `ignoreValuesFilterDefaults` | Default filter for ignored values |
144
-
145
- ### Parenting
146
-
147
- | Export | Description |
148
- | --------------------- | ---------------------------------------------- |
149
- | `Parenting` | Mixin for parent-child relationship management |
150
- | `ParentRelationTypes` | Registry of parent relation types |