react-mario-core 1.0.1 → 1.0.2

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/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var gr=Object.defineProperty;var hr=(v,o,l)=>o in v?gr(v,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):v[o]=l;var Ve=(v,o,l)=>hr(v,typeof o!="symbol"?o+"":o,l);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react"),yr=require("mobx-react-lite"),Q=require("react-antd-xform"),br=require("antd");var ve={exports:{}},M={};/**
1
+ "use strict";var gr=Object.defineProperty;var br=(p,o,l)=>o in p?gr(p,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):p[o]=l;var Ye=(p,o,l)=>br(p,typeof o!="symbol"?o+"":o,l);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react"),yr=require("mobx-react-lite"),Q=require("react-antd-xform"),Rr=require("antd");var pe={exports:{}},V={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Ye;function Rr(){if(Ye)return M;Ye=1;var v=$,o=Symbol.for("react.element"),l=Symbol.for("react.fragment"),b=Object.prototype.hasOwnProperty,k=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,F={key:!0,ref:!0,__self:!0,__source:!0};function x(_,p,T){var g,R={},C=null,D=null;T!==void 0&&(C=""+T),p.key!==void 0&&(C=""+p.key),p.ref!==void 0&&(D=p.ref);for(g in p)b.call(p,g)&&!F.hasOwnProperty(g)&&(R[g]=p[g]);if(_&&_.defaultProps)for(g in p=_.defaultProps,p)R[g]===void 0&&(R[g]=p[g]);return{$$typeof:o,type:_,key:C,ref:D,props:R,_owner:k.current}}return M.Fragment=l,M.jsx=x,M.jsxs=x,M}var q={};/**
9
+ */var Me;function Er(){if(Me)return V;Me=1;var p=$,o=Symbol.for("react.element"),l=Symbol.for("react.fragment"),b=Object.prototype.hasOwnProperty,k=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,F={key:!0,ref:!0,__self:!0,__source:!0};function O(_,v,w){var h,R={},P=null,D=null;w!==void 0&&(P=""+w),v.key!==void 0&&(P=""+v.key),v.ref!==void 0&&(D=v.ref);for(h in v)b.call(v,h)&&!F.hasOwnProperty(h)&&(R[h]=v[h]);if(_&&_.defaultProps)for(h in v=_.defaultProps,v)R[h]===void 0&&(R[h]=v[h]);return{$$typeof:o,type:_,key:P,ref:D,props:R,_owner:k.current}}return V.Fragment=l,V.jsx=O,V.jsxs=O,V}var N={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,17 +14,17 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Me;function Er(){return Me||(Me=1,process.env.NODE_ENV!=="production"&&function(){var v=$,o=Symbol.for("react.element"),l=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),x=Symbol.for("react.provider"),_=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),N=Symbol.iterator,B="@@iterator";function U(e){if(e===null||typeof e!="object")return null;var r=N&&e[N]||e[B];return typeof r=="function"?r:null}var w=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function u(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];ee("error",e,t)}}function ee(e,r,t){{var n=w.ReactDebugCurrentFrame,s=n.getStackAddendum();s!==""&&(r+="%s",t=t.concat([s]));var c=t.map(function(i){return String(i)});c.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,c)}}var W=!1,J=!1,re=!1,te=!1,ne=!1,X;X=Symbol.for("react.module.reference");function ae(e){return!!(typeof e=="string"||typeof e=="function"||e===b||e===F||ne||e===k||e===T||e===g||te||e===D||W||J||re||typeof e=="object"&&e!==null&&(e.$$typeof===C||e.$$typeof===R||e.$$typeof===x||e.$$typeof===_||e.$$typeof===p||e.$$typeof===X||e.getModuleId!==void 0))}function V(e,r,t){var n=e.displayName;if(n)return n;var s=r.displayName||r.name||"";return s!==""?t+"("+s+")":t}function K(e){return e.displayName||"Context"}function E(e){if(e==null)return null;if(typeof e.tag=="number"&&u("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case b:return"Fragment";case l:return"Portal";case F:return"Profiler";case k:return"StrictMode";case T:return"Suspense";case g:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _:var r=e;return K(r)+".Consumer";case x:var t=e;return K(t._context)+".Provider";case p:return V(e,e.render,"ForwardRef");case R:var n=e.displayName||null;return n!==null?n:E(e.type)||"Memo";case C:{var s=e,c=s._payload,i=s._init;try{return E(i(c))}catch{return null}}}return null}var O=Object.assign,P=0,me,ge,he,ye,be,Re,Ee;function _e(){}_e.__reactDisabledLog=!0;function Ne(){{if(P===0){me=console.log,ge=console.info,he=console.warn,ye=console.error,be=console.group,Re=console.groupCollapsed,Ee=console.groupEnd;var e={configurable:!0,enumerable:!0,value:_e,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}P++}}function Be(){{if(P--,P===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:O({},e,{value:me}),info:O({},e,{value:ge}),warn:O({},e,{value:he}),error:O({},e,{value:ye}),group:O({},e,{value:be}),groupCollapsed:O({},e,{value:Re}),groupEnd:O({},e,{value:Ee})})}P<0&&u("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var oe=w.ReactCurrentDispatcher,ie;function z(e,r,t){{if(ie===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);ie=n&&n[1]||""}return`
18
- `+ie+e}}var se=!1,G;{var Ue=typeof WeakMap=="function"?WeakMap:Map;G=new Ue}function Ce(e,r){if(!e||se)return"";{var t=G.get(e);if(t!==void 0)return t}var n;se=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var c;c=oe.current,oe.current=null,Ne();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(h){n=h}Reflect.construct(e,[],i)}else{try{i.call()}catch(h){n=h}e.call(i.prototype)}}else{try{throw Error()}catch(h){n=h}e()}}catch(h){if(h&&n&&typeof h.stack=="string"){for(var a=h.stack.split(`
17
+ */var Ve;function _r(){return Ve||(Ve=1,process.env.NODE_ENV!=="production"&&function(){var p=$,o=Symbol.for("react.element"),l=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),_=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),L=Symbol.iterator,B="@@iterator";function U(e){if(e===null||typeof e!="object")return null;var r=L&&e[L]||e[B];return typeof r=="function"?r:null}var x=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function u(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];ee("error",e,t)}}function ee(e,r,t){{var n=x.ReactDebugCurrentFrame,s=n.getStackAddendum();s!==""&&(r+="%s",t=t.concat([s]));var c=t.map(function(i){return String(i)});c.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,c)}}var W=!1,J=!1,re=!1,te=!1,ne=!1,X;X=Symbol.for("react.module.reference");function ae(e){return!!(typeof e=="string"||typeof e=="function"||e===b||e===F||ne||e===k||e===w||e===h||te||e===D||W||J||re||typeof e=="object"&&e!==null&&(e.$$typeof===P||e.$$typeof===R||e.$$typeof===O||e.$$typeof===_||e.$$typeof===v||e.$$typeof===X||e.getModuleId!==void 0))}function Y(e,r,t){var n=e.displayName;if(n)return n;var s=r.displayName||r.name||"";return s!==""?t+"("+s+")":t}function K(e){return e.displayName||"Context"}function E(e){if(e==null)return null;if(typeof e.tag=="number"&&u("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case b:return"Fragment";case l:return"Portal";case F:return"Profiler";case k:return"StrictMode";case w:return"Suspense";case h:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _:var r=e;return K(r)+".Consumer";case O:var t=e;return K(t._context)+".Provider";case v:return Y(e,e.render,"ForwardRef");case R:var n=e.displayName||null;return n!==null?n:E(e.type)||"Memo";case P:{var s=e,c=s._payload,i=s._init;try{return E(i(c))}catch{return null}}}return null}var T=Object.assign,C=0,me,he,ge,be,ye,Re,Ee;function _e(){}_e.__reactDisabledLog=!0;function Be(){{if(C===0){me=console.log,he=console.info,ge=console.warn,be=console.error,ye=console.group,Re=console.groupCollapsed,Ee=console.groupEnd;var e={configurable:!0,enumerable:!0,value:_e,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}C++}}function Ue(){{if(C--,C===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:T({},e,{value:me}),info:T({},e,{value:he}),warn:T({},e,{value:ge}),error:T({},e,{value:be}),group:T({},e,{value:ye}),groupCollapsed:T({},e,{value:Re}),groupEnd:T({},e,{value:Ee})})}C<0&&u("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var oe=x.ReactCurrentDispatcher,ie;function z(e,r,t){{if(ie===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);ie=n&&n[1]||""}return`
18
+ `+ie+e}}var se=!1,G;{var Je=typeof WeakMap=="function"?WeakMap:Map;G=new Je}function Pe(e,r){if(!e||se)return"";{var t=G.get(e);if(t!==void 0)return t}var n;se=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var c;c=oe.current,oe.current=null,Be();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(g){n=g}Reflect.construct(e,[],i)}else{try{i.call()}catch(g){n=g}e.call(i.prototype)}}else{try{throw Error()}catch(g){n=g}e()}}catch(g){if(g&&n&&typeof g.stack=="string"){for(var a=g.stack.split(`
19
19
  `),m=n.stack.split(`
20
20
  `),f=a.length-1,d=m.length-1;f>=1&&d>=0&&a[f]!==m[d];)d--;for(;f>=1&&d>=0;f--,d--)if(a[f]!==m[d]){if(f!==1||d!==1)do if(f--,d--,d<0||a[f]!==m[d]){var y=`
21
- `+a[f].replace(" at new "," at ");return e.displayName&&y.includes("<anonymous>")&&(y=y.replace("<anonymous>",e.displayName)),typeof e=="function"&&G.set(e,y),y}while(f>=1&&d>=0);break}}}finally{se=!1,oe.current=c,Be(),Error.prepareStackTrace=s}var I=e?e.displayName||e.name:"",S=I?z(I):"";return typeof e=="function"&&G.set(e,S),S}function Je(e,r,t){return Ce(e,!1)}function Xe(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function H(e,r,t){if(e==null)return"";if(typeof e=="function")return Ce(e,Xe(e));if(typeof e=="string")return z(e);switch(e){case T:return z("Suspense");case g:return z("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case p:return Je(e.render);case R:return H(e.type,r,t);case C:{var n=e,s=n._payload,c=n._init;try{return H(c(s),r,t)}catch{}}}return""}var Y=Object.prototype.hasOwnProperty,Pe={},Te=w.ReactDebugCurrentFrame;function Z(e){if(e){var r=e._owner,t=H(e.type,e._source,r?r.type:null);Te.setExtraStackFrame(t)}else Te.setExtraStackFrame(null)}function Ke(e,r,t,n,s){{var c=Function.call.bind(Y);for(var i in e)if(c(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var m=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(f){a=f}a&&!(a instanceof Error)&&(Z(s),u("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,i,typeof a),Z(null)),a instanceof Error&&!(a.message in Pe)&&(Pe[a.message]=!0,Z(s),u("Failed %s type: %s",t,a.message),Z(null))}}}var ze=Array.isArray;function ue(e){return ze(e)}function Ge(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function He(e){try{return we(e),!1}catch{return!0}}function we(e){return""+e}function Oe(e){if(He(e))return u("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ge(e)),we(e)}var xe=w.ReactCurrentOwner,Ze={key:!0,ref:!0,__self:!0,__source:!0},Se,je;function Qe(e){if(Y.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function er(e){if(Y.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function rr(e,r){typeof e.ref=="string"&&xe.current}function tr(e,r){{var t=function(){Se||(Se=!0,u("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function nr(e,r){{var t=function(){je||(je=!0,u("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var ar=function(e,r,t,n,s,c,i){var a={$$typeof:o,type:e,key:r,ref:t,props:i,_owner:c};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function or(e,r,t,n,s){{var c,i={},a=null,m=null;t!==void 0&&(Oe(t),a=""+t),er(r)&&(Oe(r.key),a=""+r.key),Qe(r)&&(m=r.ref,rr(r,s));for(c in r)Y.call(r,c)&&!Ze.hasOwnProperty(c)&&(i[c]=r[c]);if(e&&e.defaultProps){var f=e.defaultProps;for(c in f)i[c]===void 0&&(i[c]=f[c])}if(a||m){var d=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&tr(i,d),m&&nr(i,d)}return ar(e,a,m,s,n,xe.current,i)}}var le=w.ReactCurrentOwner,ke=w.ReactDebugCurrentFrame;function A(e){if(e){var r=e._owner,t=H(e.type,e._source,r?r.type:null);ke.setExtraStackFrame(t)}else ke.setExtraStackFrame(null)}var ce;ce=!1;function fe(e){return typeof e=="object"&&e!==null&&e.$$typeof===o}function Fe(){{if(le.current){var e=E(le.current.type);if(e)return`
21
+ `+a[f].replace(" at new "," at ");return e.displayName&&y.includes("<anonymous>")&&(y=y.replace("<anonymous>",e.displayName)),typeof e=="function"&&G.set(e,y),y}while(f>=1&&d>=0);break}}}finally{se=!1,oe.current=c,Ue(),Error.prepareStackTrace=s}var I=e?e.displayName||e.name:"",S=I?z(I):"";return typeof e=="function"&&G.set(e,S),S}function Xe(e,r,t){return Pe(e,!1)}function Ke(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function H(e,r,t){if(e==null)return"";if(typeof e=="function")return Pe(e,Ke(e));if(typeof e=="string")return z(e);switch(e){case w:return z("Suspense");case h:return z("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case v:return Xe(e.render);case R:return H(e.type,r,t);case P:{var n=e,s=n._payload,c=n._init;try{return H(c(s),r,t)}catch{}}}return""}var M=Object.prototype.hasOwnProperty,Ce={},we=x.ReactDebugCurrentFrame;function Z(e){if(e){var r=e._owner,t=H(e.type,e._source,r?r.type:null);we.setExtraStackFrame(t)}else we.setExtraStackFrame(null)}function ze(e,r,t,n,s){{var c=Function.call.bind(M);for(var i in e)if(c(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var m=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(f){a=f}a&&!(a instanceof Error)&&(Z(s),u("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,i,typeof a),Z(null)),a instanceof Error&&!(a.message in Ce)&&(Ce[a.message]=!0,Z(s),u("Failed %s type: %s",t,a.message),Z(null))}}}var Ge=Array.isArray;function le(e){return Ge(e)}function He(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Ze(e){try{return xe(e),!1}catch{return!0}}function xe(e){return""+e}function Te(e){if(Ze(e))return u("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",He(e)),xe(e)}var Oe=x.ReactCurrentOwner,Qe={key:!0,ref:!0,__self:!0,__source:!0},Se,je;function er(e){if(M.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function rr(e){if(M.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function tr(e,r){typeof e.ref=="string"&&Oe.current}function nr(e,r){{var t=function(){Se||(Se=!0,u("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function ar(e,r){{var t=function(){je||(je=!0,u("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var or=function(e,r,t,n,s,c,i){var a={$$typeof:o,type:e,key:r,ref:t,props:i,_owner:c};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function ir(e,r,t,n,s){{var c,i={},a=null,m=null;t!==void 0&&(Te(t),a=""+t),rr(r)&&(Te(r.key),a=""+r.key),er(r)&&(m=r.ref,tr(r,s));for(c in r)M.call(r,c)&&!Qe.hasOwnProperty(c)&&(i[c]=r[c]);if(e&&e.defaultProps){var f=e.defaultProps;for(c in f)i[c]===void 0&&(i[c]=f[c])}if(a||m){var d=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&nr(i,d),m&&ar(i,d)}return or(e,a,m,s,n,Oe.current,i)}}var ue=x.ReactCurrentOwner,ke=x.ReactDebugCurrentFrame;function A(e){if(e){var r=e._owner,t=H(e.type,e._source,r?r.type:null);ke.setExtraStackFrame(t)}else ke.setExtraStackFrame(null)}var ce;ce=!1;function fe(e){return typeof e=="object"&&e!==null&&e.$$typeof===o}function Fe(){{if(ue.current){var e=E(ue.current.type);if(e)return`
22
22
 
23
- Check the render method of \``+e+"`."}return""}}function ir(e){return""}var De={};function sr(e){{var r=Fe();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
23
+ Check the render method of \``+e+"`."}return""}}function sr(e){return""}var De={};function lr(e){{var r=Fe();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
24
24
 
25
- Check the top-level render call using <`+t+">.")}return r}}function Ae(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=sr(r);if(De[t])return;De[t]=!0;var n="";e&&e._owner&&e._owner!==le.current&&(n=" It was passed a child from "+E(e._owner.type)+"."),A(e),u('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),A(null)}}function Ie(e,r){{if(typeof e!="object")return;if(ue(e))for(var t=0;t<e.length;t++){var n=e[t];fe(n)&&Ae(n,r)}else if(fe(e))e._store&&(e._store.validated=!0);else if(e){var s=U(e);if(typeof s=="function"&&s!==e.entries)for(var c=s.call(e),i;!(i=c.next()).done;)fe(i.value)&&Ae(i.value,r)}}}function ur(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===p||r.$$typeof===R))t=r.propTypes;else return;if(t){var n=E(r);Ke(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!ce){ce=!0;var s=E(r);u("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&u("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function lr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){A(e),u("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),A(null);break}}e.ref!==null&&(A(e),u("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}var $e={};function We(e,r,t,n,s,c){{var i=ae(e);if(!i){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var m=ir();m?a+=m:a+=Fe();var f;e===null?f="null":ue(e)?f="array":e!==void 0&&e.$$typeof===o?(f="<"+(E(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):f=typeof e,u("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",f,a)}var d=or(e,r,t,s,c);if(d==null)return d;if(i){var y=r.children;if(y!==void 0)if(n)if(ue(y)){for(var I=0;I<y.length;I++)Ie(y[I],e);Object.freeze&&Object.freeze(y)}else u("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ie(y,e)}if(Y.call(r,"key")){var S=E(e),h=Object.keys(r).filter(function(mr){return mr!=="key"}),de=h.length>0?"{key: someKey, "+h.join(": ..., ")+": ...}":"{key: someKey}";if(!$e[S+de]){var pr=h.length>0?"{"+h.join(": ..., ")+": ...}":"{}";u(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+t+">.")}return r}}function Ae(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=lr(r);if(De[t])return;De[t]=!0;var n="";e&&e._owner&&e._owner!==ue.current&&(n=" It was passed a child from "+E(e._owner.type)+"."),A(e),u('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),A(null)}}function Ie(e,r){{if(typeof e!="object")return;if(le(e))for(var t=0;t<e.length;t++){var n=e[t];fe(n)&&Ae(n,r)}else if(fe(e))e._store&&(e._store.validated=!0);else if(e){var s=U(e);if(typeof s=="function"&&s!==e.entries)for(var c=s.call(e),i;!(i=c.next()).done;)fe(i.value)&&Ae(i.value,r)}}}function ur(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===v||r.$$typeof===R))t=r.propTypes;else return;if(t){var n=E(r);ze(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!ce){ce=!0;var s=E(r);u("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&u("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function cr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){A(e),u("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),A(null);break}}e.ref!==null&&(A(e),u("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}var $e={};function We(e,r,t,n,s,c){{var i=ae(e);if(!i){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var m=sr();m?a+=m:a+=Fe();var f;e===null?f="null":le(e)?f="array":e!==void 0&&e.$$typeof===o?(f="<"+(E(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):f=typeof e,u("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",f,a)}var d=ir(e,r,t,s,c);if(d==null)return d;if(i){var y=r.children;if(y!==void 0)if(n)if(le(y)){for(var I=0;I<y.length;I++)Ie(y[I],e);Object.freeze&&Object.freeze(y)}else u("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ie(y,e)}if(M.call(r,"key")){var S=E(e),g=Object.keys(r).filter(function(hr){return hr!=="key"}),de=g.length>0?"{key: someKey, "+g.join(": ..., ")+": ...}":"{key: someKey}";if(!$e[S+de]){var mr=g.length>0?"{"+g.join(": ..., ")+": ...}":"{}";u(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,de,S,pr,S),$e[S+de]=!0}}return e===b?lr(d):ur(d),d}}function cr(e,r,t){return We(e,r,t,!0)}function fr(e,r,t){return We(e,r,t,!1)}var dr=fr,vr=cr;q.Fragment=b,q.jsx=dr,q.jsxs=vr}()),q}process.env.NODE_ENV==="production"?ve.exports=Rr():ve.exports=Er();var j=ve.exports;class qe{constructor(){Ve(this,"components");this.components=new Map}register(o,l){this.components.has(o)&&console.warn(`[XForm Registry] 组件 ${o} 已存在,将被覆盖`),this.components.set(o,{name:o,label:l.label,component:l.component,defaultValue:l.defaultValue,defaultProps:l.defaultProps||{},hasIntrinsicWidth:l.hasIntrinsicWidth||!1})}registerBatch(o){o.forEach(l=>{this.register(l.name,l)})}getComponent(o){return this.components.get(o)}getAllComponentNames(){return Array.from(this.components.keys())}getAllComponents(){return this.components}hasComponent(o){return this.components.has(o)}unregister(o){this.components.delete(o)}clear(){this.components.clear()}}const L=new qe,Le=$.createContext(L),_r=({children:v,registry:o=L,components:l=[]})=>{const b=$.useRef(!1);return!b.current&&l.length>0&&(o.registerBatch(l),b.current=!0),j.jsx(Le.Provider,{value:o,children:v})},pe=()=>$.useContext(Le),Cr=v=>{const l=pe().getComponent(v);return l||(console.warn(`组件 "${v}" 未注册`),null)},Pr=[{name:"input",label:"输入框",component:"input",defaultValue:"",defaultProps:{placeholder:"请输入",allowClear:!0,style:{width:"320px"}}},{name:"select",label:"select单选",component:"select",defaultValue:"",defaultProps:{placeholder:"请输入",allowClear:!0,style:{width:"320px"}}}],Tr=()=>{L.getAllComponentNames().length===0&&(L.registerBatch(Pr),console.log("[XForm] 默认组件已初始化"))},wr=yr.observer(({config:v=[],model:o,onSubmit:l,onError:b,onReset:k,layout:F={inlineError:!0},showButtons:x=!0,submitText:_="提交",resetText:p="重置",submitButtonProps:T={},resetButtonProps:g={},wrapperClassName:R,wrapperStyle:C,...D})=>{const N=u=>{console.log("[XForm Renderer] 表单提交:",u),l==null||l(u)},B=pe(),U=o==null?void 0:o.values,w=$.useMemo(()=>v.filter(u=>u.visible===!1?!1:typeof u.visible=="function"?u.visible(U||{}):!0).map((u,ee)=>{const{name:W,component:J,componentProps:re={},disabled:te,style:ne,className:X,...ae}=u,V=B.getComponent(J);if(!V)return console.error(`组件 "${J}" 未注册,无法渲染表单项 "${W}"`),null;const K=V.component,E={...V.defaultProps,...re};te&&(E.disabled=!0);const P={...ae,name:W,component:K,componentProps:E,style:ne,className:X};return u.required&&u.requiredMessage&&(P.required=u.required,P.requiredMessage=u.requiredMessage),j.jsx(Q.FormItem,{...P},`${W}-${ee}`)}).filter(Boolean),[v,U,B]);return j.jsx("div",{className:R,style:C,children:j.jsxs(Q.Form,{model:o,layout:F,onSubmit:N,onError:b,onReset:k,...D,children:[w,x&&j.jsx(Q.Form.ItemView,{children:j.jsx("div",{style:{marginTop:24},children:j.jsx(Q.Form.Submit,{ButtonComponent:br.Button,type:"primary",...T,children:_})})})]})})}),Or=Tr;exports.ComponentProvider=_r;exports.ComponentRegistry=qe;exports.FormRenderer=wr;exports.globalRegistry=L;exports.registerDefaultComponents=Or;exports.useComponent=Cr;exports.useComponentRegistry=pe;
30
+ <%s key={someKey} {...props} />`,de,S,mr,S),$e[S+de]=!0}}return e===b?cr(d):ur(d),d}}function fr(e,r,t){return We(e,r,t,!0)}function dr(e,r,t){return We(e,r,t,!1)}var pr=dr,vr=fr;N.Fragment=b,N.jsx=pr,N.jsxs=vr}()),N}process.env.NODE_ENV==="production"?pe.exports=Er():pe.exports=_r();var j=pe.exports;class Ne{constructor(){Ye(this,"components");this.components=new Map}register(o,l){this.components.has(o)&&console.warn(`[XForm Registry] 组件 ${o} 已存在,将被覆盖`),this.components.set(o,{name:o,label:l.label,component:l.component,defaultValue:l.defaultValue,defaultProps:l.defaultProps||{},hasIntrinsicWidth:l.hasIntrinsicWidth||!1})}registerBatch(o){o.forEach(l=>{this.register(l.name,l)})}getComponent(o){return this.components.get(o)}getAllComponentNames(){return Array.from(this.components.keys())}getAllComponents(){return this.components}hasComponent(o){return this.components.has(o)}unregister(o){this.components.delete(o)}clear(){this.components.clear()}}const q=new Ne,qe=$.createContext(q),Pr=({children:p,registry:o=q,components:l=[]})=>{const b=$.useRef(!1);return!b.current&&l.length>0&&(o.registerBatch(l),b.current=!0),!b.current&&l.length===0&&Le(),j.jsx(qe.Provider,{value:o,children:p})},ve=()=>$.useContext(qe),Cr=p=>{const l=ve().getComponent(p);return l||(console.warn(`组件 "${p}" 未注册`),null)},wr=[{name:"input",label:"输入框",component:"input",defaultProps:{placeholder:"请输入",allowClear:!0,style:{width:"320px"}}},{name:"select",label:"select单选",component:"select",defaultProps:{placeholder:"请选择",style:{width:"320px"}}},{name:"multiSelect",label:"select多选",component:"multiSelect",defaultProps:{placeholder:"请输入",allowClear:!0,style:{width:"320px"}}},{name:"radio",label:"radio单选",component:"radio"},{name:"checkbox",label:"checkbox复选",component:"checkbox"},{name:"datePicker",label:"日期选择",component:"datePicker",defaultProps:{style:{width:"320px"}}},{name:"dateRangePicker",label:"日期范围",component:"dateRangePicker",defaultProps:{style:{width:"320px"}}},{name:"timePicker",label:"时间选择",component:"timePicker",defaultProps:{style:{width:"320px"}}},{name:"timeRangePicker",label:"时间范围",component:"timeRangePicker",defaultProps:{style:{width:"320px"}}},{name:"textArea",label:"多行输入",component:"textArea",defaultProps:{placeholder:"请输入",allowClear:!0,style:{width:"320px"}}},{name:"inputNumber",label:"数字输入",component:"inputNumber",defaultProps:{style:{width:"320px"}}},{name:"slider",label:"滑动条",component:"slider"},{name:"switch",label:"开关",component:"switch"},{name:"rate",label:"评分器",component:"rate"},{name:"colorPicker",label:"颜色选择",component:"colorPicker"}],Le=()=>{q.getAllComponentNames().length===0&&(q.registerBatch(wr),console.log("[XForm] 默认组件已初始化"))},xr=yr.observer(({config:p=[],model:o,onSubmit:l,onError:b,onReset:k,layout:F={inlineError:!0},showButtons:O=!0,submitText:_="提交",resetText:v="重置",submitButtonProps:w={},resetButtonProps:h={},wrapperClassName:R,wrapperStyle:P,...D})=>{const L=u=>{console.log("[XForm Renderer] 表单提交:",u),l==null||l(u)},B=ve(),U=o==null?void 0:o.values,x=$.useMemo(()=>p.filter(u=>u.visible===!1?!1:typeof u.visible=="function"?u.visible(U||{}):!0).map((u,ee)=>{const{name:W,component:J,componentProps:re={},disabled:te,style:ne,className:X,...ae}=u,Y=B.getComponent(J);if(!Y)return console.error(`组件 "${J}" 未注册,无法渲染表单项 "${W}"`),null;const K=Y.component,E={...Y.defaultProps,...re};te&&(E.disabled=!0);const C={...ae,name:W,component:K,componentProps:E,style:ne,className:X};return u.required&&u.requiredMessage&&(C.required=u.required,C.requiredMessage=u.requiredMessage),j.jsx(Q.FormItem,{...C},`${W}-${ee}`)}).filter(Boolean),[p,U,B]);return j.jsx("div",{className:R,style:P,children:j.jsxs(Q.Form,{model:o,layout:F,onSubmit:L,onError:b,onReset:k,...D,children:[x,O&&j.jsx(Q.Form.ItemView,{children:j.jsx("div",{style:{marginTop:24},children:j.jsx(Q.Form.Submit,{ButtonComponent:Rr.Button,type:"primary",...w,children:_})})})]})})}),Tr=Le;exports.ComponentProvider=Pr;exports.ComponentRegistry=Ne;exports.FormRenderer=xr;exports.globalRegistry=q;exports.registerDefaultComponents=Tr;exports.useComponent=Cr;exports.useComponentRegistry=ve;
package/dist/index.esm.js CHANGED
@@ -1,11 +1,11 @@
1
- var mr = Object.defineProperty;
2
- var gr = (v, o, l) => o in v ? mr(v, o, { enumerable: !0, configurable: !0, writable: !0, value: l }) : v[o] = l;
3
- var $e = (v, o, l) => gr(v, typeof o != "symbol" ? o + "" : o, l);
4
- import Ye, { createContext as hr, useContext as yr, useRef as br, useMemo as Rr } from "react";
5
- import { observer as Er } from "mobx-react-lite";
6
- import { FormItem as _r, Form as fe } from "react-antd-xform";
1
+ var hr = Object.defineProperty;
2
+ var gr = (p, o, l) => o in p ? hr(p, o, { enumerable: !0, configurable: !0, writable: !0, value: l }) : p[o] = l;
3
+ var $e = (p, o, l) => gr(p, typeof o != "symbol" ? o + "" : o, l);
4
+ import Me, { createContext as br, useContext as yr, useRef as Rr, useMemo as Er } from "react";
5
+ import { observer as _r } from "mobx-react-lite";
6
+ import { FormItem as Pr, Form as fe } from "react-antd-xform";
7
7
  import { Button as Cr } from "antd";
8
- var de = { exports: {} }, Y = {};
8
+ var de = { exports: {} }, M = {};
9
9
  /**
10
10
  * @license React
11
11
  * react-jsx-runtime.production.min.js
@@ -16,20 +16,20 @@ var de = { exports: {} }, Y = {};
16
16
  * LICENSE file in the root directory of this source tree.
17
17
  */
18
18
  var We;
19
- function Pr() {
20
- if (We) return Y;
19
+ function wr() {
20
+ if (We) return M;
21
21
  We = 1;
22
- var v = Ye, o = Symbol.for("react.element"), l = Symbol.for("react.fragment"), b = Object.prototype.hasOwnProperty, k = v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, F = { key: !0, ref: !0, __self: !0, __source: !0 };
23
- function x(_, p, T) {
24
- var g, R = {}, C = null, D = null;
25
- T !== void 0 && (C = "" + T), p.key !== void 0 && (C = "" + p.key), p.ref !== void 0 && (D = p.ref);
26
- for (g in p) b.call(p, g) && !F.hasOwnProperty(g) && (R[g] = p[g]);
27
- if (_ && _.defaultProps) for (g in p = _.defaultProps, p) R[g] === void 0 && (R[g] = p[g]);
28
- return { $$typeof: o, type: _, key: C, ref: D, props: R, _owner: k.current };
22
+ var p = Me, o = Symbol.for("react.element"), l = Symbol.for("react.fragment"), b = Object.prototype.hasOwnProperty, k = p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, F = { key: !0, ref: !0, __self: !0, __source: !0 };
23
+ function O(_, v, w) {
24
+ var h, R = {}, P = null, D = null;
25
+ w !== void 0 && (P = "" + w), v.key !== void 0 && (P = "" + v.key), v.ref !== void 0 && (D = v.ref);
26
+ for (h in v) b.call(v, h) && !F.hasOwnProperty(h) && (R[h] = v[h]);
27
+ if (_ && _.defaultProps) for (h in v = _.defaultProps, v) R[h] === void 0 && (R[h] = v[h]);
28
+ return { $$typeof: o, type: _, key: P, ref: D, props: R, _owner: k.current };
29
29
  }
30
- return Y.Fragment = l, Y.jsx = x, Y.jsxs = x, Y;
30
+ return M.Fragment = l, M.jsx = O, M.jsxs = O, M;
31
31
  }
32
- var M = {};
32
+ var V = {};
33
33
  /**
34
34
  * @license React
35
35
  * react-jsx-runtime.development.js
@@ -39,17 +39,17 @@ var M = {};
39
39
  * This source code is licensed under the MIT license found in the
40
40
  * LICENSE file in the root directory of this source tree.
41
41
  */
42
- var Ve;
43
- function Tr() {
44
- return Ve || (Ve = 1, process.env.NODE_ENV !== "production" && function() {
45
- var v = Ye, o = Symbol.for("react.element"), l = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"), F = Symbol.for("react.profiler"), x = Symbol.for("react.provider"), _ = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), D = Symbol.for("react.offscreen"), N = Symbol.iterator, L = "@@iterator";
42
+ var Ye;
43
+ function xr() {
44
+ return Ye || (Ye = 1, process.env.NODE_ENV !== "production" && function() {
45
+ var p = Me, o = Symbol.for("react.element"), l = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"), F = Symbol.for("react.profiler"), O = Symbol.for("react.provider"), _ = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), D = Symbol.for("react.offscreen"), N = Symbol.iterator, L = "@@iterator";
46
46
  function B(e) {
47
47
  if (e === null || typeof e != "object")
48
48
  return null;
49
49
  var r = N && e[N] || e[L];
50
50
  return typeof r == "function" ? r : null;
51
51
  }
52
- var w = v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
52
+ var x = p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
53
53
  function u(e) {
54
54
  {
55
55
  for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
@@ -59,7 +59,7 @@ function Tr() {
59
59
  }
60
60
  function Z(e, r, t) {
61
61
  {
62
- var n = w.ReactDebugCurrentFrame, s = n.getStackAddendum();
62
+ var n = x.ReactDebugCurrentFrame, s = n.getStackAddendum();
63
63
  s !== "" && (r += "%s", t = t.concat([s]));
64
64
  var c = t.map(function(i) {
65
65
  return String(i);
@@ -70,7 +70,7 @@ function Tr() {
70
70
  var $ = !1, U = !1, Q = !1, ee = !1, re = !1, q;
71
71
  q = Symbol.for("react.module.reference");
72
72
  function te(e) {
73
- return !!(typeof e == "string" || typeof e == "function" || e === b || e === F || re || e === k || e === T || e === g || ee || e === D || $ || U || Q || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === R || e.$$typeof === x || e.$$typeof === _ || e.$$typeof === p || // This needs to include all possible module reference object
73
+ return !!(typeof e == "string" || typeof e == "function" || e === b || e === F || re || e === k || e === w || e === h || ee || e === D || $ || U || Q || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === R || e.$$typeof === O || e.$$typeof === _ || e.$$typeof === v || // This needs to include all possible module reference object
74
74
  // types supported by any Flight configuration anywhere since
75
75
  // we don't know which Flight build this will end up being used
76
76
  // with.
@@ -102,9 +102,9 @@ function Tr() {
102
102
  return "Profiler";
103
103
  case k:
104
104
  return "StrictMode";
105
- case T:
105
+ case w:
106
106
  return "Suspense";
107
- case g:
107
+ case h:
108
108
  return "SuspenseList";
109
109
  }
110
110
  if (typeof e == "object")
@@ -112,15 +112,15 @@ function Tr() {
112
112
  case _:
113
113
  var r = e;
114
114
  return J(r) + ".Consumer";
115
- case x:
115
+ case O:
116
116
  var t = e;
117
117
  return J(t._context) + ".Provider";
118
- case p:
118
+ case v:
119
119
  return W(e, e.render, "ForwardRef");
120
120
  case R:
121
121
  var n = e.displayName || null;
122
122
  return n !== null ? n : E(e.type) || "Memo";
123
- case C: {
123
+ case P: {
124
124
  var s = e, c = s._payload, i = s._init;
125
125
  try {
126
126
  return E(i(c));
@@ -131,14 +131,14 @@ function Tr() {
131
131
  }
132
132
  return null;
133
133
  }
134
- var O = Object.assign, P = 0, ve, pe, me, ge, he, ye, be;
134
+ var T = Object.assign, C = 0, pe, ve, me, he, ge, be, ye;
135
135
  function Re() {
136
136
  }
137
137
  Re.__reactDisabledLog = !0;
138
- function Le() {
138
+ function Be() {
139
139
  {
140
- if (P === 0) {
141
- ve = console.log, pe = console.info, me = console.warn, ge = console.error, he = console.group, ye = console.groupCollapsed, be = console.groupEnd;
140
+ if (C === 0) {
141
+ pe = console.log, ve = console.info, me = console.warn, he = console.error, ge = console.group, be = console.groupCollapsed, ye = console.groupEnd;
142
142
  var e = {
143
143
  configurable: !0,
144
144
  enumerable: !0,
@@ -155,45 +155,45 @@ function Tr() {
155
155
  groupEnd: e
156
156
  });
157
157
  }
158
- P++;
158
+ C++;
159
159
  }
160
160
  }
161
- function Be() {
161
+ function Ue() {
162
162
  {
163
- if (P--, P === 0) {
163
+ if (C--, C === 0) {
164
164
  var e = {
165
165
  configurable: !0,
166
166
  enumerable: !0,
167
167
  writable: !0
168
168
  };
169
169
  Object.defineProperties(console, {
170
- log: O({}, e, {
171
- value: ve
172
- }),
173
- info: O({}, e, {
170
+ log: T({}, e, {
174
171
  value: pe
175
172
  }),
176
- warn: O({}, e, {
177
- value: me
173
+ info: T({}, e, {
174
+ value: ve
178
175
  }),
179
- error: O({}, e, {
180
- value: ge
176
+ warn: T({}, e, {
177
+ value: me
181
178
  }),
182
- group: O({}, e, {
179
+ error: T({}, e, {
183
180
  value: he
184
181
  }),
185
- groupCollapsed: O({}, e, {
186
- value: ye
182
+ group: T({}, e, {
183
+ value: ge
187
184
  }),
188
- groupEnd: O({}, e, {
185
+ groupCollapsed: T({}, e, {
189
186
  value: be
187
+ }),
188
+ groupEnd: T({}, e, {
189
+ value: ye
190
190
  })
191
191
  });
192
192
  }
193
- P < 0 && u("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
193
+ C < 0 && u("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
194
194
  }
195
195
  }
196
- var ne = w.ReactCurrentDispatcher, ae;
196
+ var ne = x.ReactCurrentDispatcher, ae;
197
197
  function K(e, r, t) {
198
198
  {
199
199
  if (ae === void 0)
@@ -209,8 +209,8 @@ function Tr() {
209
209
  }
210
210
  var oe = !1, X;
211
211
  {
212
- var Ue = typeof WeakMap == "function" ? WeakMap : Map;
213
- X = new Ue();
212
+ var qe = typeof WeakMap == "function" ? WeakMap : Map;
213
+ X = new qe();
214
214
  }
215
215
  function Ee(e, r) {
216
216
  if (!e || oe)
@@ -225,7 +225,7 @@ function Tr() {
225
225
  var s = Error.prepareStackTrace;
226
226
  Error.prepareStackTrace = void 0;
227
227
  var c;
228
- c = ne.current, ne.current = null, Le();
228
+ c = ne.current, ne.current = null, Be();
229
229
  try {
230
230
  if (r) {
231
231
  var i = function() {
@@ -238,29 +238,29 @@ function Tr() {
238
238
  }), typeof Reflect == "object" && Reflect.construct) {
239
239
  try {
240
240
  Reflect.construct(i, []);
241
- } catch (h) {
242
- n = h;
241
+ } catch (g) {
242
+ n = g;
243
243
  }
244
244
  Reflect.construct(e, [], i);
245
245
  } else {
246
246
  try {
247
247
  i.call();
248
- } catch (h) {
249
- n = h;
248
+ } catch (g) {
249
+ n = g;
250
250
  }
251
251
  e.call(i.prototype);
252
252
  }
253
253
  } else {
254
254
  try {
255
255
  throw Error();
256
- } catch (h) {
257
- n = h;
256
+ } catch (g) {
257
+ n = g;
258
258
  }
259
259
  e();
260
260
  }
261
- } catch (h) {
262
- if (h && n && typeof h.stack == "string") {
263
- for (var a = h.stack.split(`
261
+ } catch (g) {
262
+ if (g && n && typeof g.stack == "string") {
263
+ for (var a = g.stack.split(`
264
264
  `), m = n.stack.split(`
265
265
  `), f = a.length - 1, d = m.length - 1; f >= 1 && d >= 0 && a[f] !== m[d]; )
266
266
  d--;
@@ -278,15 +278,15 @@ function Tr() {
278
278
  }
279
279
  }
280
280
  } finally {
281
- oe = !1, ne.current = c, Be(), Error.prepareStackTrace = s;
281
+ oe = !1, ne.current = c, Ue(), Error.prepareStackTrace = s;
282
282
  }
283
283
  var I = e ? e.displayName || e.name : "", S = I ? K(I) : "";
284
284
  return typeof e == "function" && X.set(e, S), S;
285
285
  }
286
- function qe(e, r, t) {
286
+ function Je(e, r, t) {
287
287
  return Ee(e, !1);
288
288
  }
289
- function Je(e) {
289
+ function Ke(e) {
290
290
  var r = e.prototype;
291
291
  return !!(r && r.isReactComponent);
292
292
  }
@@ -294,22 +294,22 @@ function Tr() {
294
294
  if (e == null)
295
295
  return "";
296
296
  if (typeof e == "function")
297
- return Ee(e, Je(e));
297
+ return Ee(e, Ke(e));
298
298
  if (typeof e == "string")
299
299
  return K(e);
300
300
  switch (e) {
301
- case T:
301
+ case w:
302
302
  return K("Suspense");
303
- case g:
303
+ case h:
304
304
  return K("SuspenseList");
305
305
  }
306
306
  if (typeof e == "object")
307
307
  switch (e.$$typeof) {
308
- case p:
309
- return qe(e.render);
308
+ case v:
309
+ return Je(e.render);
310
310
  case R:
311
311
  return z(e.type, r, t);
312
- case C: {
312
+ case P: {
313
313
  var n = e, s = n._payload, c = n._init;
314
314
  try {
315
315
  return z(c(s), r, t);
@@ -319,17 +319,17 @@ function Tr() {
319
319
  }
320
320
  return "";
321
321
  }
322
- var V = Object.prototype.hasOwnProperty, _e = {}, Ce = w.ReactDebugCurrentFrame;
322
+ var Y = Object.prototype.hasOwnProperty, _e = {}, Pe = x.ReactDebugCurrentFrame;
323
323
  function G(e) {
324
324
  if (e) {
325
325
  var r = e._owner, t = z(e.type, e._source, r ? r.type : null);
326
- Ce.setExtraStackFrame(t);
326
+ Pe.setExtraStackFrame(t);
327
327
  } else
328
- Ce.setExtraStackFrame(null);
328
+ Pe.setExtraStackFrame(null);
329
329
  }
330
- function Ke(e, r, t, n, s) {
330
+ function Xe(e, r, t, n, s) {
331
331
  {
332
- var c = Function.call.bind(V);
332
+ var c = Function.call.bind(Y);
333
333
  for (var i in e)
334
334
  if (c(e, i)) {
335
335
  var a = void 0;
@@ -346,59 +346,59 @@ function Tr() {
346
346
  }
347
347
  }
348
348
  }
349
- var Xe = Array.isArray;
349
+ var ze = Array.isArray;
350
350
  function ie(e) {
351
- return Xe(e);
351
+ return ze(e);
352
352
  }
353
- function ze(e) {
353
+ function Ge(e) {
354
354
  {
355
355
  var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
356
356
  return t;
357
357
  }
358
358
  }
359
- function Ge(e) {
359
+ function He(e) {
360
360
  try {
361
- return Pe(e), !1;
361
+ return Ce(e), !1;
362
362
  } catch {
363
363
  return !0;
364
364
  }
365
365
  }
366
- function Pe(e) {
366
+ function Ce(e) {
367
367
  return "" + e;
368
368
  }
369
- function Te(e) {
370
- if (Ge(e))
371
- return u("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ze(e)), Pe(e);
369
+ function we(e) {
370
+ if (He(e))
371
+ return u("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ge(e)), Ce(e);
372
372
  }
373
- var we = w.ReactCurrentOwner, He = {
373
+ var xe = x.ReactCurrentOwner, Ze = {
374
374
  key: !0,
375
375
  ref: !0,
376
376
  __self: !0,
377
377
  __source: !0
378
- }, Oe, xe;
379
- function Ze(e) {
380
- if (V.call(e, "ref")) {
378
+ }, Te, Oe;
379
+ function Qe(e) {
380
+ if (Y.call(e, "ref")) {
381
381
  var r = Object.getOwnPropertyDescriptor(e, "ref").get;
382
382
  if (r && r.isReactWarning)
383
383
  return !1;
384
384
  }
385
385
  return e.ref !== void 0;
386
386
  }
387
- function Qe(e) {
388
- if (V.call(e, "key")) {
387
+ function er(e) {
388
+ if (Y.call(e, "key")) {
389
389
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
390
390
  if (r && r.isReactWarning)
391
391
  return !1;
392
392
  }
393
393
  return e.key !== void 0;
394
394
  }
395
- function er(e, r) {
396
- typeof e.ref == "string" && we.current;
397
- }
398
395
  function rr(e, r) {
396
+ typeof e.ref == "string" && xe.current;
397
+ }
398
+ function tr(e, r) {
399
399
  {
400
400
  var t = function() {
401
- Oe || (Oe = !0, u("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
401
+ Te || (Te = !0, u("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
402
402
  };
403
403
  t.isReactWarning = !0, Object.defineProperty(e, "key", {
404
404
  get: t,
@@ -406,10 +406,10 @@ function Tr() {
406
406
  });
407
407
  }
408
408
  }
409
- function tr(e, r) {
409
+ function nr(e, r) {
410
410
  {
411
411
  var t = function() {
412
- xe || (xe = !0, u("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
412
+ Oe || (Oe = !0, u("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
413
413
  };
414
414
  t.isReactWarning = !0, Object.defineProperty(e, "ref", {
415
415
  get: t,
@@ -417,7 +417,7 @@ function Tr() {
417
417
  });
418
418
  }
419
419
  }
420
- var nr = function(e, r, t, n, s, c, i) {
420
+ var ar = function(e, r, t, n, s, c, i) {
421
421
  var a = {
422
422
  // This tag allows us to uniquely identify this as a React Element
423
423
  $$typeof: o,
@@ -446,12 +446,12 @@ function Tr() {
446
446
  value: s
447
447
  }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
448
448
  };
449
- function ar(e, r, t, n, s) {
449
+ function or(e, r, t, n, s) {
450
450
  {
451
451
  var c, i = {}, a = null, m = null;
452
- t !== void 0 && (Te(t), a = "" + t), Qe(r) && (Te(r.key), a = "" + r.key), Ze(r) && (m = r.ref, er(r, s));
452
+ t !== void 0 && (we(t), a = "" + t), er(r) && (we(r.key), a = "" + r.key), Qe(r) && (m = r.ref, rr(r, s));
453
453
  for (c in r)
454
- V.call(r, c) && !He.hasOwnProperty(c) && (i[c] = r[c]);
454
+ Y.call(r, c) && !Ze.hasOwnProperty(c) && (i[c] = r[c]);
455
455
  if (e && e.defaultProps) {
456
456
  var f = e.defaultProps;
457
457
  for (c in f)
@@ -459,12 +459,12 @@ function Tr() {
459
459
  }
460
460
  if (a || m) {
461
461
  var d = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
462
- a && rr(i, d), m && tr(i, d);
462
+ a && tr(i, d), m && nr(i, d);
463
463
  }
464
- return nr(e, a, m, s, n, we.current, i);
464
+ return ar(e, a, m, s, n, xe.current, i);
465
465
  }
466
466
  }
467
- var se = w.ReactCurrentOwner, Se = w.ReactDebugCurrentFrame;
467
+ var se = x.ReactCurrentOwner, Se = x.ReactDebugCurrentFrame;
468
468
  function A(e) {
469
469
  if (e) {
470
470
  var r = e._owner, t = z(e.type, e._source, r ? r.type : null);
@@ -472,9 +472,9 @@ function Tr() {
472
472
  } else
473
473
  Se.setExtraStackFrame(null);
474
474
  }
475
- var ue;
476
- ue = !1;
477
- function le(e) {
475
+ var le;
476
+ le = !1;
477
+ function ue(e) {
478
478
  return typeof e == "object" && e !== null && e.$$typeof === o;
479
479
  }
480
480
  function je() {
@@ -489,11 +489,11 @@ Check the render method of \`` + e + "`.";
489
489
  return "";
490
490
  }
491
491
  }
492
- function or(e) {
492
+ function ir(e) {
493
493
  return "";
494
494
  }
495
495
  var ke = {};
496
- function ir(e) {
496
+ function sr(e) {
497
497
  {
498
498
  var r = je();
499
499
  if (!r) {
@@ -510,7 +510,7 @@ Check the top-level render call using <` + t + ">.");
510
510
  if (!e._store || e._store.validated || e.key != null)
511
511
  return;
512
512
  e._store.validated = !0;
513
- var t = ir(r);
513
+ var t = sr(r);
514
514
  if (ke[t])
515
515
  return;
516
516
  ke[t] = !0;
@@ -525,19 +525,19 @@ Check the top-level render call using <` + t + ">.");
525
525
  if (ie(e))
526
526
  for (var t = 0; t < e.length; t++) {
527
527
  var n = e[t];
528
- le(n) && Fe(n, r);
528
+ ue(n) && Fe(n, r);
529
529
  }
530
- else if (le(e))
530
+ else if (ue(e))
531
531
  e._store && (e._store.validated = !0);
532
532
  else if (e) {
533
533
  var s = B(e);
534
534
  if (typeof s == "function" && s !== e.entries)
535
535
  for (var c = s.call(e), i; !(i = c.next()).done; )
536
- le(i.value) && Fe(i.value, r);
536
+ ue(i.value) && Fe(i.value, r);
537
537
  }
538
538
  }
539
539
  }
540
- function sr(e) {
540
+ function lr(e) {
541
541
  {
542
542
  var r = e.type;
543
543
  if (r == null || typeof r == "string")
@@ -545,7 +545,7 @@ Check the top-level render call using <` + t + ">.");
545
545
  var t;
546
546
  if (typeof r == "function")
547
547
  t = r.propTypes;
548
- else if (typeof r == "object" && (r.$$typeof === p || // Note: Memo only checks outer props here.
548
+ else if (typeof r == "object" && (r.$$typeof === v || // Note: Memo only checks outer props here.
549
549
  // Inner props are checked in the reconciler.
550
550
  r.$$typeof === R))
551
551
  t = r.propTypes;
@@ -553,9 +553,9 @@ Check the top-level render call using <` + t + ">.");
553
553
  return;
554
554
  if (t) {
555
555
  var n = E(r);
556
- Ke(t, e.props, "prop", n, e);
557
- } else if (r.PropTypes !== void 0 && !ue) {
558
- ue = !0;
556
+ Xe(t, e.props, "prop", n, e);
557
+ } else if (r.PropTypes !== void 0 && !le) {
558
+ le = !0;
559
559
  var s = E(r);
560
560
  u("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown");
561
561
  }
@@ -581,12 +581,12 @@ Check the top-level render call using <` + t + ">.");
581
581
  if (!i) {
582
582
  var a = "";
583
583
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
584
- var m = or();
584
+ var m = ir();
585
585
  m ? a += m : a += je();
586
586
  var f;
587
587
  e === null ? f = "null" : ie(e) ? f = "array" : e !== void 0 && e.$$typeof === o ? (f = "<" + (E(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : f = typeof e, u("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", f, a);
588
588
  }
589
- var d = ar(e, r, t, s, c);
589
+ var d = or(e, r, t, s, c);
590
590
  if (d == null)
591
591
  return d;
592
592
  if (i) {
@@ -602,12 +602,12 @@ Check the top-level render call using <` + t + ">.");
602
602
  else
603
603
  De(y, e);
604
604
  }
605
- if (V.call(r, "key")) {
606
- var S = E(e), h = Object.keys(r).filter(function(pr) {
607
- return pr !== "key";
608
- }), ce = h.length > 0 ? "{key: someKey, " + h.join(": ..., ") + ": ...}" : "{key: someKey}";
605
+ if (Y.call(r, "key")) {
606
+ var S = E(e), g = Object.keys(r).filter(function(mr) {
607
+ return mr !== "key";
608
+ }), ce = g.length > 0 ? "{key: someKey, " + g.join(": ..., ") + ": ...}" : "{key: someKey}";
609
609
  if (!Ae[S + ce]) {
610
- var vr = h.length > 0 ? "{" + h.join(": ..., ") + ": ...}" : "{}";
610
+ var vr = g.length > 0 ? "{" + g.join(": ..., ") + ": ...}" : "{}";
611
611
  u(`A props object containing a "key" prop is being spread into JSX:
612
612
  let props = %s;
613
613
  <%s {...props} />
@@ -616,22 +616,22 @@ React keys must be passed directly to JSX without using spread:
616
616
  <%s key={someKey} {...props} />`, ce, S, vr, S), Ae[S + ce] = !0;
617
617
  }
618
618
  }
619
- return e === b ? ur(d) : sr(d), d;
619
+ return e === b ? ur(d) : lr(d), d;
620
620
  }
621
621
  }
622
- function lr(e, r, t) {
622
+ function cr(e, r, t) {
623
623
  return Ie(e, r, t, !0);
624
624
  }
625
- function cr(e, r, t) {
625
+ function fr(e, r, t) {
626
626
  return Ie(e, r, t, !1);
627
627
  }
628
- var fr = cr, dr = lr;
629
- M.Fragment = b, M.jsx = fr, M.jsxs = dr;
630
- }()), M;
628
+ var dr = fr, pr = cr;
629
+ V.Fragment = b, V.jsx = dr, V.jsxs = pr;
630
+ }()), V;
631
631
  }
632
- process.env.NODE_ENV === "production" ? de.exports = Pr() : de.exports = Tr();
632
+ process.env.NODE_ENV === "production" ? de.exports = wr() : de.exports = xr();
633
633
  var j = de.exports;
634
- class wr {
634
+ class Tr {
635
635
  constructor() {
636
636
  $e(this, "components");
637
637
  this.components = /* @__PURE__ */ new Map();
@@ -670,22 +670,21 @@ class wr {
670
670
  this.components.clear();
671
671
  }
672
672
  }
673
- const H = new wr(), Me = hr(H), Ar = ({
674
- children: v,
673
+ const H = new Tr(), Ve = br(H), Ar = ({
674
+ children: p,
675
675
  registry: o = H,
676
676
  components: l = []
677
677
  }) => {
678
- const b = br(!1);
679
- return !b.current && l.length > 0 && (o.registerBatch(l), b.current = !0), /* @__PURE__ */ j.jsx(Me.Provider, { value: o, children: v });
680
- }, Ne = () => yr(Me), Ir = (v) => {
681
- const l = Ne().getComponent(v);
682
- return l || (console.warn(`组件 "${v}" 未注册`), null);
678
+ const b = Rr(!1);
679
+ return !b.current && l.length > 0 && (o.registerBatch(l), b.current = !0), !b.current && l.length === 0 && Le(), /* @__PURE__ */ j.jsx(Ve.Provider, { value: o, children: p });
680
+ }, Ne = () => yr(Ve), Ir = (p) => {
681
+ const l = Ne().getComponent(p);
682
+ return l || (console.warn(`组件 "${p}" 未注册`), null);
683
683
  }, Or = [
684
684
  {
685
685
  name: "input",
686
686
  label: "输入框",
687
687
  component: "input",
688
- defaultValue: "",
689
688
  defaultProps: {
690
689
  placeholder: "请输入",
691
690
  allowClear: !0,
@@ -698,7 +697,17 @@ const H = new wr(), Me = hr(H), Ar = ({
698
697
  name: "select",
699
698
  label: "select单选",
700
699
  component: "select",
701
- defaultValue: "",
700
+ defaultProps: {
701
+ placeholder: "请选择",
702
+ style: {
703
+ width: "320px"
704
+ }
705
+ }
706
+ },
707
+ {
708
+ name: "multiSelect",
709
+ label: "select多选",
710
+ component: "multiSelect",
702
711
  defaultProps: {
703
712
  placeholder: "请输入",
704
713
  allowClear: !0,
@@ -706,29 +715,113 @@ const H = new wr(), Me = hr(H), Ar = ({
706
715
  width: "320px"
707
716
  }
708
717
  }
709
- }
710
- ], xr = () => {
718
+ },
719
+ {
720
+ name: "radio",
721
+ label: "radio单选",
722
+ component: "radio"
723
+ },
724
+ {
725
+ name: "checkbox",
726
+ label: "checkbox复选",
727
+ component: "checkbox"
728
+ },
729
+ {
730
+ name: "datePicker",
731
+ label: "日期选择",
732
+ component: "datePicker",
733
+ defaultProps: {
734
+ style: {
735
+ width: "320px"
736
+ }
737
+ }
738
+ },
739
+ {
740
+ name: "dateRangePicker",
741
+ label: "日期范围",
742
+ component: "dateRangePicker",
743
+ defaultProps: {
744
+ style: {
745
+ width: "320px"
746
+ }
747
+ }
748
+ },
749
+ {
750
+ name: "timePicker",
751
+ label: "时间选择",
752
+ component: "timePicker",
753
+ defaultProps: {
754
+ style: {
755
+ width: "320px"
756
+ }
757
+ }
758
+ },
759
+ {
760
+ name: "timeRangePicker",
761
+ label: "时间范围",
762
+ component: "timeRangePicker",
763
+ defaultProps: {
764
+ style: {
765
+ width: "320px"
766
+ }
767
+ }
768
+ },
769
+ {
770
+ name: "textArea",
771
+ label: "多行输入",
772
+ component: "textArea",
773
+ defaultProps: {
774
+ placeholder: "请输入",
775
+ allowClear: !0,
776
+ style: {
777
+ width: "320px"
778
+ }
779
+ }
780
+ },
781
+ {
782
+ name: "inputNumber",
783
+ label: "数字输入",
784
+ component: "inputNumber",
785
+ defaultProps: {
786
+ style: {
787
+ width: "320px"
788
+ }
789
+ }
790
+ },
791
+ {
792
+ name: "slider",
793
+ label: "滑动条",
794
+ component: "slider"
795
+ },
796
+ {
797
+ name: "switch",
798
+ label: "开关",
799
+ component: "switch"
800
+ },
801
+ { name: "rate", label: "评分器", component: "rate" },
802
+ { name: "colorPicker", label: "颜色选择", component: "colorPicker" }
803
+ ], Le = () => {
711
804
  H.getAllComponentNames().length === 0 && (H.registerBatch(Or), console.log("[XForm] 默认组件已初始化"));
712
- }, $r = Er(
805
+ }, $r = _r(
713
806
  ({
714
- config: v = [],
807
+ config: p = [],
715
808
  model: o,
716
809
  onSubmit: l,
717
810
  onError: b,
718
811
  onReset: k,
719
812
  layout: F = { inlineError: !0 },
720
- showButtons: x = !0,
813
+ showButtons: O = !0,
721
814
  submitText: _ = "提交",
722
- resetText: p = "重置",
723
- submitButtonProps: T = {},
724
- resetButtonProps: g = {},
815
+ resetText: v = "重置",
816
+ submitButtonProps: w = {},
817
+ resetButtonProps: h = {},
725
818
  wrapperClassName: R,
726
- wrapperStyle: C,
819
+ wrapperStyle: P,
727
820
  ...D
728
821
  }) => {
729
822
  const N = (u) => {
730
823
  console.log("[XForm Renderer] 表单提交:", u), l == null || l(u);
731
- }, L = Ne(), B = o == null ? void 0 : o.values, w = Rr(() => v.filter((u) => u.visible === !1 ? !1 : typeof u.visible == "function" ? u.visible(B || {}) : !0).map((u, Z) => {
824
+ }, L = Ne(), B = o == null ? void 0 : o.values, x = Er(() => p.filter((u) => u.visible === !1 ? !1 : typeof u.visible == "function" ? u.visible(B || {}) : !0).map((u, Z) => {
732
825
  const {
733
826
  name: $,
734
827
  component: U,
@@ -745,7 +838,7 @@ const H = new wr(), Me = hr(H), Ar = ({
745
838
  ...Q
746
839
  };
747
840
  ee && (E.disabled = !0);
748
- const P = {
841
+ const C = {
749
842
  ...te,
750
843
  name: $,
751
844
  component: J,
@@ -753,9 +846,9 @@ const H = new wr(), Me = hr(H), Ar = ({
753
846
  style: re,
754
847
  className: q
755
848
  };
756
- return u.required && u.requiredMessage && (P.required = u.required, P.requiredMessage = u.requiredMessage), /* @__PURE__ */ j.jsx(_r, { ...P }, `${$}-${Z}`);
757
- }).filter(Boolean), [v, B, L]);
758
- return /* @__PURE__ */ j.jsx("div", { className: R, style: C, children: /* @__PURE__ */ j.jsxs(
849
+ return u.required && u.requiredMessage && (C.required = u.required, C.requiredMessage = u.requiredMessage), /* @__PURE__ */ j.jsx(Pr, { ...C }, `${$}-${Z}`);
850
+ }).filter(Boolean), [p, B, L]);
851
+ return /* @__PURE__ */ j.jsx("div", { className: R, style: P, children: /* @__PURE__ */ j.jsxs(
759
852
  fe,
760
853
  {
761
854
  model: o,
@@ -765,16 +858,16 @@ const H = new wr(), Me = hr(H), Ar = ({
765
858
  onReset: k,
766
859
  ...D,
767
860
  children: [
768
- w,
769
- x && /* @__PURE__ */ j.jsx(fe.ItemView, { children: /* @__PURE__ */ j.jsx("div", { style: { marginTop: 24 }, children: /* @__PURE__ */ j.jsx(fe.Submit, { ButtonComponent: Cr, type: "primary", ...T, children: _ }) }) })
861
+ x,
862
+ O && /* @__PURE__ */ j.jsx(fe.ItemView, { children: /* @__PURE__ */ j.jsx("div", { style: { marginTop: 24 }, children: /* @__PURE__ */ j.jsx(fe.Submit, { ButtonComponent: Cr, type: "primary", ...w, children: _ }) }) })
770
863
  ]
771
864
  }
772
865
  ) });
773
866
  }
774
- ), Wr = xr;
867
+ ), Wr = Le;
775
868
  export {
776
869
  Ar as ComponentProvider,
777
- wr as ComponentRegistry,
870
+ Tr as ComponentRegistry,
778
871
  $r as FormRenderer,
779
872
  H as globalRegistry,
780
873
  Wr as registerDefaultComponents,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-mario-core",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "基于react-antd-xform的低代码组件注册器",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",