@bemoje/composition 2.0.0 → 2.1.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 (64) hide show
  1. package/README.md +150 -0
  2. package/lib/IView.cjs +2 -0
  3. package/lib/IView.d.cts +12 -0
  4. package/lib/IView.d.ts +12 -0
  5. package/lib/IView.js +1 -0
  6. package/lib/OptionsConfigurator.cjs +166 -0
  7. package/lib/OptionsConfigurator.d.cts +2229 -0
  8. package/lib/OptionsConfigurator.d.ts +2229 -0
  9. package/lib/OptionsConfigurator.js +163 -0
  10. package/lib/View.cjs +22 -0
  11. package/lib/View.d.cts +14 -0
  12. package/lib/View.d.ts +14 -0
  13. package/lib/View.js +20 -0
  14. package/lib/index.cjs +103 -0
  15. package/lib/index.d.cts +16 -0
  16. package/lib/index.d.ts +16 -0
  17. package/lib/index.js +14 -0
  18. package/lib/inheritProxifiedPrototype.cjs +19 -0
  19. package/lib/inheritProxifiedPrototype.d.cts +11 -0
  20. package/lib/inheritProxifiedPrototype.d.ts +11 -0
  21. package/lib/inheritProxifiedPrototype.js +16 -0
  22. package/lib/inheritProxifiedPrototypeProperty.cjs +45 -0
  23. package/lib/inheritProxifiedPrototypeProperty.d.cts +9 -0
  24. package/lib/inheritProxifiedPrototypeProperty.d.ts +9 -0
  25. package/lib/inheritProxifiedPrototypeProperty.js +43 -0
  26. package/lib/inspector/Inspector.cjs +227 -0
  27. package/lib/inspector/Inspector.d.cts +4 -0
  28. package/lib/inspector/Inspector.d.ts +4 -0
  29. package/lib/inspector/Inspector.js +220 -0
  30. package/lib/inspector/defaults/ignoreValuesDefaults.cjs +11 -0
  31. package/lib/inspector/defaults/ignoreValuesDefaults.d.cts +11 -0
  32. package/lib/inspector/defaults/ignoreValuesDefaults.d.ts +11 -0
  33. package/lib/inspector/defaults/ignoreValuesDefaults.js +11 -0
  34. package/lib/inspector/defaults/ignoreValuesFilterDefaults.cjs +23 -0
  35. package/lib/inspector/defaults/ignoreValuesFilterDefaults.d.cts +11 -0
  36. package/lib/inspector/defaults/ignoreValuesFilterDefaults.d.ts +11 -0
  37. package/lib/inspector/defaults/ignoreValuesFilterDefaults.js +21 -0
  38. package/lib/inspector/defaults/inspectDefaults.cjs +17 -0
  39. package/lib/inspector/defaults/inspectDefaults.d.cts +8 -0
  40. package/lib/inspector/defaults/inspectDefaults.d.ts +8 -0
  41. package/lib/inspector/defaults/inspectDefaults.js +16 -0
  42. package/lib/inspector/defaults/inspectorDefaults.cjs +15 -0
  43. package/lib/inspector/defaults/inspectorDefaults.d.cts +11 -0
  44. package/lib/inspector/defaults/inspectorDefaults.d.ts +11 -0
  45. package/lib/inspector/defaults/inspectorDefaults.js +14 -0
  46. package/lib/inspector/types.cjs +2 -0
  47. package/lib/inspector/types.d.cts +4 -0
  48. package/lib/inspector/types.d.ts +4 -0
  49. package/lib/inspector/types.js +1 -0
  50. package/lib/parenting/ParentRelationTypes.cjs +130 -0
  51. package/lib/parenting/ParentRelationTypes.d.cts +4 -0
  52. package/lib/parenting/ParentRelationTypes.d.ts +4 -0
  53. package/lib/parenting/ParentRelationTypes.js +123 -0
  54. package/lib/parenting/Parenting.cjs +88 -0
  55. package/lib/parenting/Parenting.d.cts +4 -0
  56. package/lib/parenting/Parenting.d.ts +4 -0
  57. package/lib/parenting/Parenting.js +85 -0
  58. package/lib/parenting/types.cjs +2 -0
  59. package/lib/parenting/types.d.cts +4 -0
  60. package/lib/parenting/types.d.ts +4 -0
  61. package/lib/parenting/types.js +1 -0
  62. package/package.json +239 -21
  63. package/index.d.ts +0 -193
  64. package/index.mjs +0 -628
@@ -0,0 +1,227 @@
1
+ 'use strict';
2
+
3
+ var View = require('../View');
4
+ var object$1 = require('es-toolkit/object');
5
+ var colors = require('ansi-colors');
6
+ var object = require('@mono/object');
7
+ var ignoreValuesFilterDefaults = require('./defaults/ignoreValuesFilterDefaults');
8
+ var util = require('util');
9
+ var inspectorDefaults = require('./defaults/inspectorDefaults');
10
+ var compat = require('es-toolkit/compat');
11
+ var esToolkit = require('es-toolkit');
12
+
13
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
14
+
15
+ var colors__default = /*#__PURE__*/_interopDefault(colors);
16
+
17
+ var __defProp = Object.defineProperty;
18
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
19
+ class Inspector extends View.View {
20
+ static {
21
+ __name(this, "Inspector");
22
+ }
23
+ /**
24
+ * Composes a class with Inspector capabilities by adding inspection methods to its prototype.
25
+ * This follows the Composition pattern to extend classes without inheritance.
26
+ */
27
+ static compose(cls, options = {}) {
28
+ if (!object.hasProperty(cls.prototype, util.inspect.custom)) {
29
+ object.defineMethod(cls.prototype, util.inspect.custom, function(depth, options2) {
30
+ return this.inspector.inspect(depth, options2);
31
+ });
32
+ }
33
+ if (!object.hasProperty(cls.prototype, "inspector")) {
34
+ object.defineLazyProperty(cls.prototype, "inspector", /* @__PURE__ */ __name(function get() {
35
+ return new Inspector(this);
36
+ }, "get"));
37
+ }
38
+ if (!object.hasProperty(cls.prototype, "toJSON")) {
39
+ object.defineMethod(cls.prototype, "toJSON", function() {
40
+ return this.inspector.toObject();
41
+ });
42
+ }
43
+ return options;
44
+ }
45
+ /**
46
+ * Compile the target object and return the output as an object.
47
+ */
48
+ toObject(depth = 0) {
49
+ const result = esToolkit.mapValues(this.compile(depth).output, (value) => {
50
+ if (!value) {
51
+ return value;
52
+ }
53
+ if (typeof value !== "object") {
54
+ return value;
55
+ }
56
+ if (Array.isArray(value)) {
57
+ return value.map((v) => {
58
+ if (v.inspector && v.inspector instanceof Inspector) {
59
+ return v.inspector.toObject(depth + 1);
60
+ }
61
+ return v;
62
+ });
63
+ }
64
+ if (value.inspector && value.inspector instanceof Inspector) {
65
+ return value.inspector.toObject(depth + 1);
66
+ }
67
+ return value;
68
+ });
69
+ return {
70
+ T: this.target.constructor.name,
71
+ ...result
72
+ };
73
+ }
74
+ /**
75
+ * Inspect the target object.
76
+ */
77
+ inspect(depth = 0, options = {}) {
78
+ const { output, inspectOptions } = this.compile(depth);
79
+ Object.assign(inspectOptions, options);
80
+ const result = util.inspect(output, options);
81
+ return result.replaceAll(/Object \[\w+] {/gm, (match) => {
82
+ match = match.substring(8, match.length - 3);
83
+ return `[${inspectOptions.colors ? colors__default.default.magenta(match) : match}] {`;
84
+ });
85
+ }
86
+ /**
87
+ * Compiles the output object and inspect options.
88
+ * Merges prototype chain options and applies filters to determine which properties to include.
89
+ */
90
+ compile(depth = 0) {
91
+ const output = Object.defineProperty({}, Symbol.toStringTag, {
92
+ value: this.target.constructor.name,
93
+ configurable: true
94
+ });
95
+ const options = this.mergePrototypeOptions();
96
+ const keys = new Set(options.keys);
97
+ if (options.autoAddBooleanKeys) {
98
+ const insBooleanValueKeys = Object.entries(this.target).filter(([_key, value]) => {
99
+ return typeof value === "boolean";
100
+ }).map(([key]) => {
101
+ return key;
102
+ });
103
+ const protoGetterKeys = object.getClassChain(this.target, {
104
+ includeSelf: false
105
+ }).map((cls) => {
106
+ return Object.getOwnPropertyNames(cls.prototype).filter((key) => {
107
+ return object.hasOwnProperty(Reflect.getOwnPropertyDescriptor(cls.prototype, key), "get");
108
+ });
109
+ }).flat(2);
110
+ const booleanKeys = insBooleanValueKeys.concat(protoGetterKeys).filter((key) => {
111
+ return /^(is|was|has|should)[A-Z]/.test(key);
112
+ });
113
+ booleanKeys.forEach((key) => {
114
+ return keys.add(key);
115
+ });
116
+ }
117
+ const ignoreFilters = Object.entries(options.ignoreValues).filter(([_name, enabled]) => {
118
+ return enabled;
119
+ }).map(([name]) => {
120
+ return ignoreValuesFilterDefaults.ignoreValuesFilterDefaults[name];
121
+ });
122
+ const objectValues = [];
123
+ const arrayValues = [];
124
+ for (const key of keys) {
125
+ const value = this.target[key];
126
+ if (!ignoreFilters.every((filter) => {
127
+ return filter(value);
128
+ })) {
129
+ continue;
130
+ }
131
+ if (!options.filters.every((filter) => {
132
+ return filter.call(this.target, value, key, depth, output);
133
+ })) {
134
+ continue;
135
+ }
136
+ if (Array.isArray(value)) {
137
+ arrayValues.push(() => {
138
+ return object.defineValue(output, key, value);
139
+ });
140
+ } else if (compat.isObjectLike(value)) {
141
+ objectValues.push(() => {
142
+ return object.defineValue(output, key, value);
143
+ });
144
+ } else {
145
+ object.defineValue(output, key, value);
146
+ }
147
+ }
148
+ objectValues.forEach((fn) => {
149
+ return fn();
150
+ });
151
+ arrayValues.forEach((fn) => {
152
+ return fn();
153
+ });
154
+ return {
155
+ output,
156
+ inspectOptions: options.inspect
157
+ };
158
+ }
159
+ /**
160
+ * Walks the prototype chain and merges Inspector options from all classes.
161
+ * Subclass options override superclass options following inheritance semantics.
162
+ */
163
+ mergePrototypeOptions() {
164
+ const defaults = this.getDefaults();
165
+ let inspectOptions = defaults.inspect;
166
+ const keys = new Set(defaults.keys);
167
+ let autoAddBooleanKeys = defaults.autoAddBooleanKeys;
168
+ const ignoreKeys = new Set(defaults.ignoreKeys);
169
+ const ignoreValues = defaults.ignoreValues;
170
+ const customFilters = defaults.filters;
171
+ const prototypeChainOptions = object.getClassChain(this.target.constructor, {
172
+ includeSelf: true
173
+ }).reverse().map((cls) => {
174
+ return cls.inspector ?? {};
175
+ });
176
+ for (const options of prototypeChainOptions) {
177
+ if (options.inspect) {
178
+ inspectOptions = {
179
+ ...inspectOptions,
180
+ ...options.inspect
181
+ };
182
+ }
183
+ options.keys?.forEach((elem) => {
184
+ return keys.add(elem);
185
+ });
186
+ if (options.autoAddBooleanKeys != null) {
187
+ autoAddBooleanKeys = options.autoAddBooleanKeys;
188
+ }
189
+ keys.forEach((elem) => {
190
+ return ignoreKeys.delete(elem);
191
+ });
192
+ options.ignoreKeys?.forEach((elem) => {
193
+ return ignoreKeys.add(elem);
194
+ });
195
+ ignoreKeys.forEach((elem) => {
196
+ return keys.delete(elem);
197
+ });
198
+ if (options.ignoreValues) {
199
+ Object.assign(ignoreValues, options.ignoreValues);
200
+ }
201
+ options.filters?.forEach((filter) => {
202
+ return customFilters.push(filter);
203
+ });
204
+ }
205
+ return {
206
+ inspect: inspectOptions,
207
+ ignoreValues,
208
+ autoAddBooleanKeys,
209
+ keys: Array.from(keys),
210
+ ignoreKeys: Array.from(ignoreKeys),
211
+ filters: customFilters
212
+ };
213
+ }
214
+ /**
215
+ * Returns a deep clone of the default Inspector options.
216
+ */
217
+ getDefaults() {
218
+ const filters = inspectorDefaults.inspectorDefaults.filters.slice();
219
+ const rest = object$1.cloneDeep(compat.omit(inspectorDefaults.inspectorDefaults, "filters"));
220
+ return {
221
+ ...rest,
222
+ filters
223
+ };
224
+ }
225
+ }
226
+
227
+ exports.Inspector = Inspector;
@@ -0,0 +1,4 @@
1
+ export { c as Inspector, e as InspectorTarget } from '../Inspector-CrOT_QD4.cjs';
2
+ import 'util';
3
+ import '../View.cjs';
4
+ import '../IView.cjs';
@@ -0,0 +1,4 @@
1
+ export { c as Inspector, e as InspectorTarget } from '../Inspector-DAN0uRqw.js';
2
+ import 'util';
3
+ import '../View.js';
4
+ import '../IView.js';
@@ -0,0 +1,220 @@
1
+ import { __name } from '../chunk-SHUYVCID.js';
2
+ import { View } from '../View';
3
+ import { cloneDeep } from 'es-toolkit/object';
4
+ import colors from 'ansi-colors';
5
+ import { hasProperty, defineMethod, defineLazyProperty, getClassChain, hasOwnProperty, defineValue } from '@mono/object';
6
+ import { ignoreValuesFilterDefaults } from './defaults/ignoreValuesFilterDefaults';
7
+ import { inspect } from 'util';
8
+ import { inspectorDefaults } from './defaults/inspectorDefaults';
9
+ import { isObjectLike, omit } from 'es-toolkit/compat';
10
+ import { mapValues } from 'es-toolkit';
11
+
12
+ class Inspector extends View {
13
+ static {
14
+ __name(this, "Inspector");
15
+ }
16
+ /**
17
+ * Composes a class with Inspector capabilities by adding inspection methods to its prototype.
18
+ * This follows the Composition pattern to extend classes without inheritance.
19
+ */
20
+ static compose(cls, options = {}) {
21
+ if (!hasProperty(cls.prototype, inspect.custom)) {
22
+ defineMethod(cls.prototype, inspect.custom, function(depth, options2) {
23
+ return this.inspector.inspect(depth, options2);
24
+ });
25
+ }
26
+ if (!hasProperty(cls.prototype, "inspector")) {
27
+ defineLazyProperty(cls.prototype, "inspector", /* @__PURE__ */ __name(function get() {
28
+ return new Inspector(this);
29
+ }, "get"));
30
+ }
31
+ if (!hasProperty(cls.prototype, "toJSON")) {
32
+ defineMethod(cls.prototype, "toJSON", function() {
33
+ return this.inspector.toObject();
34
+ });
35
+ }
36
+ return options;
37
+ }
38
+ /**
39
+ * Compile the target object and return the output as an object.
40
+ */
41
+ toObject(depth = 0) {
42
+ const result = mapValues(this.compile(depth).output, (value) => {
43
+ if (!value) {
44
+ return value;
45
+ }
46
+ if (typeof value !== "object") {
47
+ return value;
48
+ }
49
+ if (Array.isArray(value)) {
50
+ return value.map((v) => {
51
+ if (v.inspector && v.inspector instanceof Inspector) {
52
+ return v.inspector.toObject(depth + 1);
53
+ }
54
+ return v;
55
+ });
56
+ }
57
+ if (value.inspector && value.inspector instanceof Inspector) {
58
+ return value.inspector.toObject(depth + 1);
59
+ }
60
+ return value;
61
+ });
62
+ return {
63
+ T: this.target.constructor.name,
64
+ ...result
65
+ };
66
+ }
67
+ /**
68
+ * Inspect the target object.
69
+ */
70
+ inspect(depth = 0, options = {}) {
71
+ const { output, inspectOptions } = this.compile(depth);
72
+ Object.assign(inspectOptions, options);
73
+ const result = inspect(output, options);
74
+ return result.replaceAll(/Object \[\w+] {/gm, (match) => {
75
+ match = match.substring(8, match.length - 3);
76
+ return `[${inspectOptions.colors ? colors.magenta(match) : match}] {`;
77
+ });
78
+ }
79
+ /**
80
+ * Compiles the output object and inspect options.
81
+ * Merges prototype chain options and applies filters to determine which properties to include.
82
+ */
83
+ compile(depth = 0) {
84
+ const output = Object.defineProperty({}, Symbol.toStringTag, {
85
+ value: this.target.constructor.name,
86
+ configurable: true
87
+ });
88
+ const options = this.mergePrototypeOptions();
89
+ const keys = new Set(options.keys);
90
+ if (options.autoAddBooleanKeys) {
91
+ const insBooleanValueKeys = Object.entries(this.target).filter(([_key, value]) => {
92
+ return typeof value === "boolean";
93
+ }).map(([key]) => {
94
+ return key;
95
+ });
96
+ const protoGetterKeys = getClassChain(this.target, {
97
+ includeSelf: false
98
+ }).map((cls) => {
99
+ return Object.getOwnPropertyNames(cls.prototype).filter((key) => {
100
+ return hasOwnProperty(Reflect.getOwnPropertyDescriptor(cls.prototype, key), "get");
101
+ });
102
+ }).flat(2);
103
+ const booleanKeys = insBooleanValueKeys.concat(protoGetterKeys).filter((key) => {
104
+ return /^(is|was|has|should)[A-Z]/.test(key);
105
+ });
106
+ booleanKeys.forEach((key) => {
107
+ return keys.add(key);
108
+ });
109
+ }
110
+ const ignoreFilters = Object.entries(options.ignoreValues).filter(([_name, enabled]) => {
111
+ return enabled;
112
+ }).map(([name]) => {
113
+ return ignoreValuesFilterDefaults[name];
114
+ });
115
+ const objectValues = [];
116
+ const arrayValues = [];
117
+ for (const key of keys) {
118
+ const value = this.target[key];
119
+ if (!ignoreFilters.every((filter) => {
120
+ return filter(value);
121
+ })) {
122
+ continue;
123
+ }
124
+ if (!options.filters.every((filter) => {
125
+ return filter.call(this.target, value, key, depth, output);
126
+ })) {
127
+ continue;
128
+ }
129
+ if (Array.isArray(value)) {
130
+ arrayValues.push(() => {
131
+ return defineValue(output, key, value);
132
+ });
133
+ } else if (isObjectLike(value)) {
134
+ objectValues.push(() => {
135
+ return defineValue(output, key, value);
136
+ });
137
+ } else {
138
+ defineValue(output, key, value);
139
+ }
140
+ }
141
+ objectValues.forEach((fn) => {
142
+ return fn();
143
+ });
144
+ arrayValues.forEach((fn) => {
145
+ return fn();
146
+ });
147
+ return {
148
+ output,
149
+ inspectOptions: options.inspect
150
+ };
151
+ }
152
+ /**
153
+ * Walks the prototype chain and merges Inspector options from all classes.
154
+ * Subclass options override superclass options following inheritance semantics.
155
+ */
156
+ mergePrototypeOptions() {
157
+ const defaults = this.getDefaults();
158
+ let inspectOptions = defaults.inspect;
159
+ const keys = new Set(defaults.keys);
160
+ let autoAddBooleanKeys = defaults.autoAddBooleanKeys;
161
+ const ignoreKeys = new Set(defaults.ignoreKeys);
162
+ const ignoreValues = defaults.ignoreValues;
163
+ const customFilters = defaults.filters;
164
+ const prototypeChainOptions = getClassChain(this.target.constructor, {
165
+ includeSelf: true
166
+ }).reverse().map((cls) => {
167
+ return cls.inspector ?? {};
168
+ });
169
+ for (const options of prototypeChainOptions) {
170
+ if (options.inspect) {
171
+ inspectOptions = {
172
+ ...inspectOptions,
173
+ ...options.inspect
174
+ };
175
+ }
176
+ options.keys?.forEach((elem) => {
177
+ return keys.add(elem);
178
+ });
179
+ if (options.autoAddBooleanKeys != null) {
180
+ autoAddBooleanKeys = options.autoAddBooleanKeys;
181
+ }
182
+ keys.forEach((elem) => {
183
+ return ignoreKeys.delete(elem);
184
+ });
185
+ options.ignoreKeys?.forEach((elem) => {
186
+ return ignoreKeys.add(elem);
187
+ });
188
+ ignoreKeys.forEach((elem) => {
189
+ return keys.delete(elem);
190
+ });
191
+ if (options.ignoreValues) {
192
+ Object.assign(ignoreValues, options.ignoreValues);
193
+ }
194
+ options.filters?.forEach((filter) => {
195
+ return customFilters.push(filter);
196
+ });
197
+ }
198
+ return {
199
+ inspect: inspectOptions,
200
+ ignoreValues,
201
+ autoAddBooleanKeys,
202
+ keys: Array.from(keys),
203
+ ignoreKeys: Array.from(ignoreKeys),
204
+ filters: customFilters
205
+ };
206
+ }
207
+ /**
208
+ * Returns a deep clone of the default Inspector options.
209
+ */
210
+ getDefaults() {
211
+ const filters = inspectorDefaults.filters.slice();
212
+ const rest = cloneDeep(omit(inspectorDefaults, "filters"));
213
+ return {
214
+ ...rest,
215
+ filters
216
+ };
217
+ }
218
+ }
219
+
220
+ export { Inspector };
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ const ignoreValuesDefaults = {
4
+ noEmptyArray: true,
5
+ noEmptyObject: true,
6
+ noNull: true,
7
+ noUndefined: true,
8
+ noFalse: false
9
+ };
10
+
11
+ exports.ignoreValuesDefaults = ignoreValuesDefaults;
@@ -0,0 +1,11 @@
1
+ import { a as IgnoreValuesOptions } from '../../Inspector-CrOT_QD4.cjs';
2
+ import 'util';
3
+ import '../../View.cjs';
4
+ import '../../IView.cjs';
5
+
6
+ /**
7
+ * Default options for ignoring specific values during object inspection.
8
+ */
9
+ declare const ignoreValuesDefaults: IgnoreValuesOptions;
10
+
11
+ export { ignoreValuesDefaults };
@@ -0,0 +1,11 @@
1
+ import { a as IgnoreValuesOptions } from '../../Inspector-DAN0uRqw.js';
2
+ import 'util';
3
+ import '../../View.js';
4
+ import '../../IView.js';
5
+
6
+ /**
7
+ * Default options for ignoring specific values during object inspection.
8
+ */
9
+ declare const ignoreValuesDefaults: IgnoreValuesOptions;
10
+
11
+ export { ignoreValuesDefaults };
@@ -0,0 +1,11 @@
1
+ import '../../chunk-SHUYVCID.js';
2
+
3
+ const ignoreValuesDefaults = {
4
+ noEmptyArray: true,
5
+ noEmptyObject: true,
6
+ noNull: true,
7
+ noUndefined: true,
8
+ noFalse: false
9
+ };
10
+
11
+ export { ignoreValuesDefaults };
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
+ const ignoreValuesFilterDefaults = {
6
+ noFalse: /* @__PURE__ */ __name((value) => {
7
+ return value !== false;
8
+ }, "noFalse"),
9
+ noNull: /* @__PURE__ */ __name((value) => {
10
+ return value !== null;
11
+ }, "noNull"),
12
+ noUndefined: /* @__PURE__ */ __name((value) => {
13
+ return value !== void 0;
14
+ }, "noUndefined"),
15
+ noEmptyArray: /* @__PURE__ */ __name((value) => {
16
+ return !Array.isArray(value) || !!value.length;
17
+ }, "noEmptyArray"),
18
+ noEmptyObject: /* @__PURE__ */ __name((value) => {
19
+ return !value || typeof value !== "object" || Array.isArray(value) || !!Object.keys(value).length;
20
+ }, "noEmptyObject")
21
+ };
22
+
23
+ exports.ignoreValuesFilterDefaults = ignoreValuesFilterDefaults;
@@ -0,0 +1,11 @@
1
+ import { a as IgnoreValuesOptions } from '../../Inspector-CrOT_QD4.cjs';
2
+ import 'util';
3
+ import '../../View.cjs';
4
+ import '../../IView.cjs';
5
+
6
+ /**
7
+ * Default filter functions for ignoring values during object inspection.
8
+ */
9
+ declare const ignoreValuesFilterDefaults: Record<keyof IgnoreValuesOptions, (value: unknown) => boolean>;
10
+
11
+ export { ignoreValuesFilterDefaults };
@@ -0,0 +1,11 @@
1
+ import { a as IgnoreValuesOptions } from '../../Inspector-DAN0uRqw.js';
2
+ import 'util';
3
+ import '../../View.js';
4
+ import '../../IView.js';
5
+
6
+ /**
7
+ * Default filter functions for ignoring values during object inspection.
8
+ */
9
+ declare const ignoreValuesFilterDefaults: Record<keyof IgnoreValuesOptions, (value: unknown) => boolean>;
10
+
11
+ export { ignoreValuesFilterDefaults };
@@ -0,0 +1,21 @@
1
+ import { __name } from '../../chunk-SHUYVCID.js';
2
+
3
+ const ignoreValuesFilterDefaults = {
4
+ noFalse: /* @__PURE__ */ __name((value) => {
5
+ return value !== false;
6
+ }, "noFalse"),
7
+ noNull: /* @__PURE__ */ __name((value) => {
8
+ return value !== null;
9
+ }, "noNull"),
10
+ noUndefined: /* @__PURE__ */ __name((value) => {
11
+ return value !== void 0;
12
+ }, "noUndefined"),
13
+ noEmptyArray: /* @__PURE__ */ __name((value) => {
14
+ return !Array.isArray(value) || !!value.length;
15
+ }, "noEmptyArray"),
16
+ noEmptyObject: /* @__PURE__ */ __name((value) => {
17
+ return !value || typeof value !== "object" || Array.isArray(value) || !!Object.keys(value).length;
18
+ }, "noEmptyObject")
19
+ };
20
+
21
+ export { ignoreValuesFilterDefaults };
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var util = require('util');
4
+
5
+ const inspectDefaults = {
6
+ ...util.inspect.defaultOptions,
7
+ customInspect: true,
8
+ maxStringLength: 500,
9
+ maxArrayLength: 200,
10
+ breakLength: 100,
11
+ colors: true,
12
+ depth: 100,
13
+ compact: false,
14
+ numericSeparator: true
15
+ };
16
+
17
+ exports.inspectDefaults = inspectDefaults;
@@ -0,0 +1,8 @@
1
+ import { InspectOptions } from 'util';
2
+
3
+ /**
4
+ * Default options for Node.js util.inspect with enhanced settings for better debugging output.
5
+ */
6
+ declare const inspectDefaults: InspectOptions;
7
+
8
+ export { inspectDefaults };
@@ -0,0 +1,8 @@
1
+ import { InspectOptions } from 'util';
2
+
3
+ /**
4
+ * Default options for Node.js util.inspect with enhanced settings for better debugging output.
5
+ */
6
+ declare const inspectDefaults: InspectOptions;
7
+
8
+ export { inspectDefaults };
@@ -0,0 +1,16 @@
1
+ import '../../chunk-SHUYVCID.js';
2
+ import { inspect } from 'util';
3
+
4
+ const inspectDefaults = {
5
+ ...inspect.defaultOptions,
6
+ customInspect: true,
7
+ maxStringLength: 500,
8
+ maxArrayLength: 200,
9
+ breakLength: 100,
10
+ colors: true,
11
+ depth: 100,
12
+ compact: false,
13
+ numericSeparator: true
14
+ };
15
+
16
+ export { inspectDefaults };
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ var ignoreValuesDefaults = require('./ignoreValuesDefaults');
4
+ var inspectDefaults = require('./inspectDefaults');
5
+
6
+ const inspectorDefaults = {
7
+ inspect: inspectDefaults.inspectDefaults,
8
+ ignoreValues: ignoreValuesDefaults.ignoreValuesDefaults,
9
+ keys: [],
10
+ autoAddBooleanKeys: false,
11
+ ignoreKeys: [],
12
+ filters: []
13
+ };
14
+
15
+ exports.inspectorDefaults = inspectorDefaults;
@@ -0,0 +1,11 @@
1
+ import { d as InspectorOptions } from '../../Inspector-CrOT_QD4.cjs';
2
+ import 'util';
3
+ import '../../View.cjs';
4
+ import '../../IView.cjs';
5
+
6
+ /**
7
+ * The default inspector configuration options.
8
+ */
9
+ declare const inspectorDefaults: Required<InspectorOptions>;
10
+
11
+ export { inspectorDefaults };
@@ -0,0 +1,11 @@
1
+ import { d as InspectorOptions } from '../../Inspector-DAN0uRqw.js';
2
+ import 'util';
3
+ import '../../View.js';
4
+ import '../../IView.js';
5
+
6
+ /**
7
+ * The default inspector configuration options.
8
+ */
9
+ declare const inspectorDefaults: Required<InspectorOptions>;
10
+
11
+ export { inspectorDefaults };