intergalactic 15.83.0-prerelease.0 → 15.83.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intergalactic",
3
- "version": "15.83.0-prerelease.0",
3
+ "version": "15.83.0",
4
4
  "license": "MIT",
5
5
  "dependencies": {
6
6
  "intergalactic-migrate": "0.0.0",
@@ -18,10 +18,10 @@
18
18
  "d3-time-format": "4.1.0",
19
19
  "d3-transition": "3.0.1",
20
20
  "hoist-non-react-statics": "3.3.2",
21
+ "csstype": "3.0.8",
21
22
  "final-form": "4.20.4",
22
23
  "final-form-focus": "1.1.2",
23
24
  "react-final-form": "6.5.9",
24
- "csstype": "3.0.8",
25
25
  "@babel/runtime": "^7.17.9",
26
26
  "text-mask-core": "5.1.2",
27
27
  "@popperjs/core": "2.11.5",
@@ -9,7 +9,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _objectSpread3 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
11
  var _react = _interopRequireDefault(require("react"));
12
- var _styled = require("../styled");
12
+ var _index = require("../styled/index");
13
13
  var _staticChildren = require("./staticChildren");
14
14
  var _excluded = ["_styles", "styles"],
15
15
  _excluded2 = ["styles"];
@@ -26,7 +26,7 @@ function Enhancement(childComponents, Context) {
26
26
  this[STYLES_SELF] = props.styles;
27
27
  }
28
28
  if (WrapperComponent.style) {
29
- this[STYLES_SELF] = _styled.sstyled.merge(WrapperComponent.style, props._styles);
29
+ this[STYLES_SELF] = _index.sstyled.merge(WrapperComponent.style, props._styles);
30
30
  }
31
31
  },
32
32
  context: function context(_context) {
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","names":["_react","_interopRequireDefault","require","_styled","_staticChildren","_excluded","_excluded2","STYLES_CONTEXT","Symbol","exports","STYLES_SELF","Enhancement","childComponents","Context","condition","Component","Boolean","style","STATIC_COMPONENT","init","props","WrapperComponent","styles","sstyled","merge","_styles","context","Object","keys","length","_objectSpread3","_defineProperty2","asProps","_ref","_objectWithoutProperties2","wrapperProps","_ref2","React","useContext","_default"],"sources":["../../../src/core/enhancement/style.tsx"],"sourcesContent":["import React from 'react';\nimport { sstyled } from '../styled';\nimport { STATIC_COMPONENT } from './staticChildren';\n\nexport const STYLES_CONTEXT = Symbol('STYLES_CONTEXT');\nconst STYLES_SELF = Symbol('STYLES_SELF');\n\nfunction Enhancement(childComponents: any, Context: any) {\n return {\n condition: function (Component: any) {\n return Boolean(Component.style || Component[STATIC_COMPONENT]);\n },\n init: function (this: any, props: any, WrapperComponent: any) {\n if (props.styles) {\n this[STYLES_SELF] = props.styles;\n }\n if (WrapperComponent.style) {\n this[STYLES_SELF] = sstyled.merge(WrapperComponent.style, props._styles);\n }\n },\n context: function (this: any, context: any): any {\n // Optimization: if has no children there is no need to create new context (by lsroman)\n if (!this[STYLES_SELF] || !Object.keys(childComponents).length) {\n return context;\n }\n return {\n ...context,\n [STYLES_CONTEXT]: this[STYLES_SELF],\n };\n },\n\n asProps: function (this: any, { _styles, styles, ...props }: any) {\n return {\n ...props,\n styles: this[STYLES_SELF],\n };\n },\n wrapperProps: function (this: any, { styles, ...props }: any) {\n const context: any = React.useContext(Context);\n return {\n ...props,\n _styles: styles,\n styles: context[STYLES_CONTEXT],\n };\n },\n };\n}\n\nexport default Enhancement;\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAAoD,IAAAG,SAAA;EAAAC,UAAA;AAE7C,IAAMC,cAAc,GAAGC,MAAM,CAAC,gBAAgB,CAAC;AAACC,OAAA,CAAAF,cAAA,GAAAA,cAAA;AACvD,IAAMG,WAAW,GAAGF,MAAM,CAAC,aA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,CAANd,MAAM;QAAKF,KAAK,OAAAc,yBAAA,aAAAE,KAAA,EAAA9B,UAAA;MACnD,IAAMoB,OAAY,GAAGW,iBAAK,CAACC,UAAU,CAACzB,OAAO,CAAC;MAC9C,WAAAiB,cAAA,iBAAAA,cAAA,iBACKV,KAAK;QACRK,OAAO,EAAEH,MAAM;QACfA,MAAM,EAAEI,OAAO,CAACnB,cAAc;MAAC;IAEnC;EACF,CAAC;AACH;AAAC,IAAAgC,QAAA,GAEc5B,WAAW;AAAAF,OAAA,cAAA8B,QAAA"}
1
+ {"version":3,"file":"style.js","names":["_react","_interopRequireDefault","require","_index","_staticChildren","_excluded","_excluded2","STYLES_CONTEXT","Symbol","exports","STYLES_SELF","Enhancement","childComponents","Context","condition","Component","Boolean","style","STATIC_COMPONENT","init","props","WrapperComponent","styles","sstyled","merge","_styles","context","Object","keys","length","_objectSpread3","_defineProperty2","asProps","_ref","_objectWithoutProperties2","wrapperProps","_ref2","React","useContext","_default"],"sources":["../../../src/core/enhancement/style.tsx"],"sourcesContent":["import React from 'react';\nimport { sstyled } from '../styled/index';\nimport { STATIC_COMPONENT } from './staticChildren';\n\nexport const STYLES_CONTEXT = Symbol('STYLES_CONTEXT');\nconst STYLES_SELF = Symbol('STYLES_SELF');\n\nfunction Enhancement(childComponents: any, Context: any) {\n return {\n condition: function (Component: any) {\n return Boolean(Component.style || Component[STATIC_COMPONENT]);\n },\n init: function (this: any, props: any, WrapperComponent: any) {\n if (props.styles) {\n this[STYLES_SELF] = props.styles;\n }\n if (WrapperComponent.style) {\n this[STYLES_SELF] = sstyled.merge(WrapperComponent.style, props._styles);\n }\n },\n context: function (this: any, context: any): any {\n // Optimization: if has no children there is no need to create new context (by lsroman)\n if (!this[STYLES_SELF] || !Object.keys(childComponents).length) {\n return context;\n }\n return {\n ...context,\n [STYLES_CONTEXT]: this[STYLES_SELF],\n };\n },\n\n asProps: function (this: any, { _styles, styles, ...props }: any) {\n return {\n ...props,\n styles: this[STYLES_SELF],\n };\n },\n wrapperProps: function (this: any, { styles, ...props }: any) {\n const context: any = React.useContext(Context);\n return {\n ...props,\n _styles: styles,\n styles: context[STYLES_CONTEXT],\n };\n },\n };\n}\n\nexport default Enhancement;\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAAoD,IAAAG,SAAA;EAAAC,UAAA;AAE7C,IAAMC,cAAc,GAAGC,MAAM,CAAC,gBAAgB,CAAC;AAACC,OAAA,CAAAF,cAAA,GAAAA,cAAA;AACvD,IAAMG,WAAW,GAAGF,MAAM,CAAC,aAAa,CAAC;AAEzC,SAASG,WAAWA,CAACC,eAAoB,EAAEC,OAAY,EAAE;EACvD,OAAO;IACLC,SAAS,EAAE,SAAAA,UAAUC,SAAc,EAAE;MACnC,OAAOC,OAAO,CAACD,SAAS,CAACE,KAAK,IAAIF,SAAS,CAACG,gCAAgB,CAAC,CAAC;IAChE,CAAC;IACDC,IAAI,EAAE,SAAAA,KAAqBC,KAAU,EAAEC,gBAAqB,EAAE;MAC5D,IAAID,KAAK,CAACE,MAAM,EAAE;QAChB,IAAI,CAACZ,WAAW,CAAC,GAAGU,KAAK,CAACE,MAAM;MAClC;MACA,IAAID,gBAAgB,CAACJ,KAAK,EAAE;QAC1B,IAAI,CAACP,WAAW,CAAC,GAAGa,cAAO,CAACC,KAAK,CAACH,gBAAgB,CAACJ,KAAK,EAAEG,KAAK,CAACK,OAAO,CAAC;MAC1E;IACF,CAAC;IACDC,OAAO,EAAE,SAAAA,QAAqBA,QAAY,EAAO;MAC/C;MACA,IAAI,CAAC,IAAI,CAAChB,WAAW,CAAC,IAAI,CAACiB,MAAM,CAACC,IAAI,CAAChB,eAAe,CAAC,CAACiB,MAAM,EAAE;QAC9D,OAAOH,QAAO;MAChB;MACA,WAAAI,cAAA,iBAAAA,cAAA,iBACKJ,QAAO,WAAAK,gBAAA,iBACTxB,cAAc,EAAG,IAAI,CAACG,WAAW,CAAC;IAEvC,CAAC;IAEDsB,OAAO,EAAE,SAAAA,QAAAC,IAAA,EAAyD;MAAA,IAAlCR,OAAO,GAAAQ,IAAA,CAAPR,OAAO;QAAEH,MAAM,GAAAW,IAAA,CAANX,MAAM;QAAKF,KAAK,OAAAc,yBAAA,aAAAD,IAAA,EAAA5B,SAAA;MACvD,WAAAyB,cAAA,iBAAAA,cAAA,iBACKV,KAAK;QACRE,MAAM,EAAE,IAAI,CAACZ,WAAW;MAAC;IAE7B,CAAC;IACDyB,YAAY,EAAE,SAAAA,aAAAC,KAAA,EAAgD;MAAA,IAAzBd,MAAM,GAAAc,KAAA,CAANd,MAAM;QAAKF,KAAK,OAAAc,yBAAA,aAAAE,KAAA,EAAA9B,UAAA;MACnD,IAAMoB,OAAY,GAAGW,iBAAK,CAACC,UAAU,CAACzB,OAAO,CAAC;MAC9C,WAAAiB,cAAA,iBAAAA,cAAA,iBACKV,KAAK;QACRK,OAAO,EAAEH,MAAM;QACfA,MAAM,EAAEI,OAAO,CAACnB,cAAc;MAAC;IAEnC;EACF,CAAC;AACH;AAAC,IAAAgC,QAAA,GAEc5B,WAAW;AAAAF,OAAA,cAAA8B,QAAA"}
@@ -4,7 +4,7 @@ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
4
4
  var _excluded = ["_styles", "styles"],
5
5
  _excluded2 = ["styles"];
6
6
  import React from 'react';
7
- import { sstyled } from "../styled.mjs";
7
+ import { sstyled } from "../styled/index.mjs";
8
8
  import { STATIC_COMPONENT } from "./staticChildren.mjs";
9
9
  export var STYLES_CONTEXT = Symbol('STYLES_CONTEXT');
10
10
  var STYLES_SELF = Symbol('STYLES_SELF');
@@ -1 +1 @@
1
- {"version":3,"file":"style.mjs","names":["React","sstyled","STATIC_COMPONENT","STYLES_CONTEXT","Symbol","STYLES_SELF","Enhancement","childComponents","Context","condition","Component","Boolean","style","init","props","WrapperComponent","styles","merge","_styles","context","Object","keys","length","_objectSpread","_defineProperty","asProps","_ref","_objectWithoutProperties","_excluded","wrapperProps","_ref2","_excluded2","useContext"],"sources":["../../../src/core/enhancement/style.tsx"],"sourcesContent":["import React from 'react';\nimport { sstyled } from '../styled';\nimport { STATIC_COMPONENT } from './staticChildren';\n\nexport const STYLES_CONTEXT = Symbol('STYLES_CONTEXT');\nconst STYLES_SELF = Symbol('STYLES_SELF');\n\nfunction Enhancement(childComponents: any, Context: any) {\n return {\n condition: function (Component: any) {\n return Boolean(Component.style || Component[STATIC_COMPONENT]);\n },\n init: function (this: any, props: any, WrapperComponent: any) {\n if (props.styles) {\n this[STYLES_SELF] = props.styles;\n }\n if (WrapperComponent.style) {\n this[STYLES_SELF] = sstyled.merge(WrapperComponent.style, props._styles);\n }\n },\n context: function (this: any, context: any): any {\n // Optimization: if has no children there is no need to create new context (by lsroman)\n if (!this[STYLES_SELF] || !Object.keys(childComponents).length) {\n return context;\n }\n return {\n ...context,\n [STYLES_CONTEXT]: this[STYLES_SELF],\n };\n },\n\n asProps: function (this: any, { _styles, styles, ...props }: any) {\n return {\n ...props,\n styles: this[STYLES_SELF],\n };\n },\n wrapperProps: function (this: any, { styles, ...props }: any) {\n const context: any = React.useContext(Context);\n return {\n ...props,\n _styles: styles,\n styles: context[STYLES_CONTEXT],\n };\n },\n };\n}\n\nexport default Enhancement;\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,QAAQ,eAAW;AACnC,SAASC,gBAAgB,QAAQ,sBAAkB;AAEnD,OAAO,IAAMC,cAAc,GAAGC,MAAM,CAAC,gBAAgB,CAAC;AACtD,IAAMC,WAAW,GAAGD,MAAM,CAAC,aAAa,CAAC;AAEzC,SAASE,WAAWA,CAACC,eAAoB,EAAEC,OAAY,EAAE;EACvD,OAAO;IACLC,SAAS,EAAE,SAAAA,UAAUC,SAAc,EAAE;MACnC,OAAOC,OAAO,CAACD,SAAS,CAACE,KAAK,IAAIF,SAAS,CAACR,gB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AAM;QACfA,MAAM,EAAEG,OAAO,CAAChB,cAAc;MAAC;IAEnC;EACF,CAAC;AACH;AAEA,eAAeG,WAAW"}
1
+ {"version":3,"file":"style.mjs","names":["React","sstyled","STATIC_COMPONENT","STYLES_CONTEXT","Symbol","STYLES_SELF","Enhancement","childComponents","Context","condition","Component","Boolean","style","init","props","WrapperComponent","styles","merge","_styles","context","Object","keys","length","_objectSpread","_defineProperty","asProps","_ref","_objectWithoutProperties","_excluded","wrapperProps","_ref2","_excluded2","useContext"],"sources":["../../../src/core/enhancement/style.tsx"],"sourcesContent":["import React from 'react';\nimport { sstyled } from '../styled/index';\nimport { STATIC_COMPONENT } from './staticChildren';\n\nexport const STYLES_CONTEXT = Symbol('STYLES_CONTEXT');\nconst STYLES_SELF = Symbol('STYLES_SELF');\n\nfunction Enhancement(childComponents: any, Context: any) {\n return {\n condition: function (Component: any) {\n return Boolean(Component.style || Component[STATIC_COMPONENT]);\n },\n init: function (this: any, props: any, WrapperComponent: any) {\n if (props.styles) {\n this[STYLES_SELF] = props.styles;\n }\n if (WrapperComponent.style) {\n this[STYLES_SELF] = sstyled.merge(WrapperComponent.style, props._styles);\n }\n },\n context: function (this: any, context: any): any {\n // Optimization: if has no children there is no need to create new context (by lsroman)\n if (!this[STYLES_SELF] || !Object.keys(childComponents).length) {\n return context;\n }\n return {\n ...context,\n [STYLES_CONTEXT]: this[STYLES_SELF],\n };\n },\n\n asProps: function (this: any, { _styles, styles, ...props }: any) {\n return {\n ...props,\n styles: this[STYLES_SELF],\n };\n },\n wrapperProps: function (this: any, { styles, ...props }: any) {\n const context: any = React.useContext(Context);\n return {\n ...props,\n _styles: styles,\n styles: context[STYLES_CONTEXT],\n };\n },\n };\n}\n\nexport default Enhancement;\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,QAAQ,qBAAiB;AACzC,SAASC,gBAAgB,QAAQ,sBAAkB;AAEnD,OAAO,IAAMC,cAAc,GAAGC,MA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C,KAAA,EAAgD;MAAA,IAAzBd,MAAM,GAAAc,KAAA,CAANd,MAAM;QAAKF,KAAK,GAAAa,wBAAA,CAAAG,KAAA,EAAAC,UAAA;MACnD,IAAMZ,OAAY,GAAGnB,KAAK,CAACgC,UAAU,CAACxB,OAAO,CAAC;MAC9C,OAAAe,aAAA,CAAAA,aAAA,KACKT,KAAK;QACRI,OAAO,EAAEF,MAAM;QACfA,MAAM,EAAEG,OAAO,CAAChB,cAAc;MAAC;IAEnC;EACF,CAAC;AACH;AAEA,eAAeG,WAAW"}
@@ -28,8 +28,8 @@ declare function createComponent<ComponentProps, ChildComponentProps = {}, Conte
28
28
  [key: string]: (arg: unknown) => void;
29
29
  }, FNType>;
30
30
  declare function createBaseComponent<ComponentProps>(OriginComponent: any): ComponentType<ComponentProps>;
31
- export * from './types';
32
- export * from './styled';
31
+ export * from './types/index';
32
+ export * from './styled/index';
33
33
  export * from './register';
34
34
  export { createBaseComponent, register, CREATE_COMPONENT, CORE_INSTANCE, CONTEXT_COMPONENT, CHILDREN_COMPONENT, INHERITED_NAME, CORE_COMPONENT, STATIC_COMPONENT, ROOT_COMPONENT, assignProps, };
35
35
  export default createComponent;
@@ -118,27 +118,27 @@ var _style = _interopRequireDefault(require("./enhancement/style"));
118
118
  var _bindHandler = _interopRequireDefault(require("./enhancement/bindHandler"));
119
119
  var _i18n = _interopRequireDefault(require("./enhancement/i18n"));
120
120
  var _symbols = require("./types/symbols");
121
- var _types = require("./types");
122
- Object.keys(_types).forEach(function (key) {
121
+ var _index = require("./types/index");
122
+ Object.keys(_index).forEach(function (key) {
123
123
  if (key === "default" || key === "__esModule") return;
124
124
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
125
- if (key in exports && exports[key] === _types[key]) return;
125
+ if (key in exports && exports[key] === _index[key]) return;
126
126
  Object.defineProperty(exports, key, {
127
127
  enumerable: true,
128
128
  get: function get() {
129
- return _types[key];
129
+ return _index[key];
130
130
  }
131
131
  });
132
132
  });
133
- var _styled = require("./styled");
134
- Object.keys(_styled).forEach(function (key) {
133
+ var _index2 = require("./styled/index");
134
+ Object.keys(_index2).forEach(function (key) {
135
135
  if (key === "default" || key === "__esModule") return;
136
136
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
137
- if (key in exports && exports[key] === _styled[key]) return;
137
+ if (key in exports && exports[key] === _index2[key]) return;
138
138
  Object.defineProperty(exports, key, {
139
139
  enumerable: true,
140
140
  get: function get() {
141
- return _styled[key];
141
+ return _index2[key];
142
142
  }
143
143
  });
144
144
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_hoistNonReactStatics","_ref4","_useEnhancedEffect","_assignProps2","_Component","_register","_interopRequireWildcard","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_Children","_Root","_uncontrolledProps","_functionDefaultProps","_staticChildren","_inheritedName","_hoistProps","_dataName","_enhance","_style","_bindHandler","_i18n","_symbols","_types","_styled","_excluded","_excluded2","_excluded3","isEmptyObject","obj","getOwnPropertyNames","length","getOwnPropertySymbols","getPrototypeOf","createGetField","enhancements","Component","isFunction","getField","filter","enhancement","condition","reduce","acc","item","push","createForwardWrapper","wrapperProps","statics","RootComponent","ROOT_COMPONENT","getterMethodName","getterMethodNameByDisplayName","displayName","getterMethod","undefined","useGetterIndex","WrapperForwardRefWithBind","_ref","ref","_ref$forwardRef","forwardRef","other","_objectWithoutProperties2","createElement","BindingWrapper","_extends2","useForkRef","WrapperForwardRef","_ref2","_ref2$forwardRef","__WRAPPER_PROPS_BIND__","_reduce","WrapperComponent","_reduce$ref","enhancementRef","props","_React$Component","_inherits2","_super","_createSuper2","_this","_classCallCheck2","_len","arguments","args","Array","_key","apply","concat","_defineProperty2","_assertThisInitialized2","_createClass2","value","render","_this2","map","fn","bind","React","hoistNonReactStatics","defaultProps","assign","wrapClass","OriginComponent","Context","inits","renders","contexts","_OriginComponent2","_super2","context","_this3","CORE_AS_PROPS","CORE_INSTANCE","CORE_INIT","_this4","Error","setContext","_this5","contextProps","_get2","_getPrototypeOf2","_this6","asProps","ctx","STATIC_COMPONENT","Provider","_objectSpread2","wrapFunction","memo","FunctionMemoComponent","selfRef","useRef","firstRender","useEnhancedEffect","current","wrapCore","_ref3","Root","createComposeComponent","PureComponent","isPrototypeOf","CORE_COMPONENT","assignProps","p1","p2","_assignProps","createComponent","childComponents","options","_options$context","createContext","_options$parent","parent","_options$enhancements","parents","isArray","wholeFamily","PARENT_COMPONENTS","_toConsumableArray2","f","i18nAppLocaleEnhance","bindHandlerEnhancement","childrenEnhancement","rootEnhancement","uncontrolledPropsEnhancement","staticChildrenEnhancement","functionDefaultPropsEnhancement","inheritedNameEnhancement","dataNameEnhancement","enhanceEnhancement","styleEnhancement","hoistPropsEnhancement","CONTEXT_COMPONENT","_______childrenComponents","CREATE_COMPONENT","_OriginComponent","_childComponents","_options","createBaseComponent","_default"],"sources":["../../src/core/index.tsx"],"sourcesContent":["import React, { ForwardRefExoticComponent, RefAttributes } from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\n\nimport { useForkRef } from '../ref';\nimport useEnhancedEffect from '../use/useEnhancedEffect';\nimport _assignProps from '../assignProps';\n\nimport {\n Component,\n PropsWithRenderFnChildren,\n wrapIntergalacticComponent,\n} from './types/Component';\nimport register from './register';\n\nimport childrenEnhancement, { CHILDREN_COMPONENT } from './enhancement/Children';\nimport rootEnhancement from './enhancement/Root';\nimport uncontrolledPropsEnhancement from './enhancement/uncontrolledProps';\nimport functionDefaultPropsEnhancement from './enhancement/functionDefaultProps';\nimport staticChildrenEnhancement, {\n STATIC_COMPONENT,\n ROOT_COMPONENT,\n getterMethodNameByDisplayName,\n} from './enhancement/staticChildren';\nimport inheritedNameEnhancement, { INHERITED_NAME } from './enhancement/inheritedName';\nimport hoistPropsEnhancement from './enhancement/hoistProps';\nimport dataNameEnhancement from './enhancement/dataName';\nimport enhanceEnhancement from './enhancement/enhance';\nimport styleEnhancement from './enhancement/style';\nimport bindHandlerEnhancement from './enhancement/bindHandler';\nimport i18nAppLocaleEnhance from './enhancement/i18n';\nimport {\n CORE_AS_PROPS,\n CORE_INIT,\n PARENT_COMPONENTS,\n CORE_INSTANCE,\n CORE_COMPONENT,\n CREATE_COMPONENT,\n CONTEXT_COMPONENT,\n} from './types/symbols';\n\nfunction isEmptyObject(obj: any) {\n return (\n Object.getOwnPropertyNames(obj).length === 0 &&\n Object.getOwnPropertySymbols && // For IE 11\n Object.getOwnPropertySymbols(obj).length === 0 &&\n Object.getPrototypeOf(obj) === Object.prototype\n );\n}\n\nfunction createGetField(enhancements: any, Component: any, isFunction: boolean) {\n return function getField(key: string) {\n return enhancements\n .filter((enhancement: any) => {\n if (!enhancement.condition) {\n return true;\n }\n return enhancement.condition(Component, isFunction);\n })\n .reduce((acc: any, item: any) => {\n if (item[key]) {\n acc.push(item[key]);\n }\n return acc;\n }, []);\n };\n}\n\nfunction createForwardWrapper(Component: any, wrapperProps: any, statics: any, isFunction: any) {\n const RootComponent = Component[ROOT_COMPONENT];\n const getterMethodName = getterMethodNameByDisplayName(Component?.displayName);\n const getterMethod = RootComponent?.prototype\n ? RootComponent.prototype[getterMethodName]\n : undefined;\n const useGetterIndex = getterMethod?.length >= 2;\n\n function WrapperForwardRefWithBind({ forwardRef = null, ...other }, ref: any) {\n return <BindingWrapper {...other} forwardRef={useForkRef(ref, forwardRef)} />;\n }\n\n function WrapperForwardRef(\n { forwardRef = null, __WRAPPER_PROPS_BIND__, ...other }: any,\n ref: any,\n ) {\n const { ref: enhancementRef = null, ...props } = (\n __WRAPPER_PROPS_BIND__ || wrapperProps\n ).reduce((acc: any, enhancement: any) => enhancement(acc, WrapperComponent, isFunction), other);\n return <Component {...props} forwardRef={useForkRef(enhancementRef, ref, forwardRef)} />;\n }\n\n class BindingWrapper extends React.Component<any> {\n index = -1;\n render() {\n return (\n <WrapperForwardRef\n {...this.props}\n __WRAPPER_PROPS_BIND__={wrapperProps.map((fn: any) => fn.bind(this))}\n />\n );\n }\n }\n\n const WrapperComponent = React.forwardRef(\n useGetterIndex ? WrapperForwardRefWithBind : WrapperForwardRef,\n );\n\n hoistNonReactStatics(WrapperComponent, Component);\n\n WrapperComponent.displayName = Component.displayName;\n // TODO: defaultProps is only empty\n WrapperComponent.defaultProps = Component.defaultProps;\n // STATIC\n statics.forEach((enhancement: any) =>\n Object.assign(WrapperComponent, enhancement(WrapperComponent, Component, isFunction)),\n );\n\n return WrapperComponent;\n}\n\nfunction wrapClass(OriginComponent: any, enhancements: any, Context: any) {\n const getField = createGetField(enhancements, OriginComponent, false);\n\n const inits = getField('init');\n const props = getField('asProps');\n const renders = getField('render');\n const statics = getField('static');\n const wrapperProps = getField('wrapperProps');\n const contexts = getField('context');\n\n class Component extends OriginComponent {\n [CORE_AS_PROPS] = null;\n [CORE_INSTANCE] = WrapperComponent;\n [CORE_INIT] = false;\n\n constructor(props: any, context: any) {\n super(props, context);\n // INITS\n inits.forEach((enhancement: any) => enhancement.call(this, props, WrapperComponent, false));\n this[CORE_INIT] = true;\n }\n\n get asProps() {\n // TODO if not production\n if (!this[CORE_INIT]) {\n throw new Error('Can not call asProps in constructor');\n }\n if (!this[CORE_AS_PROPS]) {\n // PROPS\n this[CORE_AS_PROPS] = props.reduce(\n (acc: any, enhancement: any) => enhancement.call(this, acc, WrapperComponent, false),\n this.props,\n );\n }\n return this[CORE_AS_PROPS];\n }\n\n setContext() {\n const contextProps = super.setContext ? super.setContext() : {};\n // CONTEXT\n return contexts.reduce(\n (acc: any, enhancement: any) => enhancement.call(this, acc, WrapperComponent, false),\n contextProps,\n );\n }\n\n render() {\n this[CORE_AS_PROPS] = null;\n // TODO if not production\n if (!super.render) {\n throw new Error('Component `render` method is not defined');\n }\n const asProps: any = this.asProps;\n const ctx = this.setContext();\n // RENDER\n const render = renders.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(this, acc, asProps, WrapperComponent, false),\n super.render(),\n );\n if (!WrapperComponent[STATIC_COMPONENT] && !isEmptyObject(ctx)) {\n return <Context.Provider value={{ ...asProps, ...ctx }}>{render}</Context.Provider>;\n } else {\n return render;\n }\n }\n }\n\n const WrapperComponent: any = createForwardWrapper(Component, wrapperProps, statics, false);\n return WrapperComponent;\n}\n\nfunction wrapFunction(OriginComponent: any, enhancements: any, Context: any) {\n const getField = createGetField(enhancements, OriginComponent, true);\n\n const inits = getField('init');\n const props = getField('asProps');\n const renders = getField('render');\n const statics = getField('static');\n const wrapperProps = getField('wrapperProps');\n const contexts = getField('context');\n\n const Component = React.memo(function FunctionMemoComponent(other) {\n const selfRef = React.useRef({});\n const firstRender = React.useRef(true);\n useEnhancedEffect(() => {\n firstRender.current = false;\n }, []);\n if (firstRender.current) {\n // INITS\n inits.forEach((enhancement: any) =>\n enhancement.call(selfRef.current, other, WrapperComponent, true),\n );\n }\n // PROPS\n const asProps = props.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(selfRef.current, acc, WrapperComponent, true),\n other,\n );\n // CONTEXT\n const ctx = contexts.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(selfRef.current, acc, WrapperComponent, true),\n {},\n );\n\n // RENDER\n const render = renders.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(selfRef.current, acc, asProps, WrapperComponent, true),\n <OriginComponent {...asProps} />,\n );\n\n if (!WrapperComponent[STATIC_COMPONENT] && !isEmptyObject(ctx)) {\n return <Context.Provider value={{ ...asProps, ...ctx }}>{render}</Context.Provider>;\n } else {\n return render;\n }\n });\n Object.assign(Component, OriginComponent);\n const WrapperComponent: any = createForwardWrapper(Component, wrapperProps, statics, true);\n return WrapperComponent;\n}\n\nfunction wrapCore(OriginComponent: any, enhancements: any, Context: any) {\n const Component = function ({ Root }: any) {\n const defaultProps = OriginComponent.defaultProps || {};\n return <Root {...defaultProps} render={OriginComponent} />;\n };\n hoistNonReactStatics(Component, OriginComponent);\n Component.displayName = OriginComponent.displayName;\n return wrapFunction(Component, enhancements, Context);\n}\n\nfunction createComposeComponent(OriginComponent: any, Context: any, enhancements: any): any {\n if (\n React.PureComponent.isPrototypeOf(OriginComponent) ||\n React.Component.isPrototypeOf(OriginComponent)\n ) {\n if (OriginComponent.prototype instanceof Component) {\n return wrapClass(OriginComponent, enhancements, Context);\n } else {\n throw new Error('Must inherit from our component');\n }\n } else if (typeof OriginComponent === 'function') {\n return wrapFunction(OriginComponent, enhancements, Context);\n } else if (OriginComponent[CORE_COMPONENT]) {\n return wrapCore(OriginComponent, enhancements, Context);\n } else {\n throw new Error('Must be a React component');\n }\n}\n\nexport type PropsAndRef<T, Ctx, UCProps> = PropsWithRenderFnChildren<T, Ctx, UCProps> &\n RefAttributes<unknown>;\nexport type ForwardRefComponent<T, Ctx, UCProps> = ForwardRefExoticComponent<\n PropsAndRef<T, Ctx, UCProps>\n>;\ntype ComponentOrProps<T, Context, UCProps> = T extends [infer ParentProps, infer ChildProps]\n ? ComponentType<ParentProps, ChildProps, Context, UCProps>\n : ForwardRefComponent<T, Context, UCProps>;\n\nexport type ComponentType<\n ComponentProps,\n ChildComponentProps = {},\n ContextType = {},\n UCProps = {},\n FNType = null,\n> = (FNType extends null\n ? ForwardRefComponent<ComponentProps, ContextType, UCProps>\n : FNType & { displayName: string }) & {\n [K in keyof ChildComponentProps]: ComponentOrProps<ChildComponentProps[K], ContextType, UCProps>;\n} & {\n [CORE_COMPONENT]: boolean;\n [CREATE_COMPONENT]: () => ComponentType<\n ComponentProps,\n ChildComponentProps,\n ContextType,\n UCProps\n >;\n};\n\ninterface ClassWithUncontrolledProps<Props> {\n uncontrolledProps(): unknown;\n}\n\nfunction assignProps(p1: any, p2: any) {\n return _assignProps(p2, p1);\n}\n\nfunction createComponent<ComponentProps, ChildComponentProps = {}, ContextType = {}, FNType = null>(\n OriginComponent: any,\n childComponents: any = {},\n options: {\n context?: React.Context<ContextType>;\n parent?: ComponentType<unknown> | ComponentType<unknown>[];\n enhancements?: [any];\n } = {},\n): ComponentType<\n ComponentProps extends Component<infer Props> ? Props : ComponentProps,\n ChildComponentProps,\n ContextType,\n ComponentProps extends ClassWithUncontrolledProps<any>\n ? ReturnType<ComponentProps['uncontrolledProps']>\n : { [key: string]: (arg: unknown) => void },\n FNType\n> {\n const {\n context = React.createContext<ContextType>({} as ContextType),\n parent = [],\n enhancements = [],\n } = options;\n let parents = Array.isArray(parent) ? parent : [parent];\n if (parents.length) {\n const wholeFamily = parents.reduce((acc: any, parent: any) => {\n if (parent[PARENT_COMPONENTS]) {\n acc = [...parent[PARENT_COMPONENTS], ...acc];\n }\n return acc;\n }, parents);\n OriginComponent[PARENT_COMPONENTS] = wholeFamily;\n parents = wholeFamily;\n }\n if (OriginComponent[CORE_COMPONENT]) {\n parents.push(OriginComponent);\n }\n const Component = createComposeComponent(OriginComponent, context, [\n // @ts-ignore\n ...enhancements.map((f) => f(context, parents, createComponent, childComponents)),\n i18nAppLocaleEnhance(),\n bindHandlerEnhancement(),\n childrenEnhancement(context, parents),\n // root must be under the children\n rootEnhancement(),\n uncontrolledPropsEnhancement(),\n staticChildrenEnhancement(childComponents, createComponent, {\n context,\n parent,\n enhancements,\n }),\n // functionDefaultProps must be under the staticChild\n functionDefaultPropsEnhancement(),\n // inheritedName must be under the staticChild\n inheritedNameEnhancement(),\n // dataName must be under the staticChild\n dataNameEnhancement(),\n // enhanceEnhancement must be under the functionDefaultPropsEnhancement\n enhanceEnhancement(),\n styleEnhancement(childComponents, context),\n // must be the last one so any properties can be raised\n hoistPropsEnhancement(childComponents, context),\n ]);\n Component[CONTEXT_COMPONENT] = context;\n Component._______childrenComponents = childComponents;\n Component[CREATE_COMPONENT] = function (\n _OriginComponent = OriginComponent,\n _childComponents = childComponents,\n _options = options,\n ) {\n return createComponent(_OriginComponent, _childComponents, _options);\n };\n Component[CORE_COMPONENT] = true;\n return Component;\n}\n\nfunction createBaseComponent<ComponentProps>(OriginComponent: any): ComponentType<ComponentProps> {\n let Component = null;\n if (\n !React.PureComponent.isPrototypeOf(OriginComponent) &&\n !React.Component.isPrototypeOf(OriginComponent) &&\n typeof OriginComponent === 'function'\n ) {\n Component = React.forwardRef(OriginComponent);\n Component.displayName = OriginComponent.displayName;\n Component.defaultProps = {\n 'data-ui-name': OriginComponent.displayName,\n ...OriginComponent.defaultProps,\n };\n (Component as any)[CORE_COMPONENT] = true;\n } else {\n throw new Error('createBaseComponent accepts only functional component');\n }\n return Component as any;\n}\n\nexport * from './types';\nexport * from './styled';\nexport * from './register';\nexport {\n createBaseComponent,\n register,\n CREATE_COMPONENT,\n CORE_INSTANCE,\n CONTEXT_COMPONENT,\n CHILDREN_COMPONENT,\n INHERITED_NAME,\n CORE_COMPONENT,\n STATIC_COMPONENT,\n ROOT_COMPONENT,\n assignProps,\n};\n\nexport default createComponent;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,aAAA,GAAAL,sBAAA,CAAAC,OAAA;AAEA,IAAAK,UAAA,GAAAL,OAAA;AAKA,IAAAM,SAAA,GAAAC,uBAAA,CAAAP,OAAA;AA0YAQ,MAAA,CAAAC,IAAA,CAAAH,SAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,SAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAA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NonReactStatics","_ref4","_useEnhancedEffect","_assignProps2","_Component","_register","_interopRequireWildcard","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_Children","_Root","_uncontrolledProps","_functionDefaultProps","_staticChildren","_inheritedName","_hoistProps","_dataName","_enhance","_style","_bindHandler","_i18n","_symbols","_index","_index2","_excluded","_excluded2","_excluded3","isEmptyObject","obj","getOwnPropertyNames","length","getOwnPropertySymbols","getPrototypeOf","createGetField","enhancements","Component","isFunction","getField","filter","enhancement","condition","reduce","acc","item","push","createForwardWrapper","wrapperProps","statics","RootComponent","ROOT_COMPONENT","getterMethodName","getterMethodNameByDisplayName","displayName","getterMethod","undefined","useGetterIndex","WrapperForwardRefWithBind","_ref","ref","_ref$forwardRef","forwardRef","other","_objectWithoutProperties2","createElement","BindingWrapper","_extends2","useForkRef","WrapperForwardRef","_ref2","_ref2$forwardRef","__WRAPPER_PROPS_BIND__","_reduce","WrapperComponent","_reduce$ref","enhancementRef","props","_React$Component","_inherits2","_super","_createSuper2","_this","_classCallCheck2","_len","arguments","args","Array","_key","apply","concat","_defineProperty2","_assertThisInitialized2","_createClass2","value","render","_this2","map","fn","bind","React","hoistNonReactStatics","defaultProps","assign","wrapClass","OriginComponent","Context","inits","renders","contexts","_OriginComponent2","_super2","context","_this3","CORE_AS_PROPS","CORE_INSTANCE","CORE_INIT","_this4","Error","setContext","_this5","contextProps","_get2","_getPrototypeOf2","_this6","asProps","ctx","STATIC_COMPONENT","Provider","_objectSpread2","wrapFunction","memo","FunctionMemoComponent","selfRef","useRef","firstRender","useEnhancedEffect","current","wrapCore","_ref3","Root","createComposeComponent","PureComponent","isPrototypeOf","CORE_COMPONENT","assignProps","p1","p2","_assignProps","createComponent","childComponents","options","_options$context","createContext","_options$parent","parent","_options$enhancements","parents","isArray","wholeFamily","PARENT_COMPONENTS","_toConsumableArray2","f","i18nAppLocaleEnhance","bindHandlerEnhancement","childrenEnhancement","rootEnhancement","uncontrolledPropsEnhancement","staticChildrenEnhancement","functionDefaultPropsEnhancement","inheritedNameEnhancement","dataNameEnhancement","enhanceEnhancement","styleEnhancement","hoistPropsEnhancement","CONTEXT_COMPONENT","_______childrenComponents","CREATE_COMPONENT","_OriginComponent","_childComponents","_options","createBaseComponent","_default"],"sources":["../../src/core/index.tsx"],"sourcesContent":["import React, { ForwardRefExoticComponent, RefAttributes } from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\n\nimport { useForkRef } from '../ref';\nimport useEnhancedEffect from '../use/useEnhancedEffect';\nimport _assignProps from '../assignProps';\n\nimport {\n Component,\n PropsWithRenderFnChildren,\n wrapIntergalacticComponent,\n} from './types/Component';\nimport register from './register';\n\nimport childrenEnhancement, { CHILDREN_COMPONENT } from './enhancement/Children';\nimport rootEnhancement from './enhancement/Root';\nimport uncontrolledPropsEnhancement from './enhancement/uncontrolledProps';\nimport functionDefaultPropsEnhancement from './enhancement/functionDefaultProps';\nimport staticChildrenEnhancement, {\n STATIC_COMPONENT,\n ROOT_COMPONENT,\n getterMethodNameByDisplayName,\n} from './enhancement/staticChildren';\nimport inheritedNameEnhancement, { INHERITED_NAME } from './enhancement/inheritedName';\nimport hoistPropsEnhancement from './enhancement/hoistProps';\nimport dataNameEnhancement from './enhancement/dataName';\nimport enhanceEnhancement from './enhancement/enhance';\nimport styleEnhancement from './enhancement/style';\nimport bindHandlerEnhancement from './enhancement/bindHandler';\nimport i18nAppLocaleEnhance from './enhancement/i18n';\nimport {\n CORE_AS_PROPS,\n CORE_INIT,\n PARENT_COMPONENTS,\n CORE_INSTANCE,\n CORE_COMPONENT,\n CREATE_COMPONENT,\n CONTEXT_COMPONENT,\n} from './types/symbols';\n\nfunction isEmptyObject(obj: any) {\n return (\n Object.getOwnPropertyNames(obj).length === 0 &&\n Object.getOwnPropertySymbols && // For IE 11\n Object.getOwnPropertySymbols(obj).length === 0 &&\n Object.getPrototypeOf(obj) === Object.prototype\n );\n}\n\nfunction createGetField(enhancements: any, Component: any, isFunction: boolean) {\n return function getField(key: string) {\n return enhancements\n .filter((enhancement: any) => {\n if (!enhancement.condition) {\n return true;\n }\n return enhancement.condition(Component, isFunction);\n })\n .reduce((acc: any, item: any) => {\n if (item[key]) {\n acc.push(item[key]);\n }\n return acc;\n }, []);\n };\n}\n\nfunction createForwardWrapper(Component: any, wrapperProps: any, statics: any, isFunction: any) {\n const RootComponent = Component[ROOT_COMPONENT];\n const getterMethodName = getterMethodNameByDisplayName(Component?.displayName);\n const getterMethod = RootComponent?.prototype\n ? RootComponent.prototype[getterMethodName]\n : undefined;\n const useGetterIndex = getterMethod?.length >= 2;\n\n function WrapperForwardRefWithBind({ forwardRef = null, ...other }, ref: any) {\n return <BindingWrapper {...other} forwardRef={useForkRef(ref, forwardRef)} />;\n }\n\n function WrapperForwardRef(\n { forwardRef = null, __WRAPPER_PROPS_BIND__, ...other }: any,\n ref: any,\n ) {\n const { ref: enhancementRef = null, ...props } = (\n __WRAPPER_PROPS_BIND__ || wrapperProps\n ).reduce((acc: any, enhancement: any) => enhancement(acc, WrapperComponent, isFunction), other);\n return <Component {...props} forwardRef={useForkRef(enhancementRef, ref, forwardRef)} />;\n }\n\n class BindingWrapper extends React.Component<any> {\n index = -1;\n render() {\n return (\n <WrapperForwardRef\n {...this.props}\n __WRAPPER_PROPS_BIND__={wrapperProps.map((fn: any) => fn.bind(this))}\n />\n );\n }\n }\n\n const WrapperComponent = React.forwardRef(\n useGetterIndex ? WrapperForwardRefWithBind : WrapperForwardRef,\n );\n\n hoistNonReactStatics(WrapperComponent, Component);\n\n WrapperComponent.displayName = Component.displayName;\n // TODO: defaultProps is only empty\n WrapperComponent.defaultProps = Component.defaultProps;\n // STATIC\n statics.forEach((enhancement: any) =>\n Object.assign(WrapperComponent, enhancement(WrapperComponent, Component, isFunction)),\n );\n\n return WrapperComponent;\n}\n\nfunction wrapClass(OriginComponent: any, enhancements: any, Context: any) {\n const getField = createGetField(enhancements, OriginComponent, false);\n\n const inits = getField('init');\n const props = getField('asProps');\n const renders = getField('render');\n const statics = getField('static');\n const wrapperProps = getField('wrapperProps');\n const contexts = getField('context');\n\n class Component extends OriginComponent {\n [CORE_AS_PROPS] = null;\n [CORE_INSTANCE] = WrapperComponent;\n [CORE_INIT] = false;\n\n constructor(props: any, context: any) {\n super(props, context);\n // INITS\n inits.forEach((enhancement: any) => enhancement.call(this, props, WrapperComponent, false));\n this[CORE_INIT] = true;\n }\n\n get asProps() {\n // TODO if not production\n if (!this[CORE_INIT]) {\n throw new Error('Can not call asProps in constructor');\n }\n if (!this[CORE_AS_PROPS]) {\n // PROPS\n this[CORE_AS_PROPS] = props.reduce(\n (acc: any, enhancement: any) => enhancement.call(this, acc, WrapperComponent, false),\n this.props,\n );\n }\n return this[CORE_AS_PROPS];\n }\n\n setContext() {\n const contextProps = super.setContext ? super.setContext() : {};\n // CONTEXT\n return contexts.reduce(\n (acc: any, enhancement: any) => enhancement.call(this, acc, WrapperComponent, false),\n contextProps,\n );\n }\n\n render() {\n this[CORE_AS_PROPS] = null;\n // TODO if not production\n if (!super.render) {\n throw new Error('Component `render` method is not defined');\n }\n const asProps: any = this.asProps;\n const ctx = this.setContext();\n // RENDER\n const render = renders.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(this, acc, asProps, WrapperComponent, false),\n super.render(),\n );\n if (!WrapperComponent[STATIC_COMPONENT] && !isEmptyObject(ctx)) {\n return <Context.Provider value={{ ...asProps, ...ctx }}>{render}</Context.Provider>;\n } else {\n return render;\n }\n }\n }\n\n const WrapperComponent: any = createForwardWrapper(Component, wrapperProps, statics, false);\n return WrapperComponent;\n}\n\nfunction wrapFunction(OriginComponent: any, enhancements: any, Context: any) {\n const getField = createGetField(enhancements, OriginComponent, true);\n\n const inits = getField('init');\n const props = getField('asProps');\n const renders = getField('render');\n const statics = getField('static');\n const wrapperProps = getField('wrapperProps');\n const contexts = getField('context');\n\n const Component = React.memo(function FunctionMemoComponent(other) {\n const selfRef = React.useRef({});\n const firstRender = React.useRef(true);\n useEnhancedEffect(() => {\n firstRender.current = false;\n }, []);\n if (firstRender.current) {\n // INITS\n inits.forEach((enhancement: any) =>\n enhancement.call(selfRef.current, other, WrapperComponent, true),\n );\n }\n // PROPS\n const asProps = props.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(selfRef.current, acc, WrapperComponent, true),\n other,\n );\n // CONTEXT\n const ctx = contexts.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(selfRef.current, acc, WrapperComponent, true),\n {},\n );\n\n // RENDER\n const render = renders.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(selfRef.current, acc, asProps, WrapperComponent, true),\n <OriginComponent {...asProps} />,\n );\n\n if (!WrapperComponent[STATIC_COMPONENT] && !isEmptyObject(ctx)) {\n return <Context.Provider value={{ ...asProps, ...ctx }}>{render}</Context.Provider>;\n } else {\n return render;\n }\n });\n Object.assign(Component, OriginComponent);\n const WrapperComponent: any = createForwardWrapper(Component, wrapperProps, statics, true);\n return WrapperComponent;\n}\n\nfunction wrapCore(OriginComponent: any, enhancements: any, Context: any) {\n const Component = function ({ Root }: any) {\n const defaultProps = OriginComponent.defaultProps || {};\n return <Root {...defaultProps} render={OriginComponent} />;\n };\n hoistNonReactStatics(Component, OriginComponent);\n Component.displayName = OriginComponent.displayName;\n return wrapFunction(Component, enhancements, Context);\n}\n\nfunction createComposeComponent(OriginComponent: any, Context: any, enhancements: any): any {\n if (\n React.PureComponent.isPrototypeOf(OriginComponent) ||\n React.Component.isPrototypeOf(OriginComponent)\n ) {\n if (OriginComponent.prototype instanceof Component) {\n return wrapClass(OriginComponent, enhancements, Context);\n } else {\n throw new Error('Must inherit from our component');\n }\n } else if (typeof OriginComponent === 'function') {\n return wrapFunction(OriginComponent, enhancements, Context);\n } else if (OriginComponent[CORE_COMPONENT]) {\n return wrapCore(OriginComponent, enhancements, Context);\n } else {\n throw new Error('Must be a React component');\n }\n}\n\nexport type PropsAndRef<T, Ctx, UCProps> = PropsWithRenderFnChildren<T, Ctx, UCProps> &\n RefAttributes<unknown>;\nexport type ForwardRefComponent<T, Ctx, UCProps> = ForwardRefExoticComponent<\n PropsAndRef<T, Ctx, UCProps>\n>;\ntype ComponentOrProps<T, Context, UCProps> = T extends [infer ParentProps, infer ChildProps]\n ? ComponentType<ParentProps, ChildProps, Context, UCProps>\n : ForwardRefComponent<T, Context, UCProps>;\n\nexport type ComponentType<\n ComponentProps,\n ChildComponentProps = {},\n ContextType = {},\n UCProps = {},\n FNType = null,\n> = (FNType extends null\n ? ForwardRefComponent<ComponentProps, ContextType, UCProps>\n : FNType & { displayName: string }) & {\n [K in keyof ChildComponentProps]: ComponentOrProps<ChildComponentProps[K], ContextType, UCProps>;\n} & {\n [CORE_COMPONENT]: boolean;\n [CREATE_COMPONENT]: () => ComponentType<\n ComponentProps,\n ChildComponentProps,\n ContextType,\n UCProps\n >;\n};\n\ninterface ClassWithUncontrolledProps<Props> {\n uncontrolledProps(): unknown;\n}\n\nfunction assignProps(p1: any, p2: any) {\n return _assignProps(p2, p1);\n}\n\nfunction createComponent<ComponentProps, ChildComponentProps = {}, ContextType = {}, FNType = null>(\n OriginComponent: any,\n childComponents: any = {},\n options: {\n context?: React.Context<ContextType>;\n parent?: ComponentType<unknown> | ComponentType<unknown>[];\n enhancements?: [any];\n } = {},\n): ComponentType<\n ComponentProps extends Component<infer Props> ? Props : ComponentProps,\n ChildComponentProps,\n ContextType,\n ComponentProps extends ClassWithUncontrolledProps<any>\n ? ReturnType<ComponentProps['uncontrolledProps']>\n : { [key: string]: (arg: unknown) => void },\n FNType\n> {\n const {\n context = React.createContext<ContextType>({} as ContextType),\n parent = [],\n enhancements = [],\n } = options;\n let parents = Array.isArray(parent) ? parent : [parent];\n if (parents.length) {\n const wholeFamily = parents.reduce((acc: any, parent: any) => {\n if (parent[PARENT_COMPONENTS]) {\n acc = [...parent[PARENT_COMPONENTS], ...acc];\n }\n return acc;\n }, parents);\n OriginComponent[PARENT_COMPONENTS] = wholeFamily;\n parents = wholeFamily;\n }\n if (OriginComponent[CORE_COMPONENT]) {\n parents.push(OriginComponent);\n }\n const Component = createComposeComponent(OriginComponent, context, [\n // @ts-ignore\n ...enhancements.map((f) => f(context, parents, createComponent, childComponents)),\n i18nAppLocaleEnhance(),\n bindHandlerEnhancement(),\n childrenEnhancement(context, parents),\n // root must be under the children\n rootEnhancement(),\n uncontrolledPropsEnhancement(),\n staticChildrenEnhancement(childComponents, createComponent, {\n context,\n parent,\n enhancements,\n }),\n // functionDefaultProps must be under the staticChild\n functionDefaultPropsEnhancement(),\n // inheritedName must be under the staticChild\n inheritedNameEnhancement(),\n // dataName must be under the staticChild\n dataNameEnhancement(),\n // enhanceEnhancement must be under the functionDefaultPropsEnhancement\n enhanceEnhancement(),\n styleEnhancement(childComponents, context),\n // must be the last one so any properties can be raised\n hoistPropsEnhancement(childComponents, context),\n ]);\n Component[CONTEXT_COMPONENT] = context;\n Component._______childrenComponents = childComponents;\n Component[CREATE_COMPONENT] = function (\n _OriginComponent = OriginComponent,\n _childComponents = childComponents,\n _options = options,\n ) {\n return createComponent(_OriginComponent, _childComponents, _options);\n };\n Component[CORE_COMPONENT] = true;\n return Component;\n}\n\nfunction createBaseComponent<ComponentProps>(OriginComponent: any): ComponentType<ComponentProps> {\n let Component = null;\n if (\n !React.PureComponent.isPrototypeOf(OriginComponent) &&\n !React.Component.isPrototypeOf(OriginComponent) &&\n typeof OriginComponent === 'function'\n ) {\n Component = React.forwardRef(OriginComponent);\n Component.displayName = OriginComponent.displayName;\n Component.defaultProps = {\n 'data-ui-name': OriginComponent.displayName,\n ...OriginComponent.defaultProps,\n };\n (Component as any)[CORE_COMPONENT] = true;\n } else {\n throw new Error('createBaseComponent accepts only functional component');\n }\n return Component as any;\n}\n\nexport * from './types/index';\nexport * from './styled/index';\nexport * from './register';\nexport {\n createBaseComponent,\n register,\n CREATE_COMPONENT,\n CORE_INSTANCE,\n CONTEXT_COMPONENT,\n CHILDREN_COMPONENT,\n INHERITED_NAME,\n CORE_COMPONENT,\n STAT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EACtE,CAAC;EACD/I,SAAS,CAAC2G,uBAAc,CAAC,GAAG,IAAI;EAChC,OAAO3G,SAAS;AAClB;AAEA,SAASgJ,mBAAmBA,CAAiB5E,eAAoB,EAAiC;EAChG,IAAIpE,SAAS,GAAG,IAAI;EACpB,IACE,CAAC+D,iBAAK,CAAC0C,aAAa,CAACC,aAAa,CAACtC,eAAe,CAAC,IACnD,CAACL,iBAAK,CAAC/D,SAAS,CAAC0G,aAAa,CAACtC,eAAe,CAAC,IAC/C,OAAOA,eAAe,KAAK,UAAU,EACrC;IACApE,SAAS,gBAAG+D,iBAAK,CAACtC,UAAU,CAAC2C,eAAe,CAAC;IAC7CpE,SAAS,CAACiB,WAAW,GAAGmD,eAAe,CAACnD,WAAW;IACnDjB,SAAS,CAACiE,YAAY,OAAA2B,cAAA;MACpB,cAAc,EAAExB,eAAe,CAACnD;IAAW,GACxCmD,eAAe,CAACH,YAAY,CAChC;IACAjE,SAAS,CAAS2G,uBAAc,CAAC,GAAG,IAAI;EAC3C,CAAC,MAAM;IACL,MAAM,IAAI1B,KAAK,CAAC,uDAAuD,CAAC;EAC1E;EACA,OAAOjF,SAAS;AAClB;AAAC,IAAAiJ,QAAA,GAmBcjC,eAAe;AAAA9I,OAAA,cAAA+K,QAAA"}
@@ -340,8 +340,8 @@ function createBaseComponent(OriginComponent) {
340
340
  }
341
341
  return Component;
342
342
  }
343
- export * from "./types.mjs";
344
- export * from "./styled.mjs";
343
+ export * from "./types/index.mjs";
344
+ export * from "./styled/index.mjs";
345
345
  export * from "./register.mjs";
346
346
  export { createBaseComponent, register, CREATE_COMPONENT, CORE_INSTANCE, CONTEXT_COMPONENT, CHILDREN_COMPONENT, INHERITED_NAME, CORE_COMPONENT, STATIC_COMPONENT, ROOT_COMPONENT, assignProps };
347
347
  export default createComponent;
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["React","hoistNonReactStatics","useForkRef","useEnhancedEffect","_assignProps","Component","register","childrenEnhancement","CHILDREN_COMPONENT","rootEnhancement","uncontrolledPropsEnhancement","functionDefaultPropsEnhancement","staticChildrenEnhancement","STATIC_COMPONENT","ROOT_COMPONENT","getterMethodNameByDisplayName","inheritedNameEnhancement","INHERITED_NAME","hoistPropsEnhancement","dataNameEnhancement","enhanceEnhancement","styleEnhancement","bindHandlerEnhancement","i18nAppLocaleEnhance","CORE_AS_PROPS","CORE_INIT","PARENT_COMPONENTS","CORE_INSTANCE","CORE_COMPONENT","CREATE_COMPONENT","CONTEXT_COMPONENT","isEmptyObject","obj","Object","getOwnPropertyNames","length","getOwnPropertySymbols","getPrototypeOf","prototype","createGetField","enhancements","isFunction","getField","key","filter","enhancement","condition","reduce","acc","item","push","createForwardWrapper","wrapperProps","statics","RootComponent","getterMethodName","displayName","getterMethod","undefined","useGetterIndex","WrapperForwardRefWithBind","_ref","ref","_ref$forwardRef","forwardRef","other","_objectWithoutProperties","_excluded","createElement","BindingWrapper","_extends","WrapperForwardRef","_ref2","_ref2$forwardRef","__WRAPPER_PROPS_BIND__","_excluded2","_reduce","WrapperComponent","_reduce$ref","enhancementRef","props","_excluded3","_React$Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","_createClass","value","render","_this2","map","fn","bind","defaultProps","forEach","assign","wrapClass","OriginComponent","Context","inits","renders","contexts","_OriginComponent2","_super2","context","_this3","get","_this4","Error","setContext","_this5","contextProps","_get","_getPrototypeOf","_this6","asProps","ctx","Provider","_objectSpread","wrapFunction","memo","FunctionMemoComponent","selfRef","useRef","firstRender","current","wrapCore","_ref3","Root","createComposeComponent","PureComponent","isPrototypeOf","assignProps","p1","p2","createComponent","childComponents","options","_options$context","createContext","_options$parent","parent","_options$enhancements","parents","isArray","wholeFamily","_toConsumableArray","f","_______childrenComponents","_OriginComponent","_childComponents","_options","createBaseComponent"],"sources":["../../src/core/index.tsx"],"sourcesContent":["import React, { ForwardRefExoticComponent, RefAttributes } from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\n\nimport { useForkRef } from '../ref';\nimport useEnhancedEffect from '../use/useEnhancedEffect';\nimport _assignProps from '../assignProps';\n\nimport {\n Component,\n PropsWithRenderFnChildren,\n wrapIntergalacticComponent,\n} from './types/Component';\nimport register from './register';\n\nimport childrenEnhancement, { CHILDREN_COMPONENT } from './enhancement/Children';\nimport rootEnhancement from './enhancement/Root';\nimport uncontrolledPropsEnhancement from './enhancement/uncontrolledProps';\nimport functionDefaultPropsEnhancement from './enhancement/functionDefaultProps';\nimport staticChildrenEnhancement, {\n STATIC_COMPONENT,\n ROOT_COMPONENT,\n getterMethodNameByDisplayName,\n} from './enhancement/staticChildren';\nimport inheritedNameEnhancement, { INHERITED_NAME } from './enhancement/inheritedName';\nimport hoistPropsEnhancement from './enhancement/hoistProps';\nimport dataNameEnhancement from './enhancement/dataName';\nimport enhanceEnhancement from './enhancement/enhance';\nimport styleEnhancement from './enhancement/style';\nimport bindHandlerEnhancement from './enhancement/bindHandler';\nimport i18nAppLocaleEnhance from './enhancement/i18n';\nimport {\n CORE_AS_PROPS,\n CORE_INIT,\n PARENT_COMPONENTS,\n CORE_INSTANCE,\n CORE_COMPONENT,\n CREATE_COMPONENT,\n CONTEXT_COMPONENT,\n} from './types/symbols';\n\nfunction isEmptyObject(obj: any) {\n return (\n Object.getOwnPropertyNames(obj).length === 0 &&\n Object.getOwnPropertySymbols && // For IE 11\n Object.getOwnPropertySymbols(obj).length === 0 &&\n Object.getPrototypeOf(obj) === Object.prototype\n );\n}\n\nfunction createGetField(enhancements: any, Component: any, isFunction: boolean) {\n return function getField(key: string) {\n return enhancements\n .filter((enhancement: any) => {\n if (!enhancement.condition) {\n return true;\n }\n return enhancement.condition(Component, isFunction);\n })\n .reduce((acc: any, item: any) => {\n if (item[key]) {\n acc.push(item[key]);\n }\n return acc;\n }, []);\n };\n}\n\nfunction createForwardWrapper(Component: any, wrapperProps: any, statics: any, isFunction: any) {\n const RootComponent = Component[ROOT_COMPONENT];\n const getterMethodName = getterMethodNameByDisplayName(Component?.displayName);\n const getterMethod = RootComponent?.prototype\n ? RootComponent.prototype[getterMethodName]\n : undefined;\n const useGetterIndex = getterMethod?.length >= 2;\n\n function WrapperForwardRefWithBind({ forwardRef = null, ...other }, ref: any) {\n return <BindingWrapper {...other} forwardRef={useForkRef(ref, forwardRef)} />;\n }\n\n function WrapperForwardRef(\n { forwardRef = null, __WRAPPER_PROPS_BIND__, ...other }: any,\n ref: any,\n ) {\n const { ref: enhancementRef = null, ...props } = (\n __WRAPPER_PROPS_BIND__ || wrapperProps\n ).reduce((acc: any, enhancement: any) => enhancement(acc, WrapperComponent, isFunction), other);\n return <Component {...props} forwardRef={useForkRef(enhancementRef, ref, forwardRef)} />;\n }\n\n class BindingWrapper extends React.Component<any> {\n index = -1;\n render() {\n return (\n <WrapperForwardRef\n {...this.props}\n __WRAPPER_PROPS_BIND__={wrapperProps.map((fn: any) => fn.bind(this))}\n />\n );\n }\n }\n\n const WrapperComponent = React.forwardRef(\n useGetterIndex ? WrapperForwardRefWithBind : WrapperForwardRef,\n );\n\n hoistNonReactStatics(WrapperComponent, Component);\n\n WrapperComponent.displayName = Component.displayName;\n // TODO: defaultProps is only empty\n WrapperComponent.defaultProps = Component.defaultProps;\n // STATIC\n statics.forEach((enhancement: any) =>\n Object.assign(WrapperComponent, enhancement(WrapperComponent, Component, isFunction)),\n );\n\n return WrapperComponent;\n}\n\nfunction wrapClass(OriginComponent: any, enhancements: any, Context: any) {\n const getField = createGetField(enhancements, OriginComponent, false);\n\n const inits = getField('init');\n const props = getField('asProps');\n const renders = getField('render');\n const statics = getField('static');\n const wrapperProps = getField('wrapperProps');\n const contexts = getField('context');\n\n class Component extends OriginComponent {\n [CORE_AS_PROPS] = null;\n [CORE_INSTANCE] = WrapperComponent;\n [CORE_INIT] = false;\n\n constructor(props: any, context: any) {\n super(props, context);\n // INITS\n inits.forEach((enhancement: any) => enhancement.call(this, props, WrapperComponent, false));\n this[CORE_INIT] = true;\n }\n\n get asProps() {\n // TODO if not production\n if (!this[CORE_INIT]) {\n throw new Error('Can not call asProps in constructor');\n }\n if (!this[CORE_AS_PROPS]) {\n // PROPS\n this[CORE_AS_PROPS] = props.reduce(\n (acc: any, enhancement: any) => enhancement.call(this, acc, WrapperComponent, false),\n this.props,\n );\n }\n return this[CORE_AS_PROPS];\n }\n\n setContext() {\n const contextProps = super.setContext ? super.setContext() : {};\n // CONTEXT\n return contexts.reduce(\n (acc: any, enhancement: any) => enhancement.call(this, acc, WrapperComponent, false),\n contextProps,\n );\n }\n\n render() {\n this[CORE_AS_PROPS] = null;\n // TODO if not production\n if (!super.render) {\n throw new Error('Component `render` method is not defined');\n }\n const asProps: any = this.asProps;\n const ctx = this.setContext();\n // RENDER\n const render = renders.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(this, acc, asProps, WrapperComponent, false),\n super.render(),\n );\n if (!WrapperComponent[STATIC_COMPONENT] && !isEmptyObject(ctx)) {\n return <Context.Provider value={{ ...asProps, ...ctx }}>{render}</Context.Provider>;\n } else {\n return render;\n }\n }\n }\n\n const WrapperComponent: any = createForwardWrapper(Component, wrapperProps, statics, false);\n return WrapperComponent;\n}\n\nfunction wrapFunction(OriginComponent: any, enhancements: any, Context: any) {\n const getField = createGetField(enhancements, OriginComponent, true);\n\n const inits = getField('init');\n const props = getField('asProps');\n const renders = getField('render');\n const statics = getField('static');\n const wrapperProps = getField('wrapperProps');\n const contexts = getField('context');\n\n const Component = React.memo(function FunctionMemoComponent(other) {\n const selfRef = React.useRef({});\n const firstRender = React.useRef(true);\n useEnhancedEffect(() => {\n firstRender.current = false;\n }, []);\n if (firstRender.current) {\n // INITS\n inits.forEach((enhancement: any) =>\n enhancement.call(selfRef.current, other, WrapperComponent, true),\n );\n }\n // PROPS\n const asProps = props.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(selfRef.current, acc, WrapperComponent, true),\n other,\n );\n // CONTEXT\n const ctx = contexts.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(selfRef.current, acc, WrapperComponent, true),\n {},\n );\n\n // RENDER\n const render = renders.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(selfRef.current, acc, asProps, WrapperComponent, true),\n <OriginComponent {...asProps} />,\n );\n\n if (!WrapperComponent[STATIC_COMPONENT] && !isEmptyObject(ctx)) {\n return <Context.Provider value={{ ...asProps, ...ctx }}>{render}</Context.Provider>;\n } else {\n return render;\n }\n });\n Object.assign(Component, OriginComponent);\n const WrapperComponent: any = createForwardWrapper(Component, wrapperProps, statics, true);\n return WrapperComponent;\n}\n\nfunction wrapCore(OriginComponent: any, enhancements: any, Context: any) {\n const Component = function ({ Root }: any) {\n const defaultProps = OriginComponent.defaultProps || {};\n return <Root {...defaultProps} render={OriginComponent} />;\n };\n hoistNonReactStatics(Component, OriginComponent);\n Component.displayName = OriginComponent.displayName;\n return wrapFunction(Component, enhancements, Context);\n}\n\nfunction createComposeComponent(OriginComponent: any, Context: any, enhancements: any): any {\n if (\n React.PureComponent.isPrototypeOf(OriginComponent) ||\n React.Component.isPrototypeOf(OriginComponent)\n ) {\n if (OriginComponent.prototype instanceof Component) {\n return wrapClass(OriginComponent, enhancements, Context);\n } else {\n throw new Error('Must inherit from our component');\n }\n } else if (typeof OriginComponent === 'function') {\n return wrapFunction(OriginComponent, enhancements, Context);\n } else if (OriginComponent[CORE_COMPONENT]) {\n return wrapCore(OriginComponent, enhancements, Context);\n } else {\n throw new Error('Must be a React component');\n }\n}\n\nexport type PropsAndRef<T, Ctx, UCProps> = PropsWithRenderFnChildren<T, Ctx, UCProps> &\n RefAttributes<unknown>;\nexport type ForwardRefComponent<T, Ctx, UCProps> = ForwardRefExoticComponent<\n PropsAndRef<T, Ctx, UCProps>\n>;\ntype ComponentOrProps<T, Context, UCProps> = T extends [infer ParentProps, infer ChildProps]\n ? ComponentType<ParentProps, ChildProps, Context, UCProps>\n : ForwardRefComponent<T, Context, UCProps>;\n\nexport type ComponentType<\n ComponentProps,\n ChildComponentProps = {},\n ContextType = {},\n UCProps = {},\n FNType = null,\n> = (FNType extends null\n ? ForwardRefComponent<ComponentProps, ContextType, UCProps>\n : FNType & { displayName: string }) & {\n [K in keyof ChildComponentProps]: ComponentOrProps<ChildComponentProps[K], ContextType, UCProps>;\n} & {\n [CORE_COMPONENT]: boolean;\n [CREATE_COMPONENT]: () => ComponentType<\n ComponentProps,\n ChildComponentProps,\n ContextType,\n UCProps\n >;\n};\n\ninterface ClassWithUncontrolledProps<Props> {\n uncontrolledProps(): unknown;\n}\n\nfunction assignProps(p1: any, p2: any) {\n return _assignProps(p2, p1);\n}\n\nfunction createComponent<ComponentProps, ChildComponentProps = {}, ContextType = {}, FNType = null>(\n OriginComponent: any,\n childComponents: any = {},\n options: {\n context?: React.Context<ContextType>;\n parent?: ComponentType<unknown> | ComponentType<unknown>[];\n enhancements?: [any];\n } = {},\n): ComponentType<\n ComponentProps extends Component<infer Props> ? Props : ComponentProps,\n ChildComponentProps,\n ContextType,\n ComponentProps extends ClassWithUncontrolledProps<any>\n ? ReturnType<ComponentProps['uncontrolledProps']>\n : { [key: string]: (arg: unknown) => void },\n FNType\n> {\n const {\n context = React.createContext<ContextType>({} as ContextType),\n parent = [],\n enhancements = [],\n } = options;\n let parents = Array.isArray(parent) ? parent : [parent];\n if (parents.length) {\n const wholeFamily = parents.reduce((acc: any, parent: any) => {\n if (parent[PARENT_COMPONENTS]) {\n acc = [...parent[PARENT_COMPONENTS], ...acc];\n }\n return acc;\n }, parents);\n OriginComponent[PARENT_COMPONENTS] = wholeFamily;\n parents = wholeFamily;\n }\n if (OriginComponent[CORE_COMPONENT]) {\n parents.push(OriginComponent);\n }\n const Component = createComposeComponent(OriginComponent, context, [\n // @ts-ignore\n ...enhancements.map((f) => f(context, parents, createComponent, childComponents)),\n i18nAppLocaleEnhance(),\n bindHandlerEnhancement(),\n childrenEnhancement(context, parents),\n // root must be under the children\n rootEnhancement(),\n uncontrolledPropsEnhancement(),\n staticChildrenEnhancement(childComponents, createComponent, {\n context,\n parent,\n enhancements,\n }),\n // functionDefaultProps must be under the staticChild\n functionDefaultPropsEnhancement(),\n // inheritedName must be under the staticChild\n inheritedNameEnhancement(),\n // dataName must be under the staticChild\n dataNameEnhancement(),\n // enhanceEnhancement must be under the functionDefaultPropsEnhancement\n enhanceEnhancement(),\n styleEnhancement(childComponents, context),\n // must be the last one so any properties can be raised\n hoistPropsEnhancement(childComponents, context),\n ]);\n Component[CONTEXT_COMPONENT] = context;\n Component._______childrenComponents = childComponents;\n Component[CREATE_COMPONENT] = function (\n _OriginComponent = OriginComponent,\n _childComponents = childComponents,\n _options = options,\n ) {\n return createComponent(_OriginComponent, _childComponents, _options);\n };\n Component[CORE_COMPONENT] = true;\n return Component;\n}\n\nfunction createBaseComponent<ComponentProps>(OriginComponent: any): ComponentType<ComponentProps> {\n let Component = null;\n if (\n !React.PureComponent.isPrototypeOf(OriginComponent) &&\n !React.Component.isPrototypeOf(OriginComponent) &&\n typeof OriginComponent === 'function'\n ) {\n Component = React.forwardRef(OriginComponent);\n Component.displayName = OriginComponent.displayName;\n Component.defaultProps = {\n 'data-ui-name': OriginComponent.displayName,\n ...OriginComponent.defaultProps,\n };\n (Component as any)[CORE_COMPONENT] = true;\n } else {\n throw new Error('createBaseComponent accepts only functional component');\n }\n return Component as any;\n}\n\nexport * from './types';\nexport * from './styled';\nexport * from './register';\nexport {\n createBaseComponent,\n register,\n CREATE_COMPONENT,\n CORE_INSTANCE,\n CONTEXT_COMPONENT,\n CHILDREN_COMPONENT,\n INHERITED_NAME,\n CORE_COMPONENT,\n STATIC_COMPONENT,\n ROOT_COMPONENT,\n assignProps,\n};\n\nexport default createComponent;\n"],"mappings":";;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAoD,OAAO;AACvE,OAAOC,oBAAoB,MAAM,yBAAyB;AAE1D,SAASC,UAAU,QAAQ,YAAQ;AACnC,OAAOC,iBAAiB,MAAM,8BAA0B;AACxD,OAAOC,YAAY,MAAM,oBAAgB;AAEzC,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gBAAY;AAC1B,SACE+J,mBAAmB,EACnB9J,QAAQ,EACRuB,gBAAgB,EAChBF,aAAa,EACbG,iBAAiB,EACjBtB,kBAAkB,EAClBS,cAAc,EACdW,cAAc,EACdf,gBAAgB,EAChBC,cAAc,EACdkI,WAAW;AAGb,eAAeG,eAAe"}
1
+ {"version":3,"file":"index.mjs","names":["React","hoistNonReactStatics","useForkRef","useEnhancedEffect","_assignProps","Component","register","childrenEnhancement","CHILDREN_COMPONENT","rootEnhancement","uncontrolledPropsEnhancement","functionDefaultPropsEnhancement","staticChildrenEnhancement","STATIC_COMPONENT","ROOT_COMPONENT","getterMethodNameByDisplayName","inheritedNameEnhancement","INHERITED_NAME","hoistPropsEnhancement","dataNameEnhancement","enhanceEnhancement","styleEnhancement","bindHandlerEnhancement","i18nAppLocaleEnhance","CORE_AS_PROPS","CORE_INIT","PARENT_COMPONENTS","CORE_INSTANCE","CORE_COMPONENT","CREATE_COMPONENT","CONTEXT_COMPONENT","isEmptyObject","obj","Object","getOwnPropertyNames","length","getOwnPropertySymbols","getPrototypeOf","prototype","createGetField","enhancements","isFunction","getField","key","filter","enhancement","condition","reduce","acc","item","push","createForwardWrapper","wrapperProps","statics","RootComponent","getterMethodName","displayName","getterMethod","undefined","useGetterIndex","WrapperForwardRefWithBind","_ref","ref","_ref$forwardRef","forwardRef","other","_objectWithoutProperties","_excluded","createElement","BindingWrapper","_extends","WrapperForwardRef","_ref2","_ref2$forwardRef","__WRAPPER_PROPS_BIND__","_excluded2","_reduce","WrapperComponent","_reduce$ref","enhancementRef","props","_excluded3","_React$Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","_createClass","value","render","_this2","map","fn","bind","defaultProps","forEach","assign","wrapClass","OriginComponent","Context","inits","renders","contexts","_OriginComponent2","_super2","context","_this3","get","_this4","Error","setContext","_this5","contextProps","_get","_getPrototypeOf","_this6","asProps","ctx","Provider","_objectSpread","wrapFunction","memo","FunctionMemoComponent","selfRef","useRef","firstRender","current","wrapCore","_ref3","Root","createComposeComponent","PureComponent","isPrototypeOf","assignProps","p1","p2","createComponent","childComponents","options","_options$context","createContext","_options$parent","parent","_options$enhancements","parents","isArray","wholeFamily","_toConsumableArray","f","_______childrenComponents","_OriginComponent","_childComponents","_options","createBaseComponent"],"sources":["../../src/core/index.tsx"],"sourcesContent":["import React, { ForwardRefExoticComponent, RefAttributes } from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\n\nimport { useForkRef } from '../ref';\nimport useEnhancedEffect from '../use/useEnhancedEffect';\nimport _assignProps from '../assignProps';\n\nimport {\n Component,\n PropsWithRenderFnChildren,\n wrapIntergalacticComponent,\n} from './types/Component';\nimport register from './register';\n\nimport childrenEnhancement, { CHILDREN_COMPONENT } from './enhancement/Children';\nimport rootEnhancement from './enhancement/Root';\nimport uncontrolledPropsEnhancement from './enhancement/uncontrolledProps';\nimport functionDefaultPropsEnhancement from './enhancement/functionDefaultProps';\nimport staticChildrenEnhancement, {\n STATIC_COMPONENT,\n ROOT_COMPONENT,\n getterMethodNameByDisplayName,\n} from './enhancement/staticChildren';\nimport inheritedNameEnhancement, { INHERITED_NAME } from './enhancement/inheritedName';\nimport hoistPropsEnhancement from './enhancement/hoistProps';\nimport dataNameEnhancement from './enhancement/dataName';\nimport enhanceEnhancement from './enhancement/enhance';\nimport styleEnhancement from './enhancement/style';\nimport bindHandlerEnhancement from './enhancement/bindHandler';\nimport i18nAppLocaleEnhance from './enhancement/i18n';\nimport {\n CORE_AS_PROPS,\n CORE_INIT,\n PARENT_COMPONENTS,\n CORE_INSTANCE,\n CORE_COMPONENT,\n CREATE_COMPONENT,\n CONTEXT_COMPONENT,\n} from './types/symbols';\n\nfunction isEmptyObject(obj: any) {\n return (\n Object.getOwnPropertyNames(obj).length === 0 &&\n Object.getOwnPropertySymbols && // For IE 11\n Object.getOwnPropertySymbols(obj).length === 0 &&\n Object.getPrototypeOf(obj) === Object.prototype\n );\n}\n\nfunction createGetField(enhancements: any, Component: any, isFunction: boolean) {\n return function getField(key: string) {\n return enhancements\n .filter((enhancement: any) => {\n if (!enhancement.condition) {\n return true;\n }\n return enhancement.condition(Component, isFunction);\n })\n .reduce((acc: any, item: any) => {\n if (item[key]) {\n acc.push(item[key]);\n }\n return acc;\n }, []);\n };\n}\n\nfunction createForwardWrapper(Component: any, wrapperProps: any, statics: any, isFunction: any) {\n const RootComponent = Component[ROOT_COMPONENT];\n const getterMethodName = getterMethodNameByDisplayName(Component?.displayName);\n const getterMethod = RootComponent?.prototype\n ? RootComponent.prototype[getterMethodName]\n : undefined;\n const useGetterIndex = getterMethod?.length >= 2;\n\n function WrapperForwardRefWithBind({ forwardRef = null, ...other }, ref: any) {\n return <BindingWrapper {...other} forwardRef={useForkRef(ref, forwardRef)} />;\n }\n\n function WrapperForwardRef(\n { forwardRef = null, __WRAPPER_PROPS_BIND__, ...other }: any,\n ref: any,\n ) {\n const { ref: enhancementRef = null, ...props } = (\n __WRAPPER_PROPS_BIND__ || wrapperProps\n ).reduce((acc: any, enhancement: any) => enhancement(acc, WrapperComponent, isFunction), other);\n return <Component {...props} forwardRef={useForkRef(enhancementRef, ref, forwardRef)} />;\n }\n\n class BindingWrapper extends React.Component<any> {\n index = -1;\n render() {\n return (\n <WrapperForwardRef\n {...this.props}\n __WRAPPER_PROPS_BIND__={wrapperProps.map((fn: any) => fn.bind(this))}\n />\n );\n }\n }\n\n const WrapperComponent = React.forwardRef(\n useGetterIndex ? WrapperForwardRefWithBind : WrapperForwardRef,\n );\n\n hoistNonReactStatics(WrapperComponent, Component);\n\n WrapperComponent.displayName = Component.displayName;\n // TODO: defaultProps is only empty\n WrapperComponent.defaultProps = Component.defaultProps;\n // STATIC\n statics.forEach((enhancement: any) =>\n Object.assign(WrapperComponent, enhancement(WrapperComponent, Component, isFunction)),\n );\n\n return WrapperComponent;\n}\n\nfunction wrapClass(OriginComponent: any, enhancements: any, Context: any) {\n const getField = createGetField(enhancements, OriginComponent, false);\n\n const inits = getField('init');\n const props = getField('asProps');\n const renders = getField('render');\n const statics = getField('static');\n const wrapperProps = getField('wrapperProps');\n const contexts = getField('context');\n\n class Component extends OriginComponent {\n [CORE_AS_PROPS] = null;\n [CORE_INSTANCE] = WrapperComponent;\n [CORE_INIT] = false;\n\n constructor(props: any, context: any) {\n super(props, context);\n // INITS\n inits.forEach((enhancement: any) => enhancement.call(this, props, WrapperComponent, false));\n this[CORE_INIT] = true;\n }\n\n get asProps() {\n // TODO if not production\n if (!this[CORE_INIT]) {\n throw new Error('Can not call asProps in constructor');\n }\n if (!this[CORE_AS_PROPS]) {\n // PROPS\n this[CORE_AS_PROPS] = props.reduce(\n (acc: any, enhancement: any) => enhancement.call(this, acc, WrapperComponent, false),\n this.props,\n );\n }\n return this[CORE_AS_PROPS];\n }\n\n setContext() {\n const contextProps = super.setContext ? super.setContext() : {};\n // CONTEXT\n return contexts.reduce(\n (acc: any, enhancement: any) => enhancement.call(this, acc, WrapperComponent, false),\n contextProps,\n );\n }\n\n render() {\n this[CORE_AS_PROPS] = null;\n // TODO if not production\n if (!super.render) {\n throw new Error('Component `render` method is not defined');\n }\n const asProps: any = this.asProps;\n const ctx = this.setContext();\n // RENDER\n const render = renders.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(this, acc, asProps, WrapperComponent, false),\n super.render(),\n );\n if (!WrapperComponent[STATIC_COMPONENT] && !isEmptyObject(ctx)) {\n return <Context.Provider value={{ ...asProps, ...ctx }}>{render}</Context.Provider>;\n } else {\n return render;\n }\n }\n }\n\n const WrapperComponent: any = createForwardWrapper(Component, wrapperProps, statics, false);\n return WrapperComponent;\n}\n\nfunction wrapFunction(OriginComponent: any, enhancements: any, Context: any) {\n const getField = createGetField(enhancements, OriginComponent, true);\n\n const inits = getField('init');\n const props = getField('asProps');\n const renders = getField('render');\n const statics = getField('static');\n const wrapperProps = getField('wrapperProps');\n const contexts = getField('context');\n\n const Component = React.memo(function FunctionMemoComponent(other) {\n const selfRef = React.useRef({});\n const firstRender = React.useRef(true);\n useEnhancedEffect(() => {\n firstRender.current = false;\n }, []);\n if (firstRender.current) {\n // INITS\n inits.forEach((enhancement: any) =>\n enhancement.call(selfRef.current, other, WrapperComponent, true),\n );\n }\n // PROPS\n const asProps = props.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(selfRef.current, acc, WrapperComponent, true),\n other,\n );\n // CONTEXT\n const ctx = contexts.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(selfRef.current, acc, WrapperComponent, true),\n {},\n );\n\n // RENDER\n const render = renders.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(selfRef.current, acc, asProps, WrapperComponent, true),\n <OriginComponent {...asProps} />,\n );\n\n if (!WrapperComponent[STATIC_COMPONENT] && !isEmptyObject(ctx)) {\n return <Context.Provider value={{ ...asProps, ...ctx }}>{render}</Context.Provider>;\n } else {\n return render;\n }\n });\n Object.assign(Component, OriginComponent);\n const WrapperComponent: any = createForwardWrapper(Component, wrapperProps, statics, true);\n return WrapperComponent;\n}\n\nfunction wrapCore(OriginComponent: any, enhancements: any, Context: any) {\n const Component = function ({ Root }: any) {\n const defaultProps = OriginComponent.defaultProps || {};\n return <Root {...defaultProps} render={OriginComponent} />;\n };\n hoistNonReactStatics(Component, OriginComponent);\n Component.displayName = OriginComponent.displayName;\n return wrapFunction(Component, enhancements, Context);\n}\n\nfunction createComposeComponent(OriginComponent: any, Context: any, enhancements: any): any {\n if (\n React.PureComponent.isPrototypeOf(OriginComponent) ||\n React.Component.isPrototypeOf(OriginComponent)\n ) {\n if (OriginComponent.prototype instanceof Component) {\n return wrapClass(OriginComponent, enhancements, Context);\n } else {\n throw new Error('Must inherit from our component');\n }\n } else if (typeof OriginComponent === 'function') {\n return wrapFunction(OriginComponent, enhancements, Context);\n } else if (OriginComponent[CORE_COMPONENT]) {\n return wrapCore(OriginComponent, enhancements, Context);\n } else {\n throw new Error('Must be a React component');\n }\n}\n\nexport type PropsAndRef<T, Ctx, UCProps> = PropsWithRenderFnChildren<T, Ctx, UCProps> &\n RefAttributes<unknown>;\nexport type ForwardRefComponent<T, Ctx, UCProps> = ForwardRefExoticComponent<\n PropsAndRef<T, Ctx, UCProps>\n>;\ntype ComponentOrProps<T, Context, UCProps> = T extends [infer ParentProps, infer ChildProps]\n ? ComponentType<ParentProps, ChildProps, Context, UCProps>\n : ForwardRefComponent<T, Context, UCProps>;\n\nexport type ComponentType<\n ComponentProps,\n ChildComponentProps = {},\n ContextType = {},\n UCProps = {},\n FNType = null,\n> = (FNType extends null\n ? ForwardRefComponent<ComponentProps, ContextType, UCProps>\n : FNType & { displayName: string }) & {\n [K in keyof ChildComponentProps]: ComponentOrProps<ChildComponentProps[K], ContextType, UCProps>;\n} & {\n [CORE_COMPONENT]: boolean;\n [CREATE_COMPONENT]: () => ComponentType<\n ComponentProps,\n ChildComponentProps,\n ContextType,\n UCProps\n >;\n};\n\ninterface ClassWithUncontrolledProps<Props> {\n uncontrolledProps(): unknown;\n}\n\nfunction assignProps(p1: any, p2: any) {\n return _assignProps(p2, p1);\n}\n\nfunction createComponent<ComponentProps, ChildComponentProps = {}, ContextType = {}, FNType = null>(\n OriginComponent: any,\n childComponents: any = {},\n options: {\n context?: React.Context<ContextType>;\n parent?: ComponentType<unknown> | ComponentType<unknown>[];\n enhancements?: [any];\n } = {},\n): ComponentType<\n ComponentProps extends Component<infer Props> ? Props : ComponentProps,\n ChildComponentProps,\n ContextType,\n ComponentProps extends ClassWithUncontrolledProps<any>\n ? ReturnType<ComponentProps['uncontrolledProps']>\n : { [key: string]: (arg: unknown) => void },\n FNType\n> {\n const {\n context = React.createContext<ContextType>({} as ContextType),\n parent = [],\n enhancements = [],\n } = options;\n let parents = Array.isArray(parent) ? parent : [parent];\n if (parents.length) {\n const wholeFamily = parents.reduce((acc: any, parent: any) => {\n if (parent[PARENT_COMPONENTS]) {\n acc = [...parent[PARENT_COMPONENTS], ...acc];\n }\n return acc;\n }, parents);\n OriginComponent[PARENT_COMPONENTS] = wholeFamily;\n parents = wholeFamily;\n }\n if (OriginComponent[CORE_COMPONENT]) {\n parents.push(OriginComponent);\n }\n const Component = createComposeComponent(OriginComponent, context, [\n // @ts-ignore\n ...enhancements.map((f) => f(context, parents, createComponent, childComponents)),\n i18nAppLocaleEnhance(),\n bindHandlerEnhancement(),\n childrenEnhancement(context, parents),\n // root must be under the children\n rootEnhancement(),\n uncontrolledPropsEnhancement(),\n staticChildrenEnhancement(childComponents, createComponent, {\n context,\n parent,\n enhancements,\n }),\n // functionDefaultProps must be under the staticChild\n functionDefaultPropsEnhancement(),\n // inheritedName must be under the staticChild\n inheritedNameEnhancement(),\n // dataName must be under the staticChild\n dataNameEnhancement(),\n // enhanceEnhancement must be under the functionDefaultPropsEnhancement\n enhanceEnhancement(),\n styleEnhancement(childComponents, context),\n // must be the last one so any properties can be raised\n hoistPropsEnhancement(childComponents, context),\n ]);\n Component[CONTEXT_COMPONENT] = context;\n Component._______childrenComponents = childComponents;\n Component[CREATE_COMPONENT] = function (\n _OriginComponent = OriginComponent,\n _childComponents = childComponents,\n _options = options,\n ) {\n return createComponent(_OriginComponent, _childComponents, _options);\n };\n Component[CORE_COMPONENT] = true;\n return Component;\n}\n\nfunction createBaseComponent<ComponentProps>(OriginComponent: any): ComponentType<ComponentProps> {\n let Component = null;\n if (\n !React.PureComponent.isPrototypeOf(OriginComponent) &&\n !React.Component.isPrototypeOf(OriginComponent) &&\n typeof OriginComponent === 'function'\n ) {\n Component = React.forwardRef(OriginComponent);\n Component.displayName = OriginComponent.displayName;\n Component.defaultProps = {\n 'data-ui-name': OriginComponent.displayName,\n ...OriginComponent.defaultProps,\n };\n (Component as any)[CORE_COMPONENT] = true;\n } else {\n throw new Error('createBaseComponent accepts only functional component');\n }\n return Component as any;\n}\n\nexport * from './types/index';\nexport * from './styled/index';\nexport * from './register';\nexport {\n createBaseComponent,\n register,\n CREATE_COMPONENT,\n CORE_INSTANCE,\n CONTEXT_COMPONENT,\n CHILDREN_COMPONENT,\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D,SAAS,CAACoG,YAAY,GAAAyB,aAAA;MACpB,cAAc,EAAErB,eAAe,CAACrD;IAAW,GACxCqD,eAAe,CAACJ,YAAY,CAChC;IACApG,SAAS,CAASuB,cAAc,CAAC,GAAG,IAAI;EAC3C,CAAC,MAAM;IACL,MAAM,IAAI4F,KAAK,CAAC,uDAAuD,CAAC;EAC1E;EACA,OAAOnH,SAAS;AAClB;AAEA,cAAc,mBAAe;AAC7B,cAAc,oBAAgB;AAC9B,cAAc,gBAAY;AAC1B,SACE+J,mBAAmB,EACnB9J,QAAQ,EACRuB,gBAAgB,EAChBF,aAAa,EACbG,iBAAiB,EACjBtB,kBAAkB,EAClBS,cAAc,EACdW,cAAc,EACdf,gBAAgB,EAChBC,cAAc,EACdkI,WAAW;AAGb,eAAeG,eAAe"}
@@ -1,5 +1,5 @@
1
1
  import React, { AllHTMLAttributes, ForwardRefExoticComponent, PureComponent, ReactNode, RefAttributes, RefObject } from 'react';
2
- import { IStyledProps } from '../styled';
2
+ import { IStyledProps } from '../styled/index';
3
3
  import { CORE_COMPONENT, CREATE_COMPONENT } from './symbols';
4
4
  /** @deprecated */
5
5
  type KnownKeys<T> = {
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","names":["_react","require","_symbols","Root","undefined","exports","RootComponent","_PureComponent","_inherits2","_super","_createSuper2","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty2","_assertThisInitialized2","_createClass2","key","get","PureComponent","Component","Intergalactic","_Intergalactic","InternalTypings","_InternalTypings","wrapIntergalacticComponent","wrapper"],"sources":["../../../src/core/types/Component.ts"],"sourcesContent":["import React, {\n AllHTMLAttributes,\n ForwardRefExoticComponent,\n PureComponent,\n ReactNode,\n RefAttributes,\n RefObject,\n} from 'react';\nimport { IStyledProps } from '../styled';\nimport { CORE_COMPONENT, CREATE_COMPONENT } from './symbols';\n\n/** @deprecated */\ntype KnownKeys<T> = {\n [K in keyof T]: string extends K ? never : number extends K ? never : K;\n} extends { [_ in keyof T]: infer U }\n ? U\n : never;\n\n/** @deprecated */\nexport type HandlersType<UCProps> = { [K in keyof UCProps]?: <T = unknown>(arg: T) => void };\n/** @deprecated */\nexport type ChildrenType<Props = {}, Ctx = {}, UCProps = {}> =\n | ((props: Props & Ctx, handlers: HandlersType<UCProps>) => ReactNode)\n | ReactNode;\n\n/** @deprecated */\nexport type RootComponentHandler = (...args: any[]) => void | false;\n\n/** @deprecated */\nexport interface IRootComponentHandlers {\n [key: string]: RootComponentHandler;\n}\n\n/** @deprecated */\nexport interface IRootComponentProps<Props = {}, Ctx = {}> {\n forwardRef?: RefObject<any>;\n Children?: any;\n children?: ChildrenType<Props, Ctx>;\n styles?: IStyledProps['styles'];\n 'data-ui-name'?: string;\n}\n\n/** @deprecated */\nexport type IComponentProps<Props = {}, Ctx = {}> = Props & IRootComponentProps<Props, Ctx>;\n\n/** @deprecated */\nexport type IFunctionProps<Props = {}, Ctx = {}> = IComponentProps<Props, Ctx> &\n Omit<AllHTMLAttributes<any>, keyof IComponentProps<Props, Ctx>> & { Root?: Root };\n\n/** @deprecated */\nexport type PropsWithRenderFnChildren<Props = {}, Ctx = {}, UCProps = {}> = Omit<\n Pick<Props, KnownKeys<Props>>,\n 'children'\n> & {\n children?: ChildrenType<Props, Ctx, UCProps>;\n [key: string]: unknown;\n};\n\n/** @deprecated */\nexport type CProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?: ((props: Props & Ctx, handlers: UCProps) => React.ReactNode) | React.ReactNode;\n};\n/** @deprecated */\nexport type ReturnEl = React.ReactElement | null;\n\nexport interface IRootNodeProps {\n render: React.ElementType | string;\n tag?: React.ElementType | string;\n\n [key: string]: any;\n}\n\ntype Root = ForwardRefExoticComponent<IRootNodeProps>;\n\n/**\n * @deprecated since version ^1.8.0\n */\nexport type PropGetter<T extends (...args: any) => any> = <P>(props?: P) => ReturnType<T> & P;\n/**\n * @deprecated since version ^1.8.0\n */\n/** @deprecated */\nexport type PropGetterReturn<T extends (...args: any) => any> = Partial<ReturnType<T>>;\n/** @deprecated */\nexport type PropGetterFn = <T extends {}>(props?: T) => T & { [key: string]: unknown };\n/** @deprecated */\nexport type Merge<Props, HTMLProps> = Props & Omit<HTMLProps, keyof Props>;\n/** @deprecated */\nexport type MergeGetters<G1 extends (...args: any) => any, G2 extends (...args: any) => any> = <P>(\n props?: P,\n) => Merge<ReturnType<G1>, ReturnType<G2>> & P;\n\nconst Root: Root = undefined as any;\n\nexport { Root };\n\n/** @deprecated */\nabstract class RootComponent<\n Props = {},\n Context = {},\n State = {},\n Enhance = {},\n> extends PureComponent<Props, State> {\n get handlers(): Readonly<IRootComponentHandlers> {\n return {};\n }\n\n get asProps() {\n return {} as Readonly<\n Merge<Props & IRootComponentProps<Props, Context> & Enhance, AllHTMLAttributes<any>>\n >;\n }\n\n Root: Root = undefined as any;\n\n isControlled = false;\n}\n\nexport const Component = RootComponent;\n/** @deprecated */\nexport type Component<\n Props = {},\n Context = {},\n State = {},\n Handlers extends IRootComponentHandlers = IRootComponentHandlers,\n> = React.ComponentClass<Props, State> & {\n isControlled: boolean;\n\n handlers: Readonly<Handlers>;\n\n asProps: Readonly<Merge<Props & IRootComponentProps<Props, Context>, AllHTMLAttributes<any>>>;\n\n Root: Root;\n};\n\nexport namespace Intergalactic {\n type ReactFCProps<C extends React.FC> = C extends React.FC<infer Props> ? Omit<Props, 'tag'> : {};\n type ReactComponentProps<C extends React.ComponentClass> = C extends React.ComponentClass<\n infer Props\n >\n ? Omit<Props, 'tag'>\n : never;\n type ReactFCLike = (props: any) => any;\n type ReactFCLikeProps<C extends ReactFCLike> = C extends (props: infer Props) => any ? Props : {};\n type ComponentChildren<\n Props,\n Context,\n RenderingResult = InternalTypings.ReturnResult,\n AdditionalContext extends any[] = never[],\n > =\n | ((props: MergeProps<Context, Props>, ...args: AdditionalContext) => RenderingResult)\n | InternalTypings.ReturnResult;\n type ComponentBasicProps<Tag extends InternalTypings.ComponentTag> = {\n ref?: React.Ref<InternalTypings.ComponentHtmlElement<Tag> | null>;\n /** @private DO NOT USE IT. Low-level api that prevents specified props from being applied as DOM attribute. */\n __excludeProps?: string[];\n };\n type MergeProps<HighPriorityProps, LowPriorityProps> = {\n [K in keyof LowPriorityProps]: K extends keyof HighPriorityProps\n ? HighPriorityProps[K]\n : LowPriorityProps[K];\n } & HighPriorityProps;\n /** @private */\n export namespace InternalTypings {\n export type EfficientOmit<Type, Keys> = {\n [Property in keyof Type as Exclude<Property, Keys>]: Type[Property];\n };\n export type ComponentPropsNesting<Tag extends InternalTypings.ComponentTag> = Omit<\n MergeProps<\n Tag extends React.FC\n ? ReactFCProps<Tag>\n : Tag extends React.ComponentClass\n ? ReactComponentProps<Tag>\n : Tag extends ReactFCLike\n ? ReactFCLikeProps<Tag>\n : Tag extends keyof JSX.IntrinsicElements\n ? JSX.IntrinsicElements[Tag]\n : {},\n Tag extends { __nestedProps: infer NestedProps } ? NestedProps : {}\n >,\n 'children' | 'tag'\n >;\n export type ReturnResult =\n | React.ReactElement\n | React.ReactNode\n | React.ReactNode[]\n | string\n | null;\n export type ComponentTag =\n | keyof JSX.IntrinsicElements\n | React.ComponentClass\n | React.FC\n | ReactFCLike;\n export type ComponentProps<\n Tag extends ComponentTag,\n BaseTag extends ComponentTag | never,\n Props,\n Context = never,\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n ReturnResult,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<\n EfficientOmit<Props, 'tag' | 'children'>,\n MergeProps<ComponentPropsNesting<Tag>, ComponentPropsNesting<BaseTag>>\n >;\n export type PropsRenderingResultComponentProps<\n Tag extends ComponentTag,\n Props,\n Context = {},\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n Partial<\n EfficientOmit<\n MergeProps<Props, ComponentPropsNesting<Tag>>,\n 'children' | 'tag' | 'ref'\n > & {\n children?: React.ReactNode;\n }\n >,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<EfficientOmit<Props, 'tag' | 'children'>, ComponentPropsNesting<Tag>>;\n export type ComponentRenderingResults = React.ReactElement;\n export type ComponentAdditive<\n BaseTag extends ComponentTag,\n Tag extends ComponentTag,\n Props = {},\n Context = {},\n AdditionalContext = {},\n > = {\n __nestedProps: ComponentPropsNesting<BaseTag>;\n __tag: Tag;\n __props: Props;\n __context: Context;\n __additionalContext: AdditionalContext;\n };\n export type InferJsxIntrinsicElement<T extends React.DetailedHTMLProps<any, any>> =\n T extends React.DetailedHTMLProps<infer _, infer Element> ? Element : HTMLElement;\n type InferElementFromRef<T> = T extends React.Ref<infer Element> ? Element : never;\n type InferRefElementFromProps<T> = 'ref' extends keyof T\n ? InferElementFromRef<T['ref']>\n : HTMLElement;\n export type ComponentHtmlElement<Tag extends ComponentTag> =\n Tag extends keyof JSX.IntrinsicElements\n ? InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>\n : Tag extends { __nestedProps: infer NestedProps }\n ? InferRefElementFromProps<NestedProps>\n : HTMLElement;\n export type UntypeRefAndTag<Props> = Intergalactic.InternalTypings.EfficientOmit<\n Props,\n 'ref' | 'tag'\n > & {\n ref: React.Ref<any>;\n tag: Intergalactic.InternalTypings.ComponentTag;\n };\n }\n export type Component<\n BaseTag extends InternalTypings.ComponentTag = never,\n BaseProps = {},\n Context = {},\n AdditionalContext extends any[] = never[],\n > = (<Tag extends InternalTypings.ComponentTag = BaseTag, Props extends BaseProps = BaseProps>(\n props: InternalTypings.ComponentProps<Tag, BaseTag, Props, Context, AdditionalContext>,\n ) => InternalTypings.ComponentRenderingResults) &\n InternalTypings.ComponentAdditive<BaseTag, Tag, BaseProps, Context, AdditionalContext>;\n export type Tag = InternalTypings.ComponentTag;\n export type DomProps<Tag extends keyof JSX.IntrinsicElements> =\n InternalTypings.InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>;\n}\n\nexport const wrapIntergalacticComponent = <\n Component extends Intergalactic.Component<any, any, any, any>,\n PropsExtending = {},\n>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<Component>\n > &\n PropsExtending,\n ) => React.ReactNode,\n): Intergalactic.Component<\n Component['__tag'],\n Component['__props'] & Component['__nestedProps'] & PropsExtending,\n Component['__context'],\n Component['__additionalContext']\n> => wrapper as any;\n\nexport type PropsAndRef<T, Ctx, UCProps> = PropsWithRenderFnChildren<T, Ctx, UCProps> &\n RefAttributes<unknown>;\nexport type ForwardRefComponent<T, Ctx, UCProps> = ForwardRefExoticComponent<\n PropsAndRef<T, Ctx, UCProps>\n>;\ntype ComponentOrProps<T, Context, UCProps> = T extends [infer ParentProps, infer ChildProps]\n ? ComponentType<ParentProps, ChildProps, Context, UCProps>\n : ForwardRefComponent<T, Context, UCProps>;\n\nexport type ComponentType<\n ComponentProps,\n ChildComponentProps = {},\n ContextType = {},\n UCProps = {},\n FNType = null,\n> = (FNType extends null\n ? ForwardRefComponent<ComponentProps, ContextType, UCProps>\n : FNType & { displayName: string }) & {\n [K in keyof ChildComponentProps]: ComponentOrProps<ChildComponentProps[K], ContextType, UCProps>;\n} & {\n [CORE_COMPONENT]: boolean;\n [CREATE_COMPONENT]: () => ComponentType<\n ComponentProps,\n ChildComponentProps,\n ContextType,\n UCProps\n >;\n};\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AASA,IAAAC,QAAA,GAAAD,OAAA;AAmFA,IAAME,IAAU,GAAGC,SAAgB;AAACC,OAAA,CAAAF,IAAA,GAAAA,IAAA;AAIpC;AAAA,IACeG,aAAa,0BAAAC,cAAA;EAAA,IAAAC,UAAA,aAAAF,aAAA,EAAAC,cAAA;EAAA,IAAAE,MAAA,OAAAC,aAAA,aAAAJ,aAAA;EAAA,SAAAA,cAAA;IAAA,IAAA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}
1
+ {"version":3,"file":"Component.js","names":["_react","require","_symbols","Root","undefined","exports","RootComponent","_PureComponent","_inherits2","_super","_createSuper2","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty2","_assertThisInitialized2","_createClass2","key","get","PureComponent","Component","Intergalactic","_Intergalactic","InternalTypings","_InternalTypings","wrapIntergalacticComponent","wrapper"],"sources":["../../../src/core/types/Component.ts"],"sourcesContent":["import React, {\n AllHTMLAttributes,\n ForwardRefExoticComponent,\n PureComponent,\n ReactNode,\n RefAttributes,\n RefObject,\n} from 'react';\nimport { IStyledProps } from '../styled/index';\nimport { CORE_COMPONENT, CREATE_COMPONENT } from './symbols';\n\n/** @deprecated */\ntype KnownKeys<T> = {\n [K in keyof T]: string extends K ? never : number extends K ? never : K;\n} extends { [_ in keyof T]: infer U }\n ? U\n : never;\n\n/** @deprecated */\nexport type HandlersType<UCProps> = { [K in keyof UCProps]?: <T = unknown>(arg: T) => void };\n/** @deprecated */\nexport type ChildrenType<Props = {}, Ctx = {}, UCProps = {}> =\n | ((props: Props & Ctx, handlers: HandlersType<UCProps>) => ReactNode)\n | ReactNode;\n\n/** @deprecated */\nexport type RootComponentHandler = (...args: any[]) => void | false;\n\n/** @deprecated */\nexport interface IRootComponentHandlers {\n [key: string]: RootComponentHandler;\n}\n\n/** @deprecated */\nexport interface IRootComponentProps<Props = {}, Ctx = {}> {\n forwardRef?: RefObject<any>;\n Children?: any;\n children?: ChildrenType<Props, Ctx>;\n styles?: IStyledProps['styles'];\n 'data-ui-name'?: string;\n}\n\n/** @deprecated */\nexport type IComponentProps<Props = {}, Ctx = {}> = Props & IRootComponentProps<Props, Ctx>;\n\n/** @deprecated */\nexport type IFunctionProps<Props = {}, Ctx = {}> = IComponentProps<Props, Ctx> &\n Omit<AllHTMLAttributes<any>, keyof IComponentProps<Props, Ctx>> & { Root?: Root };\n\n/** @deprecated */\nexport type PropsWithRenderFnChildren<Props = {}, Ctx = {}, UCProps = {}> = Omit<\n Pick<Props, KnownKeys<Props>>,\n 'children'\n> & {\n children?: ChildrenType<Props, Ctx, UCProps>;\n [key: string]: unknown;\n};\n\n/** @deprecated */\nexport type CProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?: ((props: Props & Ctx, handlers: UCProps) => React.ReactNode) | React.ReactNode;\n};\n/** @deprecated */\nexport type ReturnEl = React.ReactElement | null;\n\nexport interface IRootNodeProps {\n render: React.ElementType | string;\n tag?: React.ElementType | string;\n\n [key: string]: any;\n}\n\ntype Root = ForwardRefExoticComponent<IRootNodeProps>;\n\n/**\n * @deprecated since version ^1.8.0\n */\nexport type PropGetter<T extends (...args: any) => any> = <P>(props?: P) => ReturnType<T> & P;\n/**\n * @deprecated since version ^1.8.0\n */\n/** @deprecated */\nexport type PropGetterReturn<T extends (...args: any) => any> = Partial<ReturnType<T>>;\n/** @deprecated */\nexport type PropGetterFn = <T extends {}>(props?: T) => T & { [key: string]: unknown };\n/** @deprecated */\nexport type Merge<Props, HTMLProps> = Props & Omit<HTMLProps, keyof Props>;\n/** @deprecated */\nexport type MergeGetters<G1 extends (...args: any) => any, G2 extends (...args: any) => any> = <P>(\n props?: P,\n) => Merge<ReturnType<G1>, ReturnType<G2>> & P;\n\nconst Root: Root = undefined as any;\n\nexport { Root };\n\n/** @deprecated */\nabstract class RootComponent<\n Props = {},\n Context = {},\n State = {},\n Enhance = {},\n> extends PureComponent<Props, State> {\n get handlers(): Readonly<IRootComponentHandlers> {\n return {};\n }\n\n get asProps() {\n return {} as Readonly<\n Merge<Props & IRootComponentProps<Props, Context> & Enhance, AllHTMLAttributes<any>>\n >;\n }\n\n Root: Root = undefined as any;\n\n isControlled = false;\n}\n\nexport const Component = RootComponent;\n/** @deprecated */\nexport type Component<\n Props = {},\n Context = {},\n State = {},\n Handlers extends IRootComponentHandlers = IRootComponentHandlers,\n> = React.ComponentClass<Props, State> & {\n isControlled: boolean;\n\n handlers: Readonly<Handlers>;\n\n asProps: Readonly<Merge<Props & IRootComponentProps<Props, Context>, AllHTMLAttributes<any>>>;\n\n Root: Root;\n};\n\nexport namespace Intergalactic {\n type ReactFCProps<C extends React.FC> = C extends React.FC<infer Props> ? Omit<Props, 'tag'> : {};\n type ReactComponentProps<C extends React.ComponentClass> = C extends React.ComponentClass<\n infer Props\n >\n ? Omit<Props, 'tag'>\n : never;\n type ReactFCLike = (props: any) => any;\n type ReactFCLikeProps<C extends ReactFCLike> = C extends (props: infer Props) => any ? Props : {};\n type ComponentChildren<\n Props,\n Context,\n RenderingResult = InternalTypings.ReturnResult,\n AdditionalContext extends any[] = never[],\n > =\n | ((props: MergeProps<Context, Props>, ...args: AdditionalContext) => RenderingResult)\n | InternalTypings.ReturnResult;\n type ComponentBasicProps<Tag extends InternalTypings.ComponentTag> = {\n ref?: React.Ref<InternalTypings.ComponentHtmlElement<Tag> | null>;\n /** @private DO NOT USE IT. Low-level api that prevents specified props from being applied as DOM attribute. */\n __excludeProps?: string[];\n };\n type MergeProps<HighPriorityProps, LowPriorityProps> = {\n [K in keyof LowPriorityProps]: K extends keyof HighPriorityProps\n ? HighPriorityProps[K]\n : LowPriorityProps[K];\n } & HighPriorityProps;\n /** @private */\n export namespace InternalTypings {\n export type EfficientOmit<Type, Keys> = {\n [Property in keyof Type as Exclude<Property, Keys>]: Type[Property];\n };\n export type ComponentPropsNesting<Tag extends InternalTypings.ComponentTag> = Omit<\n MergeProps<\n Tag extends React.FC\n ? ReactFCProps<Tag>\n : Tag extends React.ComponentClass\n ? ReactComponentProps<Tag>\n : Tag extends ReactFCLike\n ? ReactFCLikeProps<Tag>\n : Tag extends keyof JSX.IntrinsicElements\n ? JSX.IntrinsicElements[Tag]\n : {},\n Tag extends { __nestedProps: infer NestedProps } ? NestedProps : {}\n >,\n 'children' | 'tag'\n >;\n export type ReturnResult =\n | React.ReactElement\n | React.ReactNode\n | React.ReactNode[]\n | string\n | null;\n export type ComponentTag =\n | keyof JSX.IntrinsicElements\n | React.ComponentClass\n | React.FC\n | ReactFCLike;\n export type ComponentProps<\n Tag extends ComponentTag,\n BaseTag extends ComponentTag | never,\n Props,\n Context = never,\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n ReturnResult,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<\n EfficientOmit<Props, 'tag' | 'children'>,\n MergeProps<ComponentPropsNesting<Tag>, ComponentPropsNesting<BaseTag>>\n >;\n export type PropsRenderingResultComponentProps<\n Tag extends ComponentTag,\n Props,\n Context = {},\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n Partial<\n EfficientOmit<\n MergeProps<Props, ComponentPropsNesting<Tag>>,\n 'children' | 'tag' | 'ref'\n > & {\n children?: React.ReactNode;\n }\n >,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<EfficientOmit<Props, 'tag' | 'children'>, ComponentPropsNesting<Tag>>;\n export type ComponentRenderingResults = React.ReactElement;\n export type ComponentAdditive<\n BaseTag extends ComponentTag,\n Tag extends ComponentTag,\n Props = {},\n Context = {},\n AdditionalContext = {},\n > = {\n __nestedProps: ComponentPropsNesting<BaseTag>;\n __tag: Tag;\n __props: Props;\n __context: Context;\n __additionalContext: AdditionalContext;\n };\n export type InferJsxIntrinsicElement<T extends React.DetailedHTMLProps<any, any>> =\n T extends React.DetailedHTMLProps<infer _, infer Element> ? Element : HTMLElement;\n type InferElementFromRef<T> = T extends React.Ref<infer Element> ? Element : never;\n type InferRefElementFromProps<T> = 'ref' extends keyof T\n ? InferElementFromRef<T['ref']>\n : HTMLElement;\n export type ComponentHtmlElement<Tag extends ComponentTag> =\n Tag extends keyof JSX.IntrinsicElements\n ? InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>\n : Tag extends { __nestedProps: infer NestedProps }\n ? InferRefElementFromProps<NestedProps>\n : HTMLElement;\n export type UntypeRefAndTag<Props> = Intergalactic.InternalTypings.EfficientOmit<\n Props,\n 'ref' | 'tag'\n > & {\n ref: React.Ref<any>;\n tag: Intergalactic.InternalTypings.ComponentTag;\n };\n }\n export type Component<\n BaseTag extends InternalTypings.ComponentTag = never,\n BaseProps = {},\n Context = {},\n AdditionalContext extends any[] = never[],\n > = (<Tag extends InternalTypings.ComponentTag = BaseTag, Props extends BaseProps = BaseProps>(\n props: InternalTypings.ComponentProps<Tag, BaseTag, Props, Context, AdditionalContext>,\n ) => InternalTypings.ComponentRenderingResults) &\n InternalTypings.ComponentAdditive<BaseTag, Tag, BaseProps, Context, AdditionalContext>;\n export type Tag = InternalTypings.ComponentTag;\n export type DomProps<Tag extends keyof JSX.IntrinsicElements> =\n InternalTypings.InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>;\n}\n\nexport const wrapIntergalacticComponent = <\n Component extends Intergalactic.Component<any, any, any, any>,\n PropsExtending = {},\n>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<Component>\n > &\n PropsExtending,\n ) => React.ReactNode,\n): Intergalactic.Component<\n Component['__tag'],\n Component['__props'] & Component['__nestedProps'] & PropsExtending,\n Component['__context'],\n Component['__additionalContext']\n> => wrapper as any;\n\nexport type PropsAndRef<T, Ctx, UCProps> = PropsWithRenderFnChildren<T, Ctx, UCProps> &\n RefAttributes<unknown>;\nexport type ForwardRefComponent<T, Ctx, UCProps> = ForwardRefExoticComponent<\n PropsAndRef<T, Ctx, UCProps>\n>;\ntype ComponentOrProps<T, Context, UCProps> = T extends [infer ParentProps, infer ChildProps]\n ? ComponentType<ParentProps, ChildProps, Context, UCProps>\n : ForwardRefComponent<T, Context, UCProps>;\n\nexport type ComponentType<\n ComponentProps,\n ChildComponentProps = {},\n ContextType = {},\n UCProps = {},\n FNType = null,\n> = (FNType extends null\n ? ForwardRefComponent<ComponentProps, ContextType, UCProps>\n : FNType & { displayName: string }) & {\n [K in keyof ChildComponentProps]: ComponentOrProps<ChildComponentProps[K], ContextType, UCProps>;\n} & {\n [CORE_COMPONENT]: boolean;\n [CREATE_COMPONENT]: () => ComponentType<\n ComponentProps,\n ChildComponentProps,\n ContextType,\n UCProps\n >;\n};\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AASA,IAAAC,QAAA,GAAAD,OAAA;AAmFA,IAAME,IAAU,GAAGC,SAAgB;AAACC,OAAA,CAAAF,IAAA,GAAAA,IAAA;AAIpC;AAAA,IACeG,aAAa,0BAAAC,cAAA;EAAA,IAAAC,UAAA,aAAAF,aAAA,EAAAC,cAAA;EAAA,IAAAE,MAAA,OAAAC,aAAA,aAAAJ,aAAA;EAAA,SAAAA,cAAA;IAAA,IAAAK,KAAA;IAAA,IAAAC,gBAAA,mBAAAN,aAAA;IAAA,SAAAO,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAAAP,KAAA,GAAAF,MAAA,CAAAU,IAAA,CAAAC,KAAA,CAAAX,MAAA,SAAAY,MAAA,CAAAL,IAAA;IAAA,IAAAM,gBAAA,iBAAAC,uBAAA,aAAAZ,KAAA,WAgBbP,SAAS;IAAA,IAAAkB,gBAAA,iBAAAC,uBAAA,aAAAZ,KAAA,mBAEP,KAAK;IAAA,OAAAA,KAAA;EAAA;EAAA,IAAAa,aAAA,aAAAlB,aAAA;IAAAmB,GAAA;IAAAC,GAAA,EAZpB,SAAAA,IAAA,EAAiD;MAC/C,OAAO,CAAC,CAAC;IACX;EAAC;IAAAD,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAAc;MACZ,OAAO,CAAC,CAAC;IAGX;EAAC;EAAA,OAAApB,aAAA;AAAA,EATOqB,oBAAa;AAgBhB,IAAMC,SAAS,GAAGtB,aAAa;AACtC;AAAAD,OAAA,CAAAuB,SAAA,GAAAA,SAAA;AAAA,IAAAC,aAAA;AAAAxB,OAAA,CAAAwB,aAAA,GAAAA,aAAA;AAAA,WAAAC,cAAA;EAAA,IAAAC,eAAA;EAAA,WAAAC,gBAAA,MA4CmBD,eAAe,KAAfA,eAAe,GAAAD,cAAA,CAAfC,eAAe,KAAAD,cAAA,CAAfC,eAAe;AAAA,GA5BjBF,aAAa,KAAAxB,OAAA,CAAAwB,aAAA,GAAbA,aAAa;AAmJvB,IAAMI,0BAA0B,GAAG,SAA7BA,0BAA0BA,CAIrCC,OAKoB;EAAA,OAMjBA,OAAO;AAAA,CAAO;AAAC7B,OAAA,CAAA4B,0BAAA,GAAAA,0BAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Component.mjs","names":["PureComponent","CORE_COMPONENT","CREATE_COMPONENT","Root","undefined","RootComponent","_PureComponent","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","_createClass","key","get","Component","Intergalactic","_Intergalactic","InternalTypings","_InternalTypings","wrapIntergalacticComponent","wrapper"],"sources":["../../../src/core/types/Component.ts"],"sourcesContent":["import React, {\n AllHTMLAttributes,\n ForwardRefExoticComponent,\n PureComponent,\n ReactNode,\n RefAttributes,\n RefObject,\n} from 'react';\nimport { IStyledProps } from '../styled';\nimport { CORE_COMPONENT, CREATE_COMPONENT } from './symbols';\n\n/** @deprecated */\ntype KnownKeys<T> = {\n [K in keyof T]: string extends K ? never : number extends K ? never : K;\n} extends { [_ in keyof T]: infer U }\n ? U\n : never;\n\n/** @deprecated */\nexport type HandlersType<UCProps> = { [K in keyof UCProps]?: <T = unknown>(arg: T) => void };\n/** @deprecated */\nexport type ChildrenType<Props = {}, Ctx = {}, UCProps = {}> =\n | ((props: Props & Ctx, handlers: HandlersType<UCProps>) => ReactNode)\n | ReactNode;\n\n/** @deprecated */\nexport type RootComponentHandler = (...args: any[]) => void | false;\n\n/** @deprecated */\nexport interface IRootComponentHandlers {\n [key: string]: RootComponentHandler;\n}\n\n/** @deprecated */\nexport interface IRootComponentProps<Props = {}, Ctx = {}> {\n forwardRef?: RefObject<any>;\n Children?: any;\n children?: ChildrenType<Props, Ctx>;\n styles?: IStyledProps['styles'];\n 'data-ui-name'?: string;\n}\n\n/** @deprecated */\nexport type IComponentProps<Props = {}, Ctx = {}> = Props & IRootComponentProps<Props, Ctx>;\n\n/** @deprecated */\nexport type IFunctionProps<Props = {}, Ctx = {}> = IComponentProps<Props, Ctx> &\n Omit<AllHTMLAttributes<any>, keyof IComponentProps<Props, Ctx>> & { Root?: Root };\n\n/** @deprecated */\nexport type PropsWithRenderFnChildren<Props = {}, Ctx = {}, UCProps = {}> = Omit<\n Pick<Props, KnownKeys<Props>>,\n 'children'\n> & {\n children?: ChildrenType<Props, Ctx, UCProps>;\n [key: string]: unknown;\n};\n\n/** @deprecated */\nexport type CProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?: ((props: Props & Ctx, handlers: UCProps) => React.ReactNode) | React.ReactNode;\n};\n/** @deprecated */\nexport type ReturnEl = React.ReactElement | null;\n\nexport interface IRootNodeProps {\n render: React.ElementType | string;\n tag?: React.ElementType | string;\n\n [key: string]: any;\n}\n\ntype Root = ForwardRefExoticComponent<IRootNodeProps>;\n\n/**\n * @deprecated since version ^1.8.0\n */\nexport type PropGetter<T extends (...args: any) => any> = <P>(props?: P) => ReturnType<T> & P;\n/**\n * @deprecated since version ^1.8.0\n */\n/** @deprecated */\nexport type PropGetterReturn<T extends (...args: any) => any> = Partial<ReturnType<T>>;\n/** @deprecated */\nexport type PropGetterFn = <T extends {}>(props?: T) => T & { [key: string]: unknown };\n/** @deprecated */\nexport type Merge<Props, HTMLProps> = Props & Omit<HTMLProps, keyof Props>;\n/** @deprecated */\nexport type MergeGetters<G1 extends (...args: any) => any, G2 extends (...args: any) => any> = <P>(\n props?: P,\n) => Merge<ReturnType<G1>, ReturnType<G2>> & P;\n\nconst Root: Root = undefined as any;\n\nexport { Root };\n\n/** @deprecated */\nabstract class RootComponent<\n Props = {},\n Context = {},\n State = {},\n Enhance = {},\n> extends PureComponent<Props, State> {\n get handlers(): Readonly<IRootComponentHandlers> {\n return {};\n }\n\n get asProps() {\n return {} as Readonly<\n Merge<Props & IRootComponentProps<Props, Context> & Enhance, AllHTMLAttributes<any>>\n >;\n }\n\n Root: Root = undefined as any;\n\n isControlled = false;\n}\n\nexport const Component = RootComponent;\n/** @deprecated */\nexport type Component<\n Props = {},\n Context = {},\n State = {},\n Handlers extends IRootComponentHandlers = IRootComponentHandlers,\n> = React.ComponentClass<Props, State> & {\n isControlled: boolean;\n\n handlers: Readonly<Handlers>;\n\n asProps: Readonly<Merge<Props & IRootComponentProps<Props, Context>, AllHTMLAttributes<any>>>;\n\n Root: Root;\n};\n\nexport namespace Intergalactic {\n type ReactFCProps<C extends React.FC> = C extends React.FC<infer Props> ? Omit<Props, 'tag'> : {};\n type ReactComponentProps<C extends React.ComponentClass> = C extends React.ComponentClass<\n infer Props\n >\n ? Omit<Props, 'tag'>\n : never;\n type ReactFCLike = (props: any) => any;\n type ReactFCLikeProps<C extends ReactFCLike> = C extends (props: infer Props) => any ? Props : {};\n type ComponentChildren<\n Props,\n Context,\n RenderingResult = InternalTypings.ReturnResult,\n AdditionalContext extends any[] = never[],\n > =\n | ((props: MergeProps<Context, Props>, ...args: AdditionalContext) => RenderingResult)\n | InternalTypings.ReturnResult;\n type ComponentBasicProps<Tag extends InternalTypings.ComponentTag> = {\n ref?: React.Ref<InternalTypings.ComponentHtmlElement<Tag> | null>;\n /** @private DO NOT USE IT. Low-level api that prevents specified props from being applied as DOM attribute. */\n __excludeProps?: string[];\n };\n type MergeProps<HighPriorityProps, LowPriorityProps> = {\n [K in keyof LowPriorityProps]: K extends keyof HighPriorityProps\n ? HighPriorityProps[K]\n : LowPriorityProps[K];\n } & HighPriorityProps;\n /** @private */\n export namespace InternalTypings {\n export type EfficientOmit<Type, Keys> = {\n [Property in keyof Type as Exclude<Property, Keys>]: Type[Property];\n };\n export type ComponentPropsNesting<Tag extends InternalTypings.ComponentTag> = Omit<\n MergeProps<\n Tag extends React.FC\n ? ReactFCProps<Tag>\n : Tag extends React.ComponentClass\n ? ReactComponentProps<Tag>\n : Tag extends ReactFCLike\n ? ReactFCLikeProps<Tag>\n : Tag extends keyof JSX.IntrinsicElements\n ? JSX.IntrinsicElements[Tag]\n : {},\n Tag extends { __nestedProps: infer NestedProps } ? NestedProps : {}\n >,\n 'children' | 'tag'\n >;\n export type ReturnResult =\n | React.ReactElement\n | React.ReactNode\n | React.ReactNode[]\n | string\n | null;\n export type ComponentTag =\n | keyof JSX.IntrinsicElements\n | React.ComponentClass\n | React.FC\n | ReactFCLike;\n export type ComponentProps<\n Tag extends ComponentTag,\n BaseTag extends ComponentTag | never,\n Props,\n Context = never,\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n ReturnResult,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<\n EfficientOmit<Props, 'tag' | 'children'>,\n MergeProps<ComponentPropsNesting<Tag>, ComponentPropsNesting<BaseTag>>\n >;\n export type PropsRenderingResultComponentProps<\n Tag extends ComponentTag,\n Props,\n Context = {},\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n Partial<\n EfficientOmit<\n MergeProps<Props, ComponentPropsNesting<Tag>>,\n 'children' | 'tag' | 'ref'\n > & {\n children?: React.ReactNode;\n }\n >,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<EfficientOmit<Props, 'tag' | 'children'>, ComponentPropsNesting<Tag>>;\n export type ComponentRenderingResults = React.ReactElement;\n export type ComponentAdditive<\n BaseTag extends ComponentTag,\n Tag extends ComponentTag,\n Props = {},\n Context = {},\n AdditionalContext = {},\n > = {\n __nestedProps: ComponentPropsNesting<BaseTag>;\n __tag: Tag;\n __props: Props;\n __context: Context;\n __additionalContext: AdditionalContext;\n };\n export type InferJsxIntrinsicElement<T extends React.DetailedHTMLProps<any, any>> =\n T extends React.DetailedHTMLProps<infer _, infer Element> ? Element : HTMLElement;\n type InferElementFromRef<T> = T extends React.Ref<infer Element> ? Element : never;\n type InferRefElementFromProps<T> = 'ref' extends keyof T\n ? InferElementFromRef<T['ref']>\n : HTMLElement;\n export type ComponentHtmlElement<Tag extends ComponentTag> =\n Tag extends keyof JSX.IntrinsicElements\n ? InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>\n : Tag extends { __nestedProps: infer NestedProps }\n ? InferRefElementFromProps<NestedProps>\n : HTMLElement;\n export type UntypeRefAndTag<Props> = Intergalactic.InternalTypings.EfficientOmit<\n Props,\n 'ref' | 'tag'\n > & {\n ref: React.Ref<any>;\n tag: Intergalactic.InternalTypings.ComponentTag;\n };\n }\n export type Component<\n BaseTag extends InternalTypings.ComponentTag = never,\n BaseProps = {},\n Context = {},\n AdditionalContext extends any[] = never[],\n > = (<Tag extends InternalTypings.ComponentTag = BaseTag, Props extends BaseProps = BaseProps>(\n props: InternalTypings.ComponentProps<Tag, BaseTag, Props, Context, AdditionalContext>,\n ) => InternalTypings.ComponentRenderingResults) &\n InternalTypings.ComponentAdditive<BaseTag, Tag, BaseProps, Context, AdditionalContext>;\n export type Tag = InternalTypings.ComponentTag;\n export type DomProps<Tag extends keyof JSX.IntrinsicElements> =\n InternalTypings.InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>;\n}\n\nexport const wrapIntergalacticComponent = <\n Component extends Intergalactic.Component<any, any, any, any>,\n PropsExtending = {},\n>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<Component>\n > &\n PropsExtending,\n ) => React.ReactNode,\n): Intergalactic.Component<\n Component['__tag'],\n Component['__props'] & Component['__nestedProps'] & PropsExtending,\n Component['__context'],\n Component['__additionalContext']\n> => wrapper as any;\n\nexport type PropsAndRef<T, Ctx, UCProps> = PropsWithRenderFnChildren<T, Ctx, UCProps> &\n RefAttributes<unknown>;\nexport type ForwardRefComponent<T, Ctx, UCProps> = ForwardRefExoticComponent<\n PropsAndRef<T, Ctx, UCProps>\n>;\ntype ComponentOrProps<T, Context, UCProps> = T extends [infer ParentProps, infer ChildProps]\n ? ComponentType<ParentProps, ChildProps, Context, UCProps>\n : ForwardRefComponent<T, Context, UCProps>;\n\nexport type ComponentType<\n ComponentProps,\n ChildComponentProps = {},\n ContextType = {},\n UCProps = {},\n FNType = null,\n> = (FNType extends null\n ? ForwardRefComponent<ComponentProps, ContextType, UCProps>\n : FNType & { displayName: string }) & {\n [K in keyof ChildComponentProps]: ComponentOrProps<ChildComponentProps[K], ContextType, UCProps>;\n} & {\n [CORE_COMPONENT]: boolean;\n [CREATE_COMPONENT]: () => ComponentType<\n ComponentProps,\n ChildComponentProps,\n ContextType,\n UCProps\n >;\n};\n"],"mappings":";;;;;;AAAA,SAGEA,aAAa,QAIR,OAAO;AAEd,SAASC,cAAc,EAAEC,gBAAgB,QAAQ,eAAW;;AAE5D;;AAiFA,IAAMC,IAAU,GAAGC,SAAgB;AAEnC,SAASD,IAAI;;AAEb;AAAA,IACeE,aAAa,0BAAAC,cAAA;EAAAC,SAAA,CAAAF,aAAA,EAAAC,cAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,aAAA;EAAA,SAAAA,cAAA;IAAA,IAAAK,KAAA;IAAAC,eAAA,OAAAN,aAAA;IAAA,SAAAO,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAAAP,KAAA,GAAAF,MAAA,CAAAU,IAAA,CAAAC,KAAA,CAAAX,MAAA,SAAAY,MAAA,CAAAL,IAAA;IAAAM,eAAA,CAAAC,sBAAA,CAAAZ,KAAA,WAgBbN,SAAS;IAAAiB,eAAA,CAAAC,sBAAA,CAAAZ,KAAA,mBAEP,KAAK;IAAA,OAAAA,KAAA;EAAA;EAAAa,YAAA,CAAAlB,aAAA;IAAAmB,GAAA;IAAAC,GAAA,EAZpB,SAAAA,IAAA,EAAiD;MAC/C,OAAO,CAAC,CAAC;IACX;EAAC;IAAAD,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAAc;MACZ,OAAO,CAAC,CAAC;IAGX;EAAC;EAAA,OAAApB,aAAA;AAAA,EATOL,aAAa;AAgBvB,OAAO,IAAM0B,SAAS,GAAGrB,aAAa;AACtC;;AAgBA,WAAAsB,aAAA;AAiJC,WAAAC,cAAA;EAAA,IAAAC,eAAA;EAAA,WAAAC,gBAAA,MArHkBD,eAAe,KAAfA,eAAe,GAAAD,cAAA,CAAfC,eAAe,KAAAD,cAAA,CAAfC,eAAe;AAAA,GA5BjBF,aAAa,KAAbA,aAAa;AAmJ9B,OAAO,IAAMI,0BAA0B,GAAG,SAA7BA,0BAA0BA,CAIrCC,OAKoB;EAAA,OAMjBA,OAAO;AAAA,CAAO"}
1
+ {"version":3,"file":"Component.mjs","names":["PureComponent","CORE_COMPONENT","CREATE_COMPONENT","Root","undefined","RootComponent","_PureComponent","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","_createClass","key","get","Component","Intergalactic","_Intergalactic","InternalTypings","_InternalTypings","wrapIntergalacticComponent","wrapper"],"sources":["../../../src/core/types/Component.ts"],"sourcesContent":["import React, {\n AllHTMLAttributes,\n ForwardRefExoticComponent,\n PureComponent,\n ReactNode,\n RefAttributes,\n RefObject,\n} from 'react';\nimport { IStyledProps } from '../styled/index';\nimport { CORE_COMPONENT, CREATE_COMPONENT } from './symbols';\n\n/** @deprecated */\ntype KnownKeys<T> = {\n [K in keyof T]: string extends K ? never : number extends K ? never : K;\n} extends { [_ in keyof T]: infer U }\n ? U\n : never;\n\n/** @deprecated */\nexport type HandlersType<UCProps> = { [K in keyof UCProps]?: <T = unknown>(arg: T) => void };\n/** @deprecated */\nexport type ChildrenType<Props = {}, Ctx = {}, UCProps = {}> =\n | ((props: Props & Ctx, handlers: HandlersType<UCProps>) => ReactNode)\n | ReactNode;\n\n/** @deprecated */\nexport type RootComponentHandler = (...args: any[]) => void | false;\n\n/** @deprecated */\nexport interface IRootComponentHandlers {\n [key: string]: RootComponentHandler;\n}\n\n/** @deprecated */\nexport interface IRootComponentProps<Props = {}, Ctx = {}> {\n forwardRef?: RefObject<any>;\n Children?: any;\n children?: ChildrenType<Props, Ctx>;\n styles?: IStyledProps['styles'];\n 'data-ui-name'?: string;\n}\n\n/** @deprecated */\nexport type IComponentProps<Props = {}, Ctx = {}> = Props & IRootComponentProps<Props, Ctx>;\n\n/** @deprecated */\nexport type IFunctionProps<Props = {}, Ctx = {}> = IComponentProps<Props, Ctx> &\n Omit<AllHTMLAttributes<any>, keyof IComponentProps<Props, Ctx>> & { Root?: Root };\n\n/** @deprecated */\nexport type PropsWithRenderFnChildren<Props = {}, Ctx = {}, UCProps = {}> = Omit<\n Pick<Props, KnownKeys<Props>>,\n 'children'\n> & {\n children?: ChildrenType<Props, Ctx, UCProps>;\n [key: string]: unknown;\n};\n\n/** @deprecated */\nexport type CProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?: ((props: Props & Ctx, handlers: UCProps) => React.ReactNode) | React.ReactNode;\n};\n/** @deprecated */\nexport type ReturnEl = React.ReactElement | null;\n\nexport interface IRootNodeProps {\n render: React.ElementType | string;\n tag?: React.ElementType | string;\n\n [key: string]: any;\n}\n\ntype Root = ForwardRefExoticComponent<IRootNodeProps>;\n\n/**\n * @deprecated since version ^1.8.0\n */\nexport type PropGetter<T extends (...args: any) => any> = <P>(props?: P) => ReturnType<T> & P;\n/**\n * @deprecated since version ^1.8.0\n */\n/** @deprecated */\nexport type PropGetterReturn<T extends (...args: any) => any> = Partial<ReturnType<T>>;\n/** @deprecated */\nexport type PropGetterFn = <T extends {}>(props?: T) => T & { [key: string]: unknown };\n/** @deprecated */\nexport type Merge<Props, HTMLProps> = Props & Omit<HTMLProps, keyof Props>;\n/** @deprecated */\nexport type MergeGetters<G1 extends (...args: any) => any, G2 extends (...args: any) => any> = <P>(\n props?: P,\n) => Merge<ReturnType<G1>, ReturnType<G2>> & P;\n\nconst Root: Root = undefined as any;\n\nexport { Root };\n\n/** @deprecated */\nabstract class RootComponent<\n Props = {},\n Context = {},\n State = {},\n Enhance = {},\n> extends PureComponent<Props, State> {\n get handlers(): Readonly<IRootComponentHandlers> {\n return {};\n }\n\n get asProps() {\n return {} as Readonly<\n Merge<Props & IRootComponentProps<Props, Context> & Enhance, AllHTMLAttributes<any>>\n >;\n }\n\n Root: Root = undefined as any;\n\n isControlled = false;\n}\n\nexport const Component = RootComponent;\n/** @deprecated */\nexport type Component<\n Props = {},\n Context = {},\n State = {},\n Handlers extends IRootComponentHandlers = IRootComponentHandlers,\n> = React.ComponentClass<Props, State> & {\n isControlled: boolean;\n\n handlers: Readonly<Handlers>;\n\n asProps: Readonly<Merge<Props & IRootComponentProps<Props, Context>, AllHTMLAttributes<any>>>;\n\n Root: Root;\n};\n\nexport namespace Intergalactic {\n type ReactFCProps<C extends React.FC> = C extends React.FC<infer Props> ? Omit<Props, 'tag'> : {};\n type ReactComponentProps<C extends React.ComponentClass> = C extends React.ComponentClass<\n infer Props\n >\n ? Omit<Props, 'tag'>\n : never;\n type ReactFCLike = (props: any) => any;\n type ReactFCLikeProps<C extends ReactFCLike> = C extends (props: infer Props) => any ? Props : {};\n type ComponentChildren<\n Props,\n Context,\n RenderingResult = InternalTypings.ReturnResult,\n AdditionalContext extends any[] = never[],\n > =\n | ((props: MergeProps<Context, Props>, ...args: AdditionalContext) => RenderingResult)\n | InternalTypings.ReturnResult;\n type ComponentBasicProps<Tag extends InternalTypings.ComponentTag> = {\n ref?: React.Ref<InternalTypings.ComponentHtmlElement<Tag> | null>;\n /** @private DO NOT USE IT. Low-level api that prevents specified props from being applied as DOM attribute. */\n __excludeProps?: string[];\n };\n type MergeProps<HighPriorityProps, LowPriorityProps> = {\n [K in keyof LowPriorityProps]: K extends keyof HighPriorityProps\n ? HighPriorityProps[K]\n : LowPriorityProps[K];\n } & HighPriorityProps;\n /** @private */\n export namespace InternalTypings {\n export type EfficientOmit<Type, Keys> = {\n [Property in keyof Type as Exclude<Property, Keys>]: Type[Property];\n };\n export type ComponentPropsNesting<Tag extends InternalTypings.ComponentTag> = Omit<\n MergeProps<\n Tag extends React.FC\n ? ReactFCProps<Tag>\n : Tag extends React.ComponentClass\n ? ReactComponentProps<Tag>\n : Tag extends ReactFCLike\n ? ReactFCLikeProps<Tag>\n : Tag extends keyof JSX.IntrinsicElements\n ? JSX.IntrinsicElements[Tag]\n : {},\n Tag extends { __nestedProps: infer NestedProps } ? NestedProps : {}\n >,\n 'children' | 'tag'\n >;\n export type ReturnResult =\n | React.ReactElement\n | React.ReactNode\n | React.ReactNode[]\n | string\n | null;\n export type ComponentTag =\n | keyof JSX.IntrinsicElements\n | React.ComponentClass\n | React.FC\n | ReactFCLike;\n export type ComponentProps<\n Tag extends ComponentTag,\n BaseTag extends ComponentTag | never,\n Props,\n Context = never,\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n ReturnResult,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<\n EfficientOmit<Props, 'tag' | 'children'>,\n MergeProps<ComponentPropsNesting<Tag>, ComponentPropsNesting<BaseTag>>\n >;\n export type PropsRenderingResultComponentProps<\n Tag extends ComponentTag,\n Props,\n Context = {},\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n Partial<\n EfficientOmit<\n MergeProps<Props, ComponentPropsNesting<Tag>>,\n 'children' | 'tag' | 'ref'\n > & {\n children?: React.ReactNode;\n }\n >,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<EfficientOmit<Props, 'tag' | 'children'>, ComponentPropsNesting<Tag>>;\n export type ComponentRenderingResults = React.ReactElement;\n export type ComponentAdditive<\n BaseTag extends ComponentTag,\n Tag extends ComponentTag,\n Props = {},\n Context = {},\n AdditionalContext = {},\n > = {\n __nestedProps: ComponentPropsNesting<BaseTag>;\n __tag: Tag;\n __props: Props;\n __context: Context;\n __additionalContext: AdditionalContext;\n };\n export type InferJsxIntrinsicElement<T extends React.DetailedHTMLProps<any, any>> =\n T extends React.DetailedHTMLProps<infer _, infer Element> ? Element : HTMLElement;\n type InferElementFromRef<T> = T extends React.Ref<infer Element> ? Element : never;\n type InferRefElementFromProps<T> = 'ref' extends keyof T\n ? InferElementFromRef<T['ref']>\n : HTMLElement;\n export type ComponentHtmlElement<Tag extends ComponentTag> =\n Tag extends keyof JSX.IntrinsicElements\n ? InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>\n : Tag extends { __nestedProps: infer NestedProps }\n ? InferRefElementFromProps<NestedProps>\n : HTMLElement;\n export type UntypeRefAndTag<Props> = Intergalactic.InternalTypings.EfficientOmit<\n Props,\n 'ref' | 'tag'\n > & {\n ref: React.Ref<any>;\n tag: Intergalactic.InternalTypings.ComponentTag;\n };\n }\n export type Component<\n BaseTag extends InternalTypings.ComponentTag = never,\n BaseProps = {},\n Context = {},\n AdditionalContext extends any[] = never[],\n > = (<Tag extends InternalTypings.ComponentTag = BaseTag, Props extends BaseProps = BaseProps>(\n props: InternalTypings.ComponentProps<Tag, BaseTag, Props, Context, AdditionalContext>,\n ) => InternalTypings.ComponentRenderingResults) &\n InternalTypings.ComponentAdditive<BaseTag, Tag, BaseProps, Context, AdditionalContext>;\n export type Tag = InternalTypings.ComponentTag;\n export type DomProps<Tag extends keyof JSX.IntrinsicElements> =\n InternalTypings.InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>;\n}\n\nexport const wrapIntergalacticComponent = <\n Component extends Intergalactic.Component<any, any, any, any>,\n PropsExtending = {},\n>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<Component>\n > &\n PropsExtending,\n ) => React.ReactNode,\n): Intergalactic.Component<\n Component['__tag'],\n Component['__props'] & Component['__nestedProps'] & PropsExtending,\n Component['__context'],\n Component['__additionalContext']\n> => wrapper as any;\n\nexport type PropsAndRef<T, Ctx, UCProps> = PropsWithRenderFnChildren<T, Ctx, UCProps> &\n RefAttributes<unknown>;\nexport type ForwardRefComponent<T, Ctx, UCProps> = ForwardRefExoticComponent<\n PropsAndRef<T, Ctx, UCProps>\n>;\ntype ComponentOrProps<T, Context, UCProps> = T extends [infer ParentProps, infer ChildProps]\n ? ComponentType<ParentProps, ChildProps, Context, UCProps>\n : ForwardRefComponent<T, Context, UCProps>;\n\nexport type ComponentType<\n ComponentProps,\n ChildComponentProps = {},\n ContextType = {},\n UCProps = {},\n FNType = null,\n> = (FNType extends null\n ? ForwardRefComponent<ComponentProps, ContextType, UCProps>\n : FNType & { displayName: string }) & {\n [K in keyof ChildComponentProps]: ComponentOrProps<ChildComponentProps[K], ContextType, UCProps>;\n} & {\n [CORE_COMPONENT]: boolean;\n [CREATE_COMPONENT]: () => ComponentType<\n ComponentProps,\n ChildComponentProps,\n ContextType,\n UCProps\n >;\n};\n"],"mappings":";;;;;;AAAA,SAGEA,aAAa,QAIR,OAAO;AAEd,SAASC,cAAc,EAAEC,gBAAgB,QAAQ,eAAW;;AAE5D;;AAiFA,IAAMC,IAAU,GAAGC,SAAgB;AAEnC,SAASD,IAAI;;AAEb;AAAA,IACeE,aAAa,0BAAAC,cAAA;EAAAC,SAAA,C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