@cleanweb/oore 2.0.0-alpha.16 → 2.0.0-alpha.18

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 (98) hide show
  1. package/build/_cjs/base/index.d.ts +3 -0
  2. package/build/_cjs/base/index.js +19 -0
  3. package/build/_cjs/base/merged-state.d.ts +20 -0
  4. package/build/_cjs/base/merged-state.js +61 -0
  5. package/build/_cjs/base/methods.d.ts +58 -0
  6. package/build/_cjs/base/methods.js +95 -0
  7. package/build/_cjs/base/state/class-types.d.ts +20 -0
  8. package/build/_cjs/base/state/class-types.js +2 -0
  9. package/build/_cjs/base/state/class.d.ts +69 -0
  10. package/build/_cjs/base/state/class.js +129 -0
  11. package/build/_cjs/base/state/hook-types.d.ts +32 -0
  12. package/build/_cjs/base/state/hook-types.js +2 -0
  13. package/build/_cjs/base/state/hooks.d.ts +12 -0
  14. package/build/_cjs/base/state/hooks.js +41 -0
  15. package/build/_cjs/base/state/index.d.ts +9 -0
  16. package/build/_cjs/base/state/index.js +35 -0
  17. package/build/_cjs/classy/class/index.d.ts +128 -0
  18. package/build/_cjs/classy/class/index.js +174 -0
  19. package/build/_cjs/classy/class/types/extractor.d.ts +5 -0
  20. package/build/_cjs/classy/class/types/extractor.js +2 -0
  21. package/build/_cjs/classy/class/utils/function-name.d.ts +2 -0
  22. package/build/_cjs/classy/class/utils/function-name.js +17 -0
  23. package/build/_cjs/classy/index.d.ts +3 -0
  24. package/build/_cjs/classy/index.js +19 -0
  25. package/build/_cjs/classy/instance/index.d.ts +144 -0
  26. package/build/_cjs/classy/instance/index.js +177 -0
  27. package/build/_cjs/classy/instance/mount-callbacks.d.ts +5 -0
  28. package/build/_cjs/classy/instance/mount-callbacks.js +30 -0
  29. package/build/_cjs/classy/instance/types/hook.d.ts +13 -0
  30. package/build/_cjs/classy/instance/types/hook.js +2 -0
  31. package/build/_cjs/classy/logic/index.d.ts +116 -0
  32. package/build/_cjs/classy/logic/index.js +123 -0
  33. package/build/_cjs/classy/logic/types/hook.d.ts +16 -0
  34. package/build/_cjs/classy/logic/types/hook.js +2 -0
  35. package/build/_cjs/docs-src/api/base-classes.d.ts +3 -0
  36. package/build/_cjs/docs-src/api/base-classes.js +9 -0
  37. package/build/_cjs/docs-src/api/index.d.ts +13 -0
  38. package/build/_cjs/docs-src/api/index.js +44 -0
  39. package/build/_cjs/docs-src/api/references.d.ts +5 -0
  40. package/build/_cjs/docs-src/api/references.js +31 -0
  41. package/build/_cjs/helpers/errors.d.ts +10 -0
  42. package/build/_cjs/helpers/errors.js +21 -0
  43. package/build/_cjs/helpers/index.d.ts +13 -0
  44. package/build/_cjs/helpers/index.js +31 -0
  45. package/build/_cjs/helpers/mount-state.d.ts +5 -0
  46. package/build/_cjs/helpers/mount-state.js +25 -0
  47. package/build/_cjs/helpers/rerender.d.ts +24 -0
  48. package/build/_cjs/helpers/rerender.js +42 -0
  49. package/build/_cjs/helpers/type-guards.d.ts +1 -0
  50. package/build/_cjs/helpers/type-guards.js +8 -0
  51. package/build/_cjs/helpers/use-component/index.d.ts +6 -0
  52. package/build/_cjs/helpers/use-component/index.js +17 -0
  53. package/build/_cjs/helpers/use-component/types.d.ts +22 -0
  54. package/build/_cjs/helpers/use-component/types.js +2 -0
  55. package/build/_cjs/index.d.ts +3 -0
  56. package/build/_cjs/index.js +19 -0
  57. package/build/_cjs/slots/hook.d.ts +20 -0
  58. package/build/_cjs/slots/hook.js +143 -0
  59. package/build/_cjs/slots/index.d.ts +1 -0
  60. package/build/_cjs/slots/index.js +17 -0
  61. package/build/_cjs/slots/types.d.ts +131 -0
  62. package/build/_cjs/slots/types.js +2 -0
  63. package/build/base/index.js +19 -3
  64. package/build/base/merged-state.js +35 -54
  65. package/build/base/methods.js +23 -25
  66. package/build/base/state/class-types.js +2 -1
  67. package/build/base/state/class.js +49 -69
  68. package/build/base/state/hook-types.js +2 -1
  69. package/build/base/state/hooks.js +12 -12
  70. package/build/base/state/index.js +32 -4
  71. package/build/classy/class/index.js +89 -109
  72. package/build/classy/class/types/extractor.js +2 -1
  73. package/build/classy/class/utils/function-name.js +5 -1
  74. package/build/classy/index.js +19 -3
  75. package/build/classy/instance/index.js +62 -84
  76. package/build/classy/instance/mount-callbacks.js +12 -8
  77. package/build/classy/instance/types/hook.js +2 -1
  78. package/build/classy/logic/index.js +27 -28
  79. package/build/classy/logic/types/hook.js +2 -1
  80. package/build/docs-src/api/base-classes.js +9 -3
  81. package/build/docs-src/api/index.js +39 -8
  82. package/build/docs-src/api/references.js +31 -5
  83. package/build/globals.d.ts +130 -83
  84. package/build/helpers/errors.js +5 -1
  85. package/build/helpers/index.js +23 -5
  86. package/build/helpers/mount-state.js +10 -6
  87. package/build/helpers/rerender.js +16 -12
  88. package/build/helpers/type-guards.js +6 -2
  89. package/build/helpers/use-component/index.js +9 -5
  90. package/build/helpers/use-component/types.js +2 -1
  91. package/build/index.d.ts +0 -1
  92. package/build/index.js +19 -3
  93. package/build/slots/hook.js +58 -36
  94. package/build/slots/index.js +17 -1
  95. package/build/slots/types.js +2 -1
  96. package/build/tsconfig.json +5 -6
  97. package/package.json +31 -12
  98. package/build/globals.js +0 -3
@@ -1,22 +1,10 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- import { useEffect } from 'react';
17
- import { ComponentLogic, useLogic } from '../../classy/logic';
18
- import { useMountCallbacks } from './mount-callbacks';
19
- import { noOp } from '../../helpers';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useInstance = exports.ComponentInstance = void 0;
4
+ const react_1 = require("react");
5
+ const logic_1 = require("../../classy/logic");
6
+ const mount_callbacks_1 = require("./mount-callbacks");
7
+ const helpers_1 = require("../../helpers");
20
8
  /**
21
9
  * A superset of {@link ComponentLogic} that adds support for lifecycle methods.
22
10
  * This provides a declarative API for working with your React function component's lifecycle,
@@ -24,10 +12,9 @@ import { noOp } from '../../helpers';
24
12
  *
25
13
  * @see https://github.com/cleanjsweb/neat-react#lifecycle-useinstance
26
14
  */
27
- var ComponentInstance = /** @class */ (function (_super) {
28
- __extends(ComponentInstance, _super);
29
- function ComponentInstance() {
30
- var _this = _super !== null && _super.apply(this, arguments) || this;
15
+ class ComponentInstance extends logic_1.ComponentLogic {
16
+ constructor() {
17
+ super(...arguments);
31
18
  /**
32
19
  * Runs only _before_ the first render,
33
20
  * i.e before the component instance is mounted.
@@ -38,7 +25,7 @@ var ComponentInstance = /** @class */ (function (_super) {
38
25
  * PS: You can conditionally update state from here, but with certain caveats.
39
26
  * {@link https://react.dev/reference/react/useState#storing-information-from-previous-renders | See the React docs for details}.
40
27
  */
41
- _this.beforeMount = function () { };
28
+ this.beforeMount = () => { };
42
29
  /**
43
30
  * Runs only **_after_** the first render, i.e after the component instance is mounted.
44
31
  * It is ignored on subsequent rerenders.
@@ -50,7 +37,7 @@ var ComponentInstance = /** @class */ (function (_super) {
50
37
  *
51
38
  * Uses `useEffect()` under the hood.
52
39
  */
53
- _this.onMount = function () { return noOp; };
40
+ this.onMount = () => helpers_1.noOp;
54
41
  /**
55
42
  * Runs _before_ every render cycle, including the first.
56
43
  * Useful for logic that is involved in determining what to render.
@@ -66,7 +53,7 @@ var ComponentInstance = /** @class */ (function (_super) {
66
53
  * PS: You can conditionally update state from here, but with certain caveats.
67
54
  * {@link https://react.dev/reference/react/useState#storing-information-from-previous-renders | See the React docs for details}.
68
55
  */
69
- _this.beforeRender = function () { return ({}); };
56
+ this.beforeRender = () => ({});
70
57
  /**
71
58
  * Runs **_after_** every render cycle, including the first.
72
59
  *
@@ -77,56 +64,50 @@ var ComponentInstance = /** @class */ (function (_super) {
77
64
  *
78
65
  * @returns A cleanup function.
79
66
  */
80
- _this.onRender = function () { return noOp; };
67
+ this.onRender = () => helpers_1.noOp;
81
68
  /**
82
69
  * Runs when the component is unmounted.
83
70
  * It is called _after_ the cleanup function returned by onMount.
84
71
  */
85
- _this.cleanUp = function () { };
86
- return _this;
72
+ this.cleanUp = () => { };
87
73
  }
88
- Object.defineProperty(ComponentInstance.prototype, "templateContext", {
89
- /**
90
- * Exposes the object returned by {@link beforeRender}.
91
- *
92
- * This is useful when you need to render some state or props
93
- * in a transformed format. Put the transformation logic
94
- * in {@link beforeRender} to the keep the main
95
- * function component body clean.
96
- *
97
- * ******
98
- *
99
- * @example <caption>Using `templateContext`.</caption>
100
- *
101
- * ```tsx
102
- * class MyComponentLogic extends ComponentInstance {
103
- * beforeRender = () => {
104
- * const title = `My Site | ${this.props.title}`;
105
- * return { title };
106
- * }
107
- * }
108
- * const MyComponent = (props) => {
109
- * const self = useInstance(MyComponentLogic, props);
110
- * const { templateContext: ctx, state } = self;
111
- *
112
- * return (
113
- * <h1>
114
- * {ctx.title}
115
- * </h1>
116
- * <p>{props.description}</p>
117
- * );
118
- * }
119
- * ```
120
- */
121
- get: function () {
122
- return this._templateContext;
123
- },
124
- enumerable: false,
125
- configurable: true
126
- });
127
- return ComponentInstance;
128
- }(ComponentLogic));
129
- export { ComponentInstance };
74
+ /**
75
+ * Exposes the object returned by {@link beforeRender}.
76
+ *
77
+ * This is useful when you need to render some state or props
78
+ * in a transformed format. Put the transformation logic
79
+ * in {@link beforeRender} to the keep the main
80
+ * function component body clean.
81
+ *
82
+ * ******
83
+ *
84
+ * @example <caption>Using `templateContext`.</caption>
85
+ *
86
+ * ```tsx
87
+ * class MyComponentLogic extends ComponentInstance {
88
+ * beforeRender = () => {
89
+ * const title = `My Site | ${this.props.title}`;
90
+ * return { title };
91
+ * }
92
+ * }
93
+ * const MyComponent = (props) => {
94
+ * const self = useInstance(MyComponentLogic, props);
95
+ * const { templateContext: ctx, state } = self;
96
+ *
97
+ * return (
98
+ * <h1>
99
+ * {ctx.title}
100
+ * </h1>
101
+ * <p>{props.description}</p>
102
+ * );
103
+ * }
104
+ * ```
105
+ */
106
+ get templateContext() {
107
+ return this._templateContext;
108
+ }
109
+ }
110
+ exports.ComponentInstance = ComponentInstance;
130
111
  ;
131
112
  /**
132
113
  * Enables full separation of concerns between a React component's template
@@ -141,39 +122,36 @@ export { ComponentInstance };
141
122
  *
142
123
  * The provided class should be a subclass of {@link ComponentInstance}.
143
124
  */
144
- export var useInstance = function () {
125
+ const useInstance = (...args) => {
145
126
  var _a;
146
- var args = [];
147
- for (var _i = 0; _i < arguments.length; _i++) {
148
- args[_i] = arguments[_i];
149
- }
150
- var Component = args[0], _b = args[1], props = _b === void 0 ? {} : _b;
127
+ const [Component, props = {}] = args;
151
128
  // useHooks.
152
- var instance = useLogic(Component, props);
129
+ const instance = (0, logic_1.useLogic)(Component, props);
153
130
  // beforeMount, onMount, cleanUp.
154
- useMountCallbacks(instance);
131
+ (0, mount_callbacks_1.useMountCallbacks)(instance);
155
132
  // beforeRender.
156
133
  /**
157
134
  * A proxy variable to allow typechecking of the assignment
158
135
  * to `self.templateContext` despite the need for "readonly" error suppression.
159
136
  */
160
- var _templateContextProxy_;
137
+ let _templateContextProxy_;
161
138
  // @ts-expect-error Assigning to a readonly property.
162
139
  instance._templateContext = (_templateContextProxy_ = (_a = instance.beforeRender) === null || _a === void 0 ? void 0 : _a.call(instance));
163
140
  // onRender.
164
- useEffect(function () {
141
+ (0, react_1.useEffect)(() => {
165
142
  var _a;
166
- var cleanupAfterRerender = (_a = instance.onRender) === null || _a === void 0 ? void 0 : _a.call(instance);
167
- return function () {
143
+ const cleanupAfterRerender = (_a = instance.onRender) === null || _a === void 0 ? void 0 : _a.call(instance);
144
+ return () => {
168
145
  if (typeof cleanupAfterRerender === 'function')
169
146
  cleanupAfterRerender();
170
147
  else
171
- cleanupAfterRerender === null || cleanupAfterRerender === void 0 ? void 0 : cleanupAfterRerender.then(function (cleanUp) { return cleanUp === null || cleanUp === void 0 ? void 0 : cleanUp(); });
148
+ cleanupAfterRerender === null || cleanupAfterRerender === void 0 ? void 0 : cleanupAfterRerender.then((cleanUp) => cleanUp === null || cleanUp === void 0 ? void 0 : cleanUp());
172
149
  };
173
150
  });
174
151
  // class FormValues<TValues> extends BrowserMemStore<TValues> {}
175
152
  return instance;
176
153
  };
154
+ exports.useInstance = useInstance;
177
155
  /** /
178
156
  testing: {
179
157
  class A extends ComponentInstance<EmptyObject> {
@@ -1,16 +1,19 @@
1
- import { useEffect } from 'react';
2
- import { useMountState } from '../../helpers/mount-state';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useMountCallbacks = void 0;
4
+ const react_1 = require("react");
5
+ const mount_state_1 = require("../../helpers/mount-state");
3
6
  /** @internal */
4
- export var useMountCallbacks = function (instance) {
7
+ const useMountCallbacks = (instance) => {
5
8
  var _a;
6
- var isMounted = useMountState();
9
+ const isMounted = (0, mount_state_1.useMountState)();
7
10
  if (!isMounted())
8
11
  (_a = instance.beforeMount) === null || _a === void 0 ? void 0 : _a.call(instance);
9
- useEffect(function () {
12
+ (0, react_1.useEffect)(() => {
10
13
  var _a;
11
- var mountHandlerCleanUp = (_a = instance.onMount) === null || _a === void 0 ? void 0 : _a.call(instance);
12
- return function () {
13
- var doCleanUp = function (runMountCleaners) {
14
+ const mountHandlerCleanUp = (_a = instance.onMount) === null || _a === void 0 ? void 0 : _a.call(instance);
15
+ return () => {
16
+ const doCleanUp = (runMountCleaners) => {
14
17
  var _a;
15
18
  runMountCleaners === null || runMountCleaners === void 0 ? void 0 : runMountCleaners();
16
19
  (_a = instance.cleanUp) === null || _a === void 0 ? void 0 : _a.call(instance);
@@ -24,3 +27,4 @@ export var useMountCallbacks = function (instance) {
24
27
  };
25
28
  }, []);
26
29
  };
30
+ exports.useMountCallbacks = useMountCallbacks;
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,8 @@
1
- import { useMemo, useRef } from 'react';
2
- import { useCleanState } from '../../base/state';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useLogic = exports.ComponentLogic = void 0;
4
+ const react_1 = require("react");
5
+ const state_1 = require("../../base/state");
3
6
  /**
4
7
  * Base class for a class that holds methods to be used in a function component.
5
8
  *
@@ -13,14 +16,14 @@ import { useCleanState } from '../../base/state';
13
16
  *
14
17
  * @typeParam TProps - {@include ./types/tprops.md}
15
18
  */
16
- var ComponentLogic = /** @class */ (function () {
17
- function ComponentLogic() {
19
+ class ComponentLogic {
20
+ constructor() {
18
21
  /**
19
22
  * Called before each instance of your component is mounted.
20
23
  * It receives the initial `props` object and should return
21
24
  * an object with the initial values for your component's state.
22
25
  */
23
- this.getInitialState = function (props) { return ({}); };
26
+ this.getInitialState = (props) => ({});
24
27
  /**
25
28
  * Call React hooks from here. If your component needs
26
29
  * access to values return from the hooks you call,
@@ -29,7 +32,7 @@ var ComponentLogic = /** @class */ (function () {
29
32
  * The returned object will be accessible as {@link hooks | `this.hooks`} within
30
33
  * your component class.
31
34
  */
32
- this.useHooks = function () { };
35
+ this.useHooks = () => { };
33
36
  /**
34
37
  * Persist class members during HMR. {@include ./hrm-preserve-keys.md}
35
38
  * @privateRemarks
@@ -37,9 +40,8 @@ var ComponentLogic = /** @class */ (function () {
37
40
  */
38
41
  this._hmrPreserveKeys = [];
39
42
  }
40
- return ComponentLogic;
41
- }());
42
- export { ComponentLogic };
43
+ }
44
+ exports.ComponentLogic = ComponentLogic;
43
45
  ;
44
46
  /**
45
47
  * Returns an instance of the provided class, which holds methods for your component and
@@ -49,49 +51,46 @@ export { ComponentLogic };
49
51
  *
50
52
  * @see https://cleanjsweb.github.io/neat-react/functions/API.useLogic.html
51
53
  */
52
- export var useLogic = function () {
54
+ const useLogic = (...args) => {
53
55
  var _a;
54
- var args = [];
55
- for (var _i = 0; _i < arguments.length; _i++) {
56
- args[_i] = arguments[_i];
57
- }
58
- var Logic = args[0], _b = args[1], props = _b === void 0 ? {} : _b;
56
+ const [Logic, props = {}] = args;
59
57
  // In production, we only use the latestInstance the first time, and it's ignored every other time.
60
58
  // This means changing the class at runtime will have no effect in production.
61
59
  // latestInstance is only extracted into a separate variable for use in dev mode during HMR.
62
- var latestInstance = useMemo(function () { return new Logic(); }, [Logic]);
60
+ const latestInstance = (0, react_1.useMemo)(() => new Logic(), [Logic]);
63
61
  // const latestInstance = useMemo(() => new Logic(), []);
64
- var instanceRef = useRef(latestInstance);
65
- var refreshState = function () {
62
+ const instanceRef = (0, react_1.useRef)(latestInstance);
63
+ const refreshState = () => {
66
64
  var _a;
67
65
  // @ts-expect-error
68
66
  instanceRef.current.props = props;
69
67
  // @ts-expect-error
70
- instanceRef.current.state = useCleanState(instanceRef.current.getInitialState, props);
68
+ instanceRef.current.state = (0, state_1.useCleanState)(instanceRef.current.getInitialState, props);
71
69
  // @ts-expect-error
72
70
  instanceRef.current.hooks = (_a = instanceRef.current.useHooks()) !== null && _a !== void 0 ? _a : {};
73
71
  };
74
72
  if (process.env.NODE_ENV === 'development' && instanceRef.current !== latestInstance) {
75
- var oldInstance_1 = instanceRef.current;
76
- latestInstance._hmrPreserveKeys.forEach(function (_key) {
77
- var key = _key;
73
+ const oldInstance = instanceRef.current;
74
+ latestInstance._hmrPreserveKeys.forEach((_key) => {
75
+ const key = _key;
78
76
  // @ts-expect-error We're assigning to readonly properties. Also, Typescript doesn't know that the type of the left and right side will always match, due to the dynamic access.
79
- latestInstance[key] = oldInstance_1[key];
77
+ latestInstance[key] = oldInstance[key];
80
78
  });
81
- Reflect.ownKeys(oldInstance_1).forEach(function (_key) {
82
- var key = _key;
83
- delete oldInstance_1[key];
79
+ Reflect.ownKeys(oldInstance).forEach((_key) => {
80
+ const key = _key;
81
+ delete oldInstance[key];
84
82
  });
85
- Object.setPrototypeOf(oldInstance_1, latestInstance);
83
+ Object.setPrototypeOf(oldInstance, latestInstance);
86
84
  instanceRef.current = latestInstance;
87
85
  refreshState();
88
- (_a = latestInstance._onHmrUpdate) === null || _a === void 0 ? void 0 : _a.call(latestInstance, oldInstance_1);
86
+ (_a = latestInstance._onHmrUpdate) === null || _a === void 0 ? void 0 : _a.call(latestInstance, oldInstance);
89
87
  }
90
88
  else
91
89
  refreshState();
92
90
  return instanceRef.current;
93
91
  ;
94
92
  };
93
+ exports.useLogic = useLogic;
95
94
  /** /
96
95
  testing: {
97
96
  const a: object = {b: ''};
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,9 @@
1
- export { ComponentMethods } from '../../base/methods';
2
- export { ComponentLogic } from '../../classy/logic';
3
- export { ComponentInstance } from '../../classy/instance';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ComponentInstance = exports.ComponentLogic = exports.ComponentMethods = void 0;
4
+ var methods_1 = require("../../base/methods");
5
+ Object.defineProperty(exports, "ComponentMethods", { enumerable: true, get: function () { return methods_1.ComponentMethods; } });
6
+ var logic_1 = require("../../classy/logic");
7
+ Object.defineProperty(exports, "ComponentLogic", { enumerable: true, get: function () { return logic_1.ComponentLogic; } });
8
+ var instance_1 = require("../../classy/instance");
9
+ Object.defineProperty(exports, "ComponentInstance", { enumerable: true, get: function () { return instance_1.ComponentInstance; } });
@@ -1,13 +1,44 @@
1
+ "use strict";
1
2
  /**
2
3
  * API Reference
3
4
  * @module API
4
5
  */
5
- export { useCleanState } from '../../base/state';
6
- export { useMethods } from '../../base/methods';
7
- export { useLogic } from '../../classy/logic';
8
- export { useInstance } from '../../classy/instance';
9
- export { ClassComponent } from '../../classy/class';
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || function (mod) {
23
+ if (mod && mod.__esModule) return mod;
24
+ var result = {};
25
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
+ __setModuleDefault(result, mod);
27
+ return result;
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ exports.References = exports.Helpers = exports.BaseClasses = exports.ClassComponent = exports.useInstance = exports.useLogic = exports.useMethods = exports.useCleanState = void 0;
31
+ var state_1 = require("../../base/state");
32
+ Object.defineProperty(exports, "useCleanState", { enumerable: true, get: function () { return state_1.useCleanState; } });
33
+ var methods_1 = require("../../base/methods");
34
+ Object.defineProperty(exports, "useMethods", { enumerable: true, get: function () { return methods_1.useMethods; } });
35
+ var logic_1 = require("../../classy/logic");
36
+ Object.defineProperty(exports, "useLogic", { enumerable: true, get: function () { return logic_1.useLogic; } });
37
+ var instance_1 = require("../../classy/instance");
38
+ Object.defineProperty(exports, "useInstance", { enumerable: true, get: function () { return instance_1.useInstance; } });
39
+ var class_1 = require("../../classy/class");
40
+ Object.defineProperty(exports, "ClassComponent", { enumerable: true, get: function () { return class_1.ClassComponent; } });
10
41
  /** @namespace */
11
- export * as BaseClasses from './base-classes';
12
- export * as Helpers from '../../helpers';
13
- export * as References from './references';
42
+ exports.BaseClasses = __importStar(require("./base-classes"));
43
+ exports.Helpers = __importStar(require("../../helpers"));
44
+ exports.References = __importStar(require("./references"));
@@ -1,5 +1,31 @@
1
- export * as $CleanState from '../../base/state';
2
- export * as $ComponentMethods from '../../base/methods';
3
- export * as ComponentLogic from '../../classy/logic';
4
- export * as ComponentInstance from '../../classy/instance';
5
- export * as ClassComponent from '../../classy/class';
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.ClassComponent = exports.ComponentInstance = exports.ComponentLogic = exports.$ComponentMethods = exports.$CleanState = void 0;
27
+ exports.$CleanState = __importStar(require("../../base/state"));
28
+ exports.$ComponentMethods = __importStar(require("../../base/methods"));
29
+ exports.ComponentLogic = __importStar(require("../../classy/logic"));
30
+ exports.ComponentInstance = __importStar(require("../../classy/instance"));
31
+ exports.ClassComponent = __importStar(require("../../classy/class"));