@cleanweb/react 1.0.5 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ declare class MergedState<TState extends object> {
2
+ static useRefresh<TState extends object>(this: MergedState<TState>): void;
3
+ reservedKeys: string[];
4
+ valueKeys: string[];
5
+ private _initialValues_;
6
+ private _values_;
7
+ private setState;
8
+ private _setters_;
9
+ get put(): { [Key in keyof TState]: (value: TState[Key]) => void; };
10
+ get initialState(): TState;
11
+ constructor(initialState: TState);
12
+ putMany: (newValues: Partial<TState>) => void;
13
+ }
14
+ export declare const useMergedState: <TState extends object>(initialState: TState) => MergedState<TState> & TState;
15
+ export {};
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.useMergedState = void 0;
15
+ var react_1 = require("react");
16
+ var MergedState = /** @class */ (function () {
17
+ function MergedState(initialState) {
18
+ var _this = this;
19
+ this._initialValues_ = {};
20
+ this._values_ = {};
21
+ this._setters_ = {};
22
+ this.putMany = function (newValues) {
23
+ _this.setState(__assign(__assign({}, _this._values_), newValues));
24
+ };
25
+ this.reservedKeys = Object.keys(this);
26
+ this.valueKeys = [];
27
+ this._initialValues_ = __assign({}, initialState);
28
+ this._values_ = __assign({}, initialState);
29
+ Object.keys(initialState).forEach(function (key) {
30
+ if (_this.reservedKeys.includes(key)) {
31
+ throw new Error("The name \"".concat(key, "\" is reserved by CleanState and cannot be used to index state variables. Please use a different key."));
32
+ }
33
+ _this.valueKeys.push(key);
34
+ _this._setters_[key] = function (value) {
35
+ var _a;
36
+ // this._values_[key] = value;
37
+ _this.setState(__assign(__assign({}, _this._values_), (_a = {}, _a[key] = value, _a)));
38
+ };
39
+ var self = _this;
40
+ Object.defineProperty(_this, key, {
41
+ get: function () {
42
+ return self._values_[key];
43
+ },
44
+ set: function (value) {
45
+ self._setters_[key](value);
46
+ },
47
+ enumerable: true,
48
+ });
49
+ });
50
+ }
51
+ MergedState.useRefresh = function () {
52
+ var _a;
53
+ _a = (0, react_1.useState)(this.initialState), this._values_ = _a[0], this.setState = _a[1];
54
+ };
55
+ Object.defineProperty(MergedState.prototype, "put", {
56
+ get: function () {
57
+ return __assign({}, this._setters_);
58
+ },
59
+ enumerable: false,
60
+ configurable: true
61
+ });
62
+ Object.defineProperty(MergedState.prototype, "initialState", {
63
+ get: function () {
64
+ return __assign({}, this._initialValues_);
65
+ },
66
+ enumerable: false,
67
+ configurable: true
68
+ });
69
+ return MergedState;
70
+ }());
71
+ var useMergedState = function (initialState) {
72
+ var cleanState = (0, react_1.useMemo)(function () { return new MergedState(initialState); }, []);
73
+ MergedState.useRefresh.call(cleanState);
74
+ return cleanState;
75
+ };
76
+ exports.useMergedState = useMergedState;
@@ -1,6 +1,6 @@
1
- import type { CleanState } from './state';
1
+ import type { TCleanState } from './state';
2
2
  export declare class ComponentMethods<TState extends object, TProps extends object> {
3
- state: CleanState<TState>;
3
+ state: TCleanState<TState>;
4
4
  props: TProps;
5
5
  }
6
6
  type ComponentMethodsConstructor = typeof ComponentMethods<any, any>;
@@ -1,22 +1,20 @@
1
- type TUseStateArray<TState extends object> = [
2
- val: TState[keyof TState],
3
- setter: (val: TState[keyof TState]) => void
4
- ];
5
- type TUseStateResponses<TState extends object> = {
6
- [Key in keyof TState]: TUseStateArray<TState>;
7
- };
8
- declare class _CleanState_<TState extends object> {
1
+ declare class CleanStateBase<TState extends object> {
2
+ reservedKeys: string[];
3
+ valueKeys: string[];
9
4
  private _values_;
5
+ private _initialValues_;
10
6
  private _setters_;
11
- put: { [Key in keyof TState]: (value: TState[Key]) => void; };
12
- constructor(stateAndSetters: TUseStateResponses<TState>);
7
+ constructor(initialState: TState);
8
+ static update: <TState_1 extends object>(this: CleanStateBase<TState_1>) => void;
9
+ get put(): { [Key in keyof TState]: (value: TState[Key]) => void; };
10
+ get initialState(): TState;
13
11
  putMany: (newValues: Partial<TState>) => void;
14
12
  }
15
- type TCleanStateInstance<TState extends object> = TState & _CleanState_<TState>;
16
- declare const _CleanState: new <TState extends object>(...args: ConstructorParameters<typeof _CleanState_>) => TCleanStateInstance<TState>;
17
- export type CleanState<TState extends object> = InstanceType<typeof _CleanState<TState>>;
13
+ type TCleanStateInstance<TState extends object> = TState & CleanStateBase<TState>;
14
+ export type TCleanState<TState extends object> = TCleanStateInstance<TState>;
18
15
  type Func = (...params: any[]) => any;
19
- type UseCleanState = <TStateObjOrFactory extends ((props?: TProps) => object) | object, TProps extends object = object>(_initialState: TStateObjOrFactory, props?: TStateObjOrFactory extends Func ? TProps : undefined) => CleanState<TStateObjOrFactory extends Func ? ReturnType<TStateObjOrFactory> : TStateObjOrFactory>;
16
+ type UseCleanState = <TState extends object, TProps extends object = object>(_initialState: ((props?: TProps) => TState) | TState, // TStateObjOrFactory,
17
+ props?: typeof _initialState extends Func ? TProps : undefined) => TCleanState<TState>;
20
18
  export declare const useCleanState: UseCleanState;
21
19
  /**
22
20
  * Returns a value that is false before the component has been mounted,
@@ -1,27 +1,44 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  Object.defineProperty(exports, "__esModule", { value: true });
3
14
  exports.useMountState = exports.useCleanState = void 0;
4
15
  var react_1 = require("react");
5
- var _CleanState_ = /** @class */ (function () {
6
- function _CleanState_(stateAndSetters) {
16
+ var CleanStateBase = /** @class */ (function () {
17
+ function CleanStateBase(initialState) {
7
18
  var _this = this;
8
19
  this._values_ = {};
9
20
  this._setters_ = {};
10
- this.put = this._setters_;
11
21
  this.putMany = function (newValues) {
12
22
  Object.entries(newValues).forEach(function (_a) {
13
23
  var key = _a[0], value = _a[1];
14
24
  _this.put[key](value);
15
25
  });
16
26
  };
17
- /** Must be extracted before the loop begins to avoid including keys from the consumers state object. */
18
- var reservedKeys = Object.keys(this);
19
- Object.entries(stateAndSetters).forEach(function (_a) {
20
- var key = _a[0], responseFromUseState = _a[1];
21
- if (reservedKeys.includes(key))
27
+ this.reservedKeys = Object.keys(this);
28
+ /**
29
+ * The keys from the initial state object.
30
+ * By capturing and storing the value once, we ensure that any potential changes to the object,
31
+ * or irregularities in the order of keys returned by Object.keys,
32
+ * will not affect the order of subsequent useState calls.
33
+ * Only keys provided on the initial call will be recognized,
34
+ * since CleanState is instantiated only once with useMemo,
35
+ * and they will always be processed in a consistent order during rerenders.
36
+ */
37
+ this.valueKeys = Object.keys(initialState);
38
+ this._initialValues_ = __assign({}, initialState);
39
+ this.valueKeys.forEach(function (key) {
40
+ if (_this.reservedKeys.includes(key))
22
41
  throw new Error("The name \"".concat(key, "\" is reserved by CleanState and cannot be used to index state variables. Please use a different key."));
23
- _this._values_[key] = responseFromUseState[0], _this._setters_[key] = responseFromUseState[1];
24
- // this.put[key] = this._setters_[key];
25
42
  var self = _this;
26
43
  Object.defineProperty(_this, key, {
27
44
  get: function () {
@@ -34,36 +51,52 @@ var _CleanState_ = /** @class */ (function () {
34
51
  });
35
52
  });
36
53
  }
37
- return _CleanState_;
54
+ Object.defineProperty(CleanStateBase.prototype, "put", {
55
+ get: function () {
56
+ return __assign({}, this._setters_);
57
+ },
58
+ enumerable: false,
59
+ configurable: true
60
+ });
61
+ Object.defineProperty(CleanStateBase.prototype, "initialState", {
62
+ get: function () {
63
+ return __assign({}, this._initialValues_);
64
+ },
65
+ enumerable: false,
66
+ configurable: true
67
+ });
68
+ CleanStateBase.update = function update() {
69
+ var _this = this;
70
+ if (!(this instanceof CleanState))
71
+ throw new Error('CleanState.update must be called with `this` value set to a CleanState instance. Did you forget to use `.call` or `.apply`? Example: CleanState.update.call(cleanState);');
72
+ /**
73
+ * Linters complain about the use of a React hook within a loop because:
74
+ * > By following this rule, you ensure that Hooks are called in the same order each time a component renders.
75
+ * > That’s what allows React to correctly preserve the state of Hooks between multiple useState and useEffect calls.
76
+ * To resolve this, we're calling `useState` via an alias `retrieveState`.
77
+ * Bypassing this rule is safe here because `useCleanState` is a special case,
78
+ * and it guarantees that the same useState calls will be made on every render in the exact same order.
79
+ * Therefore, it is safe to silence the linters, and required for this implementation to work smoothly.
80
+ */
81
+ var retrieveState = react_1.useState;
82
+ this.valueKeys.forEach(function (key) {
83
+ var _a;
84
+ _a = retrieveState(_this.initialState[key]), _this._values_[key] = _a[0], _this._setters_[key] = _a[1];
85
+ });
86
+ /* Object.entries<TUseStateArray<TState>>(stateAndSetters).forEach(([key, responseFromUseState]) => {
87
+ [this._values_[key], this._setters_[key]] = responseFromUseState;
88
+ }); */
89
+ // return this;
90
+ };
91
+ return CleanStateBase;
38
92
  }());
39
93
  ;
40
- var _CleanState = _CleanState_;
41
- /**
42
- * Linters complain about the use of a React hook within a loop because:
43
- * > By following this rule, you ensure that Hooks are called in the same order each time a component renders.
44
- * > That’s what allows React to correctly preserve the state of Hooks between multiple useState and useEffect calls.
45
- * To resolve this, we're calling `useState` via an alias `retrieveState`.
46
- * Bypassing this rule is safe here because `useCleanState` is a special case,
47
- * and it guarantees that the same useState calls will be made on every render in the exact same order.
48
- * Therefore, it is safe to silence the linters, and required for this implementation to work smoothly.
49
- */
50
- var retrieveState = react_1.useState;
94
+ var CleanState = CleanStateBase;
51
95
  var useCleanState = function (_initialState, props) {
52
- var initialState = typeof _initialState === 'function' ? _initialState(props) : _initialState;
53
- var stateKeys = Object.keys(initialState);
54
- var initialCount = (0, react_1.useState)(stateKeys.length)[0];
55
- if (stateKeys.length !== initialCount) {
56
- throw new Error('The keys in your state object must be consistent throughout your components lifetime. Look up "rules of hooks" for more context.');
57
- }
58
- var stateAndSetters = {};
59
- for (var _i = 0, stateKeys_1 = stateKeys; _i < stateKeys_1.length; _i++) {
60
- var key = stateKeys_1[_i];
61
- stateAndSetters[key] = retrieveState(initialState[key]);
62
- }
63
- // @todo Refactor to return consistent state instance each render.
64
- // Though useState gives us persistent references for values and setters,
65
- // so keeping the CleanState wrapper persistent may be unnecessary.
66
- return new _CleanState(stateAndSetters);
96
+ var initialState = typeof _initialState === 'function' ? (0, react_1.useMemo)(function () { return _initialState(props); }, []) : _initialState;
97
+ var cleanState = (0, react_1.useMemo)(function () { return new CleanState(initialState); }, []);
98
+ CleanState.update.call(cleanState);
99
+ return cleanState;
67
100
  };
68
101
  exports.useCleanState = useCleanState;
69
102
  /**
@@ -5,6 +5,12 @@ type Obj = Record<string, any>;
5
5
  type IComponentConstructor = ComponentInstanceConstructor<any, any, any> & typeof ClassComponent<any, any, any>;
6
6
  export declare class ClassComponent<TState extends Obj, TProps extends Obj, THooks extends Obj> extends ComponentInstance<TState, TProps, THooks> {
7
7
  Render: FunctionComponent<TProps>;
8
+ /**
9
+ * Use this to let React know whenever you would like all of your instance's state to be reset.
10
+ * When the value is changed, React will reset all state variables to their initial value the next time your component re-renders.
11
+ * @see https://react.dev/learn/you-might-not-need-an-effect#resetting-all-state-when-a-prop-changes
12
+ */
13
+ instanceId?: string;
8
14
  static FC: <IComponentType extends IComponentConstructor>(this: IComponentType, _Component?: IComponentType) => (props: InstanceType<IComponentType>["props"]) => JSX.Element;
9
15
  }
10
16
  export {};
@@ -43,10 +43,10 @@ var ClassComponent = /** @class */ (function (_super) {
43
43
  if (!Component.getInitialState || !isClassComponentType)
44
44
  throw new Error('Attempted to initialize ClassComponent with invalid Class type. Either pass a class that extends ClassComponent to FC (e.g `export FC(MyComponent);`), or ensure it is called as a method on a ClassComponent constructor type (e.g `export MyComponent.FC()`).');
45
45
  var Wrapper = function (props) {
46
- var Render = (0, instance_1.useInstance)(Component, props).Render;
46
+ var _a = (0, instance_1.useInstance)(Component, props), Render = _a.Render, instanceId = _a.instanceId;
47
47
  // Add calling component name to Render function name in stack traces.
48
48
  (0, react_1.useMemo)(function () { return setFunctionName(Render, "".concat(Component.name, ".Render")); }, []);
49
- return (0, jsx_runtime_1.jsx)(Render, {});
49
+ return (0, jsx_runtime_1.jsx)(Render, {}, instanceId);
50
50
  };
51
51
  // Include calling component name in wrapper function name on stack traces.
52
52
  var wrapperName = "ClassComponent".concat(Wrapper.name, " > ").concat(Component.name);
@@ -1,13 +1,51 @@
1
1
  import type { ComponentLogicConstructor } from './logic';
2
2
  import { ComponentLogic } from './logic';
3
3
  type Obj = Record<string, any>;
4
- type AsyncAllowedEffectCallback = () => IVoidFunction | Promise<IVoidFunction>;
4
+ type AsyncAllowedEffectCallback = () => Awaitable<IVoidFunction>;
5
5
  export declare const noOp: () => void;
6
6
  export declare class ComponentInstance<TState extends Obj = {}, TProps extends Obj = {}, THooks extends Obj = {}> extends ComponentLogic<TState, TProps, THooks> {
7
+ /**
8
+ * Runs only _before_ first render, i.e before the component instance is mounted.
9
+ * Useful for logic that is involved in determining what to render.
10
+ *
11
+ * Updating local state from in here will abort the render cycle early, before changes are committed to the DOM,
12
+ * and prompt React to immediately rerender the component with the updated state value(s).
13
+ *
14
+ * Ignored on subsequent rerenders.
15
+ */
7
16
  beforeMount: IVoidFunction;
17
+ /**
18
+ * Runs only **_after_** first render, i.e after the component instance is mounted.
19
+ *
20
+ * Should usually only be used for logic that does not directly take part in determining what to render, like
21
+ * synchronize your component with some external system.
22
+ *
23
+ * Ignored on subsequent rerenders.
24
+ *
25
+ * Returns a cleanup function.
26
+ */
8
27
  onMount: AsyncAllowedEffectCallback;
28
+ /**
29
+ * Runs _before_ every render cycle, including the first.
30
+ * Useful for logic that is involved in determining what to render.
31
+ *
32
+ * Updating local state from in here will abort the render cycle early, before changes are committed to the DOM,
33
+ * and prompt React to immediately rerender the component with the updated state value(s).
34
+ */
9
35
  beforeRender: IVoidFunction;
36
+ /**
37
+ * Runs **_after_** every render cycle, including the first.
38
+ *
39
+ * Should usually only be used for logic that does not directly take part in determining what to render, like
40
+ * synchronize your component with some external system.
41
+ *
42
+ * Returns a cleanup function.
43
+ */
10
44
  onRender: AsyncAllowedEffectCallback;
45
+ /**
46
+ * Runs when the component is unmounted.
47
+ * It is called _after_ the cleanup function returned by onMount.
48
+ */
11
49
  cleanUp: IVoidFunction;
12
50
  }
13
51
  type ComponentClassBaseType<TState extends Obj = {}, TProps extends Obj = {}, THooks extends Obj = {}> = ComponentLogicConstructor<TState, TProps, THooks> & Constructor<ComponentInstance<TState, TProps, THooks>>;
@@ -25,10 +25,48 @@ var ComponentInstance = /** @class */ (function (_super) {
25
25
  __extends(ComponentInstance, _super);
26
26
  function ComponentInstance() {
27
27
  var _this = _super !== null && _super.apply(this, arguments) || this;
28
+ /**
29
+ * Runs only _before_ first render, i.e before the component instance is mounted.
30
+ * Useful for logic that is involved in determining what to render.
31
+ *
32
+ * Updating local state from in here will abort the render cycle early, before changes are committed to the DOM,
33
+ * and prompt React to immediately rerender the component with the updated state value(s).
34
+ *
35
+ * Ignored on subsequent rerenders.
36
+ */
28
37
  _this.beforeMount = function () { };
38
+ /**
39
+ * Runs only **_after_** first render, i.e after the component instance is mounted.
40
+ *
41
+ * Should usually only be used for logic that does not directly take part in determining what to render, like
42
+ * synchronize your component with some external system.
43
+ *
44
+ * Ignored on subsequent rerenders.
45
+ *
46
+ * Returns a cleanup function.
47
+ */
29
48
  _this.onMount = function () { return exports.noOp; };
49
+ /**
50
+ * Runs _before_ every render cycle, including the first.
51
+ * Useful for logic that is involved in determining what to render.
52
+ *
53
+ * Updating local state from in here will abort the render cycle early, before changes are committed to the DOM,
54
+ * and prompt React to immediately rerender the component with the updated state value(s).
55
+ */
30
56
  _this.beforeRender = function () { };
57
+ /**
58
+ * Runs **_after_** every render cycle, including the first.
59
+ *
60
+ * Should usually only be used for logic that does not directly take part in determining what to render, like
61
+ * synchronize your component with some external system.
62
+ *
63
+ * Returns a cleanup function.
64
+ */
31
65
  _this.onRender = function () { return exports.noOp; };
66
+ /**
67
+ * Runs when the component is unmounted.
68
+ * It is called _after_ the cleanup function returned by onMount.
69
+ */
32
70
  _this.cleanUp = function () { };
33
71
  return _this;
34
72
  }
@@ -48,6 +86,7 @@ var useMountCallbacks = function (instance) {
48
86
  var doCleanUp = function (runMountCleaners) {
49
87
  var _a;
50
88
  runMountCleaners === null || runMountCleaners === void 0 ? void 0 : runMountCleaners();
89
+ // onDismount? willUnmount?
51
90
  (_a = instance.cleanUp) === null || _a === void 0 ? void 0 : _a.call(instance);
52
91
  };
53
92
  if (typeof mountHandlerCleanUp === 'function') {
@@ -62,7 +101,7 @@ var useMountCallbacks = function (instance) {
62
101
  exports.useMountCallbacks = useMountCallbacks;
63
102
  var useInstance = function (Component, props) {
64
103
  var _a;
65
- // useCustomHooks.
104
+ // useHooks.
66
105
  var instance = (0, logic_1.useLogic)(Component, props);
67
106
  // beforeMount, onMount, cleanUp.
68
107
  (0, exports.useMountCallbacks)(instance);
@@ -1,9 +1,9 @@
1
- import type { CleanState } from '../base/state';
1
+ import type { TCleanState } from '../base/state';
2
2
  export declare class ComponentLogic<TState extends object, TProps extends object, THooks extends object> {
3
- state: CleanState<TState>;
3
+ state: TCleanState<TState>;
4
4
  props: TProps;
5
5
  hooks: THooks;
6
- useCustomHooks?: () => THooks;
6
+ useHooks?: () => THooks;
7
7
  }
8
8
  export interface ComponentLogicConstructor<TState extends object, TProps extends object, THooks extends object> extends Constructor<ComponentLogic<TState, TProps, THooks>> {
9
9
  getInitialState: (props?: TProps) => TState;
@@ -24,7 +24,7 @@ var useLogic = function (Methods, props) {
24
24
  }, []);
25
25
  methods.state = state;
26
26
  methods.props = props;
27
- methods.hooks = ((_a = methods.useCustomHooks) === null || _a === void 0 ? void 0 : _a.call(methods)) || {};
27
+ methods.hooks = ((_a = methods.useHooks) === null || _a === void 0 ? void 0 : _a.call(methods)) || {};
28
28
  return methods;
29
29
  };
30
30
  exports.useLogic = useLogic;
@@ -8,6 +8,8 @@ type Optional<
8
8
  : BaseType | undefined
9
9
  )
10
10
 
11
+ type Awaitable<Type> = Type | Promise<Type>;
12
+
11
13
  type Constructor<
12
14
  TInstance extends any = any,
13
15
  TParams extends any[] = never[]
package/build/index.js CHANGED
@@ -15,3 +15,25 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./classy"), exports);
18
+ // PS: Document component inheritance pattern with lifecycle callback arrays and namespaces.
19
+ // Due to react's remounting behaviour, components must externally track when some logic has run, if it really really must only ever run once per mounted instance. Tricky to get right for components that may have multiple instance rendered simultaneously at different parts of a page.
20
+ // useCleanState => useState, separate call for each key
21
+ // useMergedState => useState, same call for all keys
22
+ // useMethods => useCallback
23
+ // useLogic => useCallback + all other hook calls.
24
+ // useInstance => useLogic + lifecycle methods.
25
+ /*
26
+ - Write usage doc
27
+ - Push to git and publish to site
28
+ - Follow-up personal post on class component inheritance can be published on GH Pages from profile repo.
29
+ - Publish to NPM
30
+ - Finalize package and repo names, then post to Twitter.
31
+ */
32
+ /*
33
+ withFetchApi(baseUrl); To mimic axios.get and axios.post type calls.
34
+ @cleanweb/mem-store - Release global-store package here.
35
+ Use mem-store to cache requests in createApi(); Use md5 hashed url as key.
36
+ @todo Add simple persistence layer with indexed db.
37
+ @cleanweb/subscribable - To publish changes in the data to subscribers.
38
+ @cleanweb/reactive-data - To combine all 4.
39
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleanweb/react",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "A suite of helpers for writing cleaner React function components.",
5
5
  "engines": {
6
6
  "node": ">=18"
@@ -20,6 +20,7 @@
20
20
  "./base": "./build/base/index.js",
21
21
  "./classy": "./build/classy/index.js",
22
22
  "./state": "./build/base/state.js",
23
+ "./state/merged": "./build/base/merged-state.js",
23
24
  "./methods": "./build/base/methods.js",
24
25
  "./logic": "./build/classy/logic.js",
25
26
  "./instance": "./build/classy/instance.js",