zs_library 0.3.11 → 0.3.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.umd.js +16 -16
  2. package/package.json +110 -109
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(Y,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("react"),require("@emotion/css"),require("react-slick"),require("react-sortablejs"),require("framer-motion"),require("ahooks"),require("uuid"),require("rc-tooltip"),require("@remixicon/react"),require("rc-dialog"),require("react-json-view"),require("@mdxeditor/editor")):typeof define=="function"&&define.amd?define(["exports","react","@emotion/css","react-slick","react-sortablejs","framer-motion","ahooks","uuid","rc-tooltip","@remixicon/react","rc-dialog","react-json-view","@mdxeditor/editor"],d):(Y=typeof globalThis<"u"?globalThis:Y||self,d(Y.zs_library={},Y.React,Y.css,Y.Slider,Y.reactSortablejs,Y.framerMotion,Y.ahooks,Y.uuid,Y.RcTooltip,Y.react,Y.Dialog,Y.ReactJson,Y.editor))})(this,function(Y,d,a,dt,Ee,B,Ye,We,ft,ye,ze,mt,g){"use strict";var qt=Object.defineProperty;var er=(Y,d,a)=>d in Y?qt(Y,d,{enumerable:!0,configurable:!0,writable:!0,value:a}):Y[d]=a;var Fe=(Y,d,a)=>er(Y,typeof d!="symbol"?d+"":d,a);require("./style.css");var _e={exports:{}},xe={};/**
1
+ (function(Y,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("react"),require("@emotion/css"),require("react-slick"),require("react-sortablejs"),require("framer-motion"),require("ahooks"),require("uuid"),require("rc-tooltip"),require("@remixicon/react"),require("rc-dialog"),require("react-json-view"),require("@mdxeditor/editor")):typeof define=="function"&&define.amd?define(["exports","react","@emotion/css","react-slick","react-sortablejs","framer-motion","ahooks","uuid","rc-tooltip","@remixicon/react","rc-dialog","react-json-view","@mdxeditor/editor"],d):(Y=typeof globalThis<"u"?globalThis:Y||self,d(Y.zs_library={},Y.React,Y.css,Y.Slider,Y.reactSortablejs,Y.framerMotion,Y.ahooks,Y.uuid,Y.RcTooltip,Y.react,Y.Dialog,Y.ReactJson,Y.MDXEditor))})(this,function(Y,d,a,dt,Ee,B,Ye,We,ft,ye,ze,mt,g){"use strict";var qt=Object.defineProperty;var er=(Y,d,a)=>d in Y?qt(Y,d,{enumerable:!0,configurable:!0,writable:!0,value:a}):Y[d]=a;var Fe=(Y,d,a)=>er(Y,typeof d!="symbol"?d+"":d,a);require("./style.css");var _e={exports:{}},xe={};/**
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 Ue;function gt(){if(Ue)return xe;Ue=1;var h=d,t=Symbol.for("react.element"),c=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,p=h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function w(y,s,M){var v,L={},D=null,X=null;M!==void 0&&(D=""+M),s.key!==void 0&&(D=""+s.key),s.ref!==void 0&&(X=s.ref);for(v in s)i.call(s,v)&&!l.hasOwnProperty(v)&&(L[v]=s[v]);if(y&&y.defaultProps)for(v in s=y.defaultProps,s)L[v]===void 0&&(L[v]=s[v]);return{$$typeof:t,type:y,key:D,ref:X,props:L,_owner:p.current}}return xe.Fragment=c,xe.jsx=w,xe.jsxs=w,xe}var be={};/**
9
+ */var Ue;function gt(){if(Ue)return xe;Ue=1;var h=d,t=Symbol.for("react.element"),c=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,p=h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function w(y,s,M){var v,L={},D=null,G=null;M!==void 0&&(D=""+M),s.key!==void 0&&(D=""+s.key),s.ref!==void 0&&(G=s.ref);for(v in s)i.call(s,v)&&!l.hasOwnProperty(v)&&(L[v]=s[v]);if(y&&y.defaultProps)for(v in s=y.defaultProps,s)L[v]===void 0&&(L[v]=s[v]);return{$$typeof:t,type:y,key:D,ref:G,props:L,_owner:p.current}}return xe.Fragment=c,xe.jsx=w,xe.jsxs=w,xe}var be={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,20 +14,20 @@
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 Ve;function pt(){return Ve||(Ve=1,process.env.NODE_ENV!=="production"&&function(){var h=d,t=Symbol.for("react.element"),c=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),y=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),X=Symbol.for("react.offscreen"),V=Symbol.iterator,f="@@iterator";function x(e){if(e===null||typeof e!="object")return null;var r=V&&e[V]||e[f];return typeof r=="function"?r:null}var E=h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function m(e){{for(var r=arguments.length,o=new Array(r>1?r-1:0),u=1;u<r;u++)o[u-1]=arguments[u];J("error",e,o)}}function J(e,r,o){{var u=E.ReactDebugCurrentFrame,R=u.getStackAddendum();R!==""&&(r+="%s",o=o.concat([R]));var A=o.map(function(I){return String(I)});A.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,A)}}var b=!1,N=!1,_=!1,k=!1,S=!1,K;K=Symbol.for("react.module.reference");function ue(e){return!!(typeof e=="string"||typeof e=="function"||e===i||e===l||S||e===p||e===M||e===v||k||e===X||b||N||_||typeof e=="object"&&e!==null&&(e.$$typeof===D||e.$$typeof===L||e.$$typeof===w||e.$$typeof===y||e.$$typeof===s||e.$$typeof===K||e.getModuleId!==void 0))}function Z(e,r,o){var u=e.displayName;if(u)return u;var R=r.displayName||r.name||"";return R!==""?o+"("+R+")":o}function pe(e){return e.displayName||"Context"}function H(e){if(e==null)return null;if(typeof e.tag=="number"&&m("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 i:return"Fragment";case c:return"Portal";case l:return"Profiler";case p:return"StrictMode";case M:return"Suspense";case v:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case y:var r=e;return pe(r)+".Consumer";case w:var o=e;return pe(o._context)+".Provider";case s:return Z(e,e.render,"ForwardRef");case L:var u=e.displayName||null;return u!==null?u:H(e.type)||"Memo";case D:{var R=e,A=R._payload,I=R._init;try{return H(I(A))}catch{return null}}}return null}var ne=Object.assign,le=0,W,ae,ce,Ce,we,Se,je;function T(){}T.__reactDisabledLog=!0;function q(){{if(le===0){W=console.log,ae=console.info,ce=console.warn,Ce=console.error,we=console.group,Se=console.groupCollapsed,je=console.groupEnd;var e={configurable:!0,enumerable:!0,value:T,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}le++}}function Q(){{if(le--,le===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ne({},e,{value:W}),info:ne({},e,{value:ae}),warn:ne({},e,{value:ce}),error:ne({},e,{value:Ce}),group:ne({},e,{value:we}),groupCollapsed:ne({},e,{value:Se}),groupEnd:ne({},e,{value:je})})}le<0&&m("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var O=E.ReactCurrentDispatcher,z;function F(e,r,o){{if(z===void 0)try{throw Error()}catch(R){var u=R.stack.trim().match(/\n( *(at )?)/);z=u&&u[1]||""}return`
17
+ */var Ve;function pt(){return Ve||(Ve=1,process.env.NODE_ENV!=="production"&&function(){var h=d,t=Symbol.for("react.element"),c=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),y=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),G=Symbol.for("react.offscreen"),V=Symbol.iterator,f="@@iterator";function x(e){if(e===null||typeof e!="object")return null;var r=V&&e[V]||e[f];return typeof r=="function"?r:null}var E=h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function m(e){{for(var r=arguments.length,o=new Array(r>1?r-1:0),u=1;u<r;u++)o[u-1]=arguments[u];J("error",e,o)}}function J(e,r,o){{var u=E.ReactDebugCurrentFrame,R=u.getStackAddendum();R!==""&&(r+="%s",o=o.concat([R]));var A=o.map(function(I){return String(I)});A.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,A)}}var b=!1,N=!1,_=!1,k=!1,S=!1,K;K=Symbol.for("react.module.reference");function ue(e){return!!(typeof e=="string"||typeof e=="function"||e===i||e===l||S||e===p||e===M||e===v||k||e===G||b||N||_||typeof e=="object"&&e!==null&&(e.$$typeof===D||e.$$typeof===L||e.$$typeof===w||e.$$typeof===y||e.$$typeof===s||e.$$typeof===K||e.getModuleId!==void 0))}function Z(e,r,o){var u=e.displayName;if(u)return u;var R=r.displayName||r.name||"";return R!==""?o+"("+R+")":o}function pe(e){return e.displayName||"Context"}function H(e){if(e==null)return null;if(typeof e.tag=="number"&&m("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 i:return"Fragment";case c:return"Portal";case l:return"Profiler";case p:return"StrictMode";case M:return"Suspense";case v:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case y:var r=e;return pe(r)+".Consumer";case w:var o=e;return pe(o._context)+".Provider";case s:return Z(e,e.render,"ForwardRef");case L:var u=e.displayName||null;return u!==null?u:H(e.type)||"Memo";case D:{var R=e,A=R._payload,I=R._init;try{return H(I(A))}catch{return null}}}return null}var ne=Object.assign,le=0,W,ae,ce,Ce,we,Se,je;function T(){}T.__reactDisabledLog=!0;function q(){{if(le===0){W=console.log,ae=console.info,ce=console.warn,Ce=console.error,we=console.group,Se=console.groupCollapsed,je=console.groupEnd;var e={configurable:!0,enumerable:!0,value:T,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}le++}}function Q(){{if(le--,le===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ne({},e,{value:W}),info:ne({},e,{value:ae}),warn:ne({},e,{value:ce}),error:ne({},e,{value:Ce}),group:ne({},e,{value:we}),groupCollapsed:ne({},e,{value:Se}),groupEnd:ne({},e,{value:je})})}le<0&&m("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var O=E.ReactCurrentDispatcher,z;function F(e,r,o){{if(z===void 0)try{throw Error()}catch(R){var u=R.stack.trim().match(/\n( *(at )?)/);z=u&&u[1]||""}return`
18
18
  `+z+e}}var j=!1,P;{var $=typeof WeakMap=="function"?WeakMap:Map;P=new $}function oe(e,r){if(!e||j)return"";{var o=P.get(e);if(o!==void 0)return o}var u;j=!0;var R=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var A;A=O.current,O.current=null,q();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(re){u=re}Reflect.construct(e,[],I)}else{try{I.call()}catch(re){u=re}e.call(I.prototype)}}else{try{throw Error()}catch(re){u=re}e()}}catch(re){if(re&&u&&typeof re.stack=="string"){for(var C=re.stack.split(`
19
19
  `),ee=u.stack.split(`
20
- `),U=C.length-1,G=ee.length-1;U>=1&&G>=0&&C[U]!==ee[G];)G--;for(;U>=1&&G>=0;U--,G--)if(C[U]!==ee[G]){if(U!==1||G!==1)do if(U--,G--,G<0||C[U]!==ee[G]){var ie=`
21
- `+C[U].replace(" at new "," at ");return e.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",e.displayName)),typeof e=="function"&&P.set(e,ie),ie}while(U>=1&&G>=0);break}}}finally{j=!1,O.current=A,Q(),Error.prepareStackTrace=R}var ve=e?e.displayName||e.name:"",me=ve?F(ve):"";return typeof e=="function"&&P.set(e,me),me}function Ie(e,r,o){return oe(e,!1)}function Te(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function te(e,r,o){if(e==null)return"";if(typeof e=="function")return oe(e,Te(e));if(typeof e=="string")return F(e);switch(e){case M:return F("Suspense");case v:return F("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case s:return Ie(e.render);case L:return te(e.type,r,o);case D:{var u=e,R=u._payload,A=u._init;try{return te(A(R),r,o)}catch{}}}return""}var fe=Object.prototype.hasOwnProperty,Qe={},qe=E.ReactDebugCurrentFrame;function Re(e){if(e){var r=e._owner,o=te(e.type,e._source,r?r.type:null);qe.setExtraStackFrame(o)}else qe.setExtraStackFrame(null)}function Pt(e,r,o,u,R){{var A=Function.call.bind(fe);for(var I in e)if(A(e,I)){var C=void 0;try{if(typeof e[I]!="function"){var ee=Error((u||"React class")+": "+o+" 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 ee.name="Invariant Violation",ee}C=e[I](r,I,u,o,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(U){C=U}C&&!(C instanceof Error)&&(Re(R),m("%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).",u||"React class",o,I,typeof C),Re(null)),C instanceof Error&&!(C.message in Qe)&&(Qe[C.message]=!0,Re(R),m("Failed %s type: %s",o,C.message),Re(null))}}}var Mt=Array.isArray;function De(e){return Mt(e)}function Dt(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,o=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o}}function Nt(e){try{return et(e),!1}catch{return!0}}function et(e){return""+e}function tt(e){if(Nt(e))return m("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Dt(e)),et(e)}var ke=E.ReactCurrentOwner,Ot={key:!0,ref:!0,__self:!0,__source:!0},rt,nt,Ne;Ne={};function At(e){if(fe.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Bt(e){if(fe.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Lt(e,r){if(typeof e.ref=="string"&&ke.current&&r&&ke.current.stateNode!==r){var o=H(ke.current.type);Ne[o]||(m('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',H(ke.current.type),e.ref),Ne[o]=!0)}}function Ft(e,r){{var o=function(){rt||(rt=!0,m("%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))};o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}}function Yt(e,r){{var o=function(){nt||(nt=!0,m("%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))};o.isReactWarning=!0,Object.defineProperty(e,"ref",{get:o,configurable:!0})}}var Wt=function(e,r,o,u,R,A,I){var C={$$typeof:t,type:e,key:r,ref:o,props:I,_owner:A};return C._store={},Object.defineProperty(C._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(C,"_self",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.defineProperty(C,"_source",{configurable:!1,enumerable:!1,writable:!1,value:R}),Object.freeze&&(Object.freeze(C.props),Object.freeze(C)),C};function zt(e,r,o,u,R){{var A,I={},C=null,ee=null;o!==void 0&&(tt(o),C=""+o),Bt(r)&&(tt(r.key),C=""+r.key),At(r)&&(ee=r.ref,Lt(r,R));for(A in r)fe.call(r,A)&&!Ot.hasOwnProperty(A)&&(I[A]=r[A]);if(e&&e.defaultProps){var U=e.defaultProps;for(A in U)I[A]===void 0&&(I[A]=U[A])}if(C||ee){var G=typeof e=="function"?e.displayName||e.name||"Unknown":e;C&&Ft(I,G),ee&&Yt(I,G)}return Wt(e,C,ee,R,u,ke.current,I)}}var Oe=E.ReactCurrentOwner,ot=E.ReactDebugCurrentFrame;function he(e){if(e){var r=e._owner,o=te(e.type,e._source,r?r.type:null);ot.setExtraStackFrame(o)}else ot.setExtraStackFrame(null)}var Ae;Ae=!1;function Be(e){return typeof e=="object"&&e!==null&&e.$$typeof===t}function at(){{if(Oe.current){var e=H(Oe.current.type);if(e)return`
20
+ `),U=C.length-1,X=ee.length-1;U>=1&&X>=0&&C[U]!==ee[X];)X--;for(;U>=1&&X>=0;U--,X--)if(C[U]!==ee[X]){if(U!==1||X!==1)do if(U--,X--,X<0||C[U]!==ee[X]){var ie=`
21
+ `+C[U].replace(" at new "," at ");return e.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",e.displayName)),typeof e=="function"&&P.set(e,ie),ie}while(U>=1&&X>=0);break}}}finally{j=!1,O.current=A,Q(),Error.prepareStackTrace=R}var ve=e?e.displayName||e.name:"",me=ve?F(ve):"";return typeof e=="function"&&P.set(e,me),me}function Ie(e,r,o){return oe(e,!1)}function Te(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function te(e,r,o){if(e==null)return"";if(typeof e=="function")return oe(e,Te(e));if(typeof e=="string")return F(e);switch(e){case M:return F("Suspense");case v:return F("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case s:return Ie(e.render);case L:return te(e.type,r,o);case D:{var u=e,R=u._payload,A=u._init;try{return te(A(R),r,o)}catch{}}}return""}var fe=Object.prototype.hasOwnProperty,Qe={},qe=E.ReactDebugCurrentFrame;function Re(e){if(e){var r=e._owner,o=te(e.type,e._source,r?r.type:null);qe.setExtraStackFrame(o)}else qe.setExtraStackFrame(null)}function Pt(e,r,o,u,R){{var A=Function.call.bind(fe);for(var I in e)if(A(e,I)){var C=void 0;try{if(typeof e[I]!="function"){var ee=Error((u||"React class")+": "+o+" 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 ee.name="Invariant Violation",ee}C=e[I](r,I,u,o,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(U){C=U}C&&!(C instanceof Error)&&(Re(R),m("%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).",u||"React class",o,I,typeof C),Re(null)),C instanceof Error&&!(C.message in Qe)&&(Qe[C.message]=!0,Re(R),m("Failed %s type: %s",o,C.message),Re(null))}}}var Mt=Array.isArray;function De(e){return Mt(e)}function Dt(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,o=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o}}function Nt(e){try{return et(e),!1}catch{return!0}}function et(e){return""+e}function tt(e){if(Nt(e))return m("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Dt(e)),et(e)}var ke=E.ReactCurrentOwner,Ot={key:!0,ref:!0,__self:!0,__source:!0},rt,nt,Ne;Ne={};function At(e){if(fe.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Bt(e){if(fe.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Lt(e,r){if(typeof e.ref=="string"&&ke.current&&r&&ke.current.stateNode!==r){var o=H(ke.current.type);Ne[o]||(m('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',H(ke.current.type),e.ref),Ne[o]=!0)}}function Ft(e,r){{var o=function(){rt||(rt=!0,m("%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))};o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}}function Yt(e,r){{var o=function(){nt||(nt=!0,m("%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))};o.isReactWarning=!0,Object.defineProperty(e,"ref",{get:o,configurable:!0})}}var Wt=function(e,r,o,u,R,A,I){var C={$$typeof:t,type:e,key:r,ref:o,props:I,_owner:A};return C._store={},Object.defineProperty(C._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(C,"_self",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.defineProperty(C,"_source",{configurable:!1,enumerable:!1,writable:!1,value:R}),Object.freeze&&(Object.freeze(C.props),Object.freeze(C)),C};function zt(e,r,o,u,R){{var A,I={},C=null,ee=null;o!==void 0&&(tt(o),C=""+o),Bt(r)&&(tt(r.key),C=""+r.key),At(r)&&(ee=r.ref,Lt(r,R));for(A in r)fe.call(r,A)&&!Ot.hasOwnProperty(A)&&(I[A]=r[A]);if(e&&e.defaultProps){var U=e.defaultProps;for(A in U)I[A]===void 0&&(I[A]=U[A])}if(C||ee){var X=typeof e=="function"?e.displayName||e.name||"Unknown":e;C&&Ft(I,X),ee&&Yt(I,X)}return Wt(e,C,ee,R,u,ke.current,I)}}var Oe=E.ReactCurrentOwner,ot=E.ReactDebugCurrentFrame;function he(e){if(e){var r=e._owner,o=te(e.type,e._source,r?r.type:null);ot.setExtraStackFrame(o)}else ot.setExtraStackFrame(null)}var Ae;Ae=!1;function Be(e){return typeof e=="object"&&e!==null&&e.$$typeof===t}function at(){{if(Oe.current){var e=H(Oe.current.type);if(e)return`
22
22
 
23
23
  Check the render method of \``+e+"`."}return""}}function Ut(e){return""}var it={};function Vt(e){{var r=at();if(!r){var o=typeof e=="string"?e:e.displayName||e.name;o&&(r=`
24
24
 
25
- Check the top-level render call using <`+o+">.")}return r}}function st(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var o=Vt(r);if(it[o])return;it[o]=!0;var u="";e&&e._owner&&e._owner!==Oe.current&&(u=" It was passed a child from "+H(e._owner.type)+"."),he(e),m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',o,u),he(null)}}function lt(e,r){{if(typeof e!="object")return;if(De(e))for(var o=0;o<e.length;o++){var u=e[o];Be(u)&&st(u,r)}else if(Be(e))e._store&&(e._store.validated=!0);else if(e){var R=x(e);if(typeof R=="function"&&R!==e.entries)for(var A=R.call(e),I;!(I=A.next()).done;)Be(I.value)&&st(I.value,r)}}}function Gt(e){{var r=e.type;if(r==null||typeof r=="string")return;var o;if(typeof r=="function")o=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===s||r.$$typeof===L))o=r.propTypes;else return;if(o){var u=H(r);Pt(o,e.props,"prop",u,e)}else if(r.PropTypes!==void 0&&!Ae){Ae=!0;var R=H(r);m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",R||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xt(e){{for(var r=Object.keys(e.props),o=0;o<r.length;o++){var u=r[o];if(u!=="children"&&u!=="key"){he(e),m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",u),he(null);break}}e.ref!==null&&(he(e),m("Invalid attribute `ref` supplied to `React.Fragment`."),he(null))}}var ct={};function ut(e,r,o,u,R,A){{var I=ue(e);if(!I){var C="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(C+=" 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 ee=Ut();ee?C+=ee:C+=at();var U;e===null?U="null":De(e)?U="array":e!==void 0&&e.$$typeof===t?(U="<"+(H(e.type)||"Unknown")+" />",C=" Did you accidentally export a JSX literal instead of a component?"):U=typeof e,m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",U,C)}var G=zt(e,r,o,R,A);if(G==null)return G;if(I){var ie=r.children;if(ie!==void 0)if(u)if(De(ie)){for(var ve=0;ve<ie.length;ve++)lt(ie[ve],e);Object.freeze&&Object.freeze(ie)}else m("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 lt(ie,e)}if(fe.call(r,"key")){var me=H(e),re=Object.keys(r).filter(function(Qt){return Qt!=="key"}),Le=re.length>0?"{key: someKey, "+re.join(": ..., ")+": ...}":"{key: someKey}";if(!ct[me+Le]){var Zt=re.length>0?"{"+re.join(": ..., ")+": ...}":"{}";m(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+o+">.")}return r}}function st(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var o=Vt(r);if(it[o])return;it[o]=!0;var u="";e&&e._owner&&e._owner!==Oe.current&&(u=" It was passed a child from "+H(e._owner.type)+"."),he(e),m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',o,u),he(null)}}function lt(e,r){{if(typeof e!="object")return;if(De(e))for(var o=0;o<e.length;o++){var u=e[o];Be(u)&&st(u,r)}else if(Be(e))e._store&&(e._store.validated=!0);else if(e){var R=x(e);if(typeof R=="function"&&R!==e.entries)for(var A=R.call(e),I;!(I=A.next()).done;)Be(I.value)&&st(I.value,r)}}}function Xt(e){{var r=e.type;if(r==null||typeof r=="string")return;var o;if(typeof r=="function")o=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===s||r.$$typeof===L))o=r.propTypes;else return;if(o){var u=H(r);Pt(o,e.props,"prop",u,e)}else if(r.PropTypes!==void 0&&!Ae){Ae=!0;var R=H(r);m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",R||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Gt(e){{for(var r=Object.keys(e.props),o=0;o<r.length;o++){var u=r[o];if(u!=="children"&&u!=="key"){he(e),m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",u),he(null);break}}e.ref!==null&&(he(e),m("Invalid attribute `ref` supplied to `React.Fragment`."),he(null))}}var ct={};function ut(e,r,o,u,R,A){{var I=ue(e);if(!I){var C="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(C+=" 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 ee=Ut();ee?C+=ee:C+=at();var U;e===null?U="null":De(e)?U="array":e!==void 0&&e.$$typeof===t?(U="<"+(H(e.type)||"Unknown")+" />",C=" Did you accidentally export a JSX literal instead of a component?"):U=typeof e,m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",U,C)}var X=zt(e,r,o,R,A);if(X==null)return X;if(I){var ie=r.children;if(ie!==void 0)if(u)if(De(ie)){for(var ve=0;ve<ie.length;ve++)lt(ie[ve],e);Object.freeze&&Object.freeze(ie)}else m("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 lt(ie,e)}if(fe.call(r,"key")){var me=H(e),re=Object.keys(r).filter(function(Qt){return Qt!=="key"}),Le=re.length>0?"{key: someKey, "+re.join(": ..., ")+": ...}":"{key: someKey}";if(!ct[me+Le]){var Zt=re.length>0?"{"+re.join(": ..., ")+": ...}":"{}";m(`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} />`,Le,me,Zt,me),ct[me+Le]=!0}}return e===i?Xt(G):Gt(G),G}}function $t(e,r,o){return ut(e,r,o,!0)}function Jt(e,r,o){return ut(e,r,o,!1)}var Kt=Jt,Ht=$t;be.Fragment=i,be.jsx=Kt,be.jsxs=Ht}()),be}process.env.NODE_ENV==="production"?_e.exports=gt():_e.exports=pt();var n=_e.exports;const Ge={token:{itemNameColor:"#1a1a1a",itemIconBackgroundColor:"white",itemIconShadowColor:"rgba(0, 0, 0, 0.1)",groupItemIconBackgroundColor:"rgba(255, 255, 255, 0.1)",groupItemIconShadowColor:"rgba(0, 0, 0, 0.1)",groupItemModalBackgroundColor:"rgba(255, 255, 255, 0.8)",contextMenuTextColor:"black",contextMenuActiveColor:"#f3f4f6",contextMenuBackgroundColor:"white",contextMenuShadowColor:"rgba(0, 0, 0, 0.1)"}},Xe={token:{itemNameColor:"white",itemIconBackgroundColor:"#1f2937",itemIconShadowColor:"rgba(0, 0, 0, 0.1)",groupItemIconBackgroundColor:"rgba(0, 0, 0, 0.1)",groupItemIconShadowColor:"rgba(0, 0, 0, 0.1)",groupItemModalBackgroundColor:"rgba(0, 0, 0, 0.1)",contextMenuTextColor:"white",contextMenuActiveColor:"#1a1a1a",contextMenuBackgroundColor:"#1a1a1a",contextMenuShadowColor:"rgba(255, 255, 255, 0.1)"}},$e=d.createContext({}),ht=h=>{const{children:t,theme:c,...i}=h,p=d.useMemo(()=>c==="light"?Ge:c==="dark"?Xe:c,[c]);return n.jsx($e.Provider,{value:{theme:p,...i},children:t})},de=()=>d.useContext($e),Je={maxRow:2,maxCol:2},vt={...Je},Ke={app:Je,group:vt};class se{}Fe(se,"uniqueArray",t=>t.reduce((c,i)=>c.find(l=>l.id===i.id)?c:c.concat([i]),[])),Fe(se,"getTheme",t=>{const c=Ge.token,i=Xe.token,p={...c,...t==null?void 0:t.token},l={...i,...t==null?void 0:t.token};return{light:p,dark:l}});const He=d.createContext({list:[],setList:()=>{},contextMenu:null,setContextMenu:()=>{},listStatus:null,setListStatus:()=>{},contextMenuFuns:()=>{},hideContextMenu:()=>{},showInfoItemData:null,setShowInfoItemData:()=>{},openGroupItemData:null,setOpenGroupItemData:()=>{},longPressTriggered:!1,updateItem:()=>{},updateItemConfig:()=>{},removeItem:()=>{},addItem:()=>{},moveItemId:null,setMoveItemId:()=>{},moveTargetId:null,setMoveTargetId:()=>{}}),xt=h=>{const{children:t,list:c=[],onChange:i,storageKey:p="ZS_LIBRARY_DESKTOP_SORTABLE_CONFIG",enableCaching:l=!0}=h,[w,y]=d.useState(),[s,M]=d.useState(),[v,L]=d.useState(null),D=d.useRef(v),[X,V]=d.useState(null),[f,x]=d.useState([]),[E,m]=d.useState(null),[J,b]=d.useState(null),[N,_]=d.useState(!1),[k,S]=d.useState(null),[K,ue]=d.useState(null),[Z,pe]=d.useState(!1),[H,ne]=Ye.useLocalStorageState(p,{defaultValue:[],listenStorageChange:!0}),le=()=>{V(null),clearTimeout(w),y(void 0),D.current=null},W=(T,q)=>{V({...T,pageX:T.pageX,pageY:T.pageY,data:q}),clearTimeout(w)},ae=(T,q=!0)=>{const{config:Q={}}=T;return Q.allowContextMenu===!1?{}:{onMouseDown:O=>{y(setTimeout(()=>{q&&D.current===null&&W(O,T)},800)),_(!1),M(setTimeout(()=>{_(!0)},800))},onMouseUp:()=>{clearTimeout(s),M(void 0),clearTimeout(w),y(void 0)},onContextMenu:O=>{q&&(O.preventDefault(),W(O,T))}}},ce=(T,q)=>{const Q=[...q||[]];if(Q.length>0)x(O=>{const z=[...O],F=j=>{var Ie,Te;const P=Q.shift(),$=j.find(te=>te.id===P),oe=j.findIndex(te=>te.id===P);if(Q.length&&$){if(((Ie=$.children)==null?void 0:Ie.filter(te=>!T.some(fe=>fe.id===te.id)).length)===1&&T.length===1){const te={...T[0]};return j.splice(oe,1,te),i==null||i(j),j}return $.children=F($.children||[]),j.splice(oe,1,$),i==null||i(j),j}if($){if(!((Te=$.children)!=null&&Te.length)&&T.length){const te={...$};return $.data={name:"文件夹"},$.type="group",$.children=[te,...T],$.id=We.v4(),j.splice(oe,1,$),i==null||i(j),j}return $.children=se.uniqueArray(T),j.splice(oe,1,$),i==null||i(j),j}return se.uniqueArray(T)};return se.uniqueArray(F(z))});else{const O=se.uniqueArray(T);i==null||i(O),x(O)}},Ce=(T,q)=>{x(Q=>{const O=[...Q],z=F=>{var j;for(let P=0;P<F.length;P++)if(F[P].id===T){F[P].config=q;break}else((j=F[P].children)==null?void 0:j.length)!==void 0&&z(F[P].children)};return z(O),i==null||i(O),O})},we=(T,q)=>{x(Q=>{const O=[...Q],z=F=>{var j;for(let P=0;P<F.length;P++)if(F[P].id===T){F[P].data=q;break}else((j=F[P].children)==null?void 0:j.length)!==void 0&&z(F[P].children)};return z(O),i==null||i(O),O})},Se=T=>{x(q=>{const Q=[...q],O=z=>{var F;for(let j=0;j<z.length;j++)if(z[j].id===T){z.splice(j,1);break}else((F=z[j].children)==null?void 0:F.length)!==void 0&&O(z[j].children)};return O(Q),i==null||i(Q),Q})},je=(T,q)=>{const Q=[...f],O=(z,F)=>{const j=F.shift(),P=z.find(oe=>oe.id===j),$=z.findIndex(oe=>oe.id===j);if(P){if(F.length)P.children=O(P.children||[],F);else{const oe=(T==null?void 0:T.type)??"app";P.children=[...P.children??[],{...T,id:We.v4(),config:(T==null?void 0:T.config)??Ke[oe]}]}return z.splice($,1,P),z}else return z};x(O(Q,q))};return d.useEffect(()=>{(c==null?void 0:c.length)>0&&f.length===0&&ce(c)},[c]),d.useEffect(()=>{D.current=v,v!==null&&le()},[v]),d.useEffect(()=>{l&&H!=null&&H.length&&!Z&&(ce(H),pe(!0))},[H,Z,l]),Ye.useDebounceEffect(()=>{l&&ne(f)},[f,l],{wait:1e3}),n.jsx(He.Provider,{value:{list:f,setList:ce,contextMenu:X,setContextMenu:V,listStatus:v,setListStatus:L,contextMenuFuns:ae,hideContextMenu:le,showInfoItemData:E,setShowInfoItemData:m,openGroupItemData:J,setOpenGroupItemData:b,longPressTriggered:N,updateItemConfig:Ce,updateItem:we,removeItem:Se,addItem:je,moveItemId:k,setMoveItemId:S,moveTargetId:K,setMoveTargetId:ue},children:t})},ge=()=>d.useContext(He),bt={menuShow:{opacity:1,y:0,transition:{type:"spring",stiffness:300,damping:24}},menuHide:{opacity:0,y:20,transition:{duration:.2}}},Pe=h=>{const{icon:t,title:c,onClick:i}=h,{theme:p}=de(),{light:l,dark:w}=se.getTheme(p);return n.jsx(B.motion.div,{className:a.css`
30
+ <%s key={someKey} {...props} />`,Le,me,Zt,me),ct[me+Le]=!0}}return e===i?Gt(X):Xt(X),X}}function $t(e,r,o){return ut(e,r,o,!0)}function Jt(e,r,o){return ut(e,r,o,!1)}var Kt=Jt,Ht=$t;be.Fragment=i,be.jsx=Kt,be.jsxs=Ht}()),be}process.env.NODE_ENV==="production"?_e.exports=gt():_e.exports=pt();var n=_e.exports;const Xe={token:{itemNameColor:"#1a1a1a",itemIconBackgroundColor:"white",itemIconShadowColor:"rgba(0, 0, 0, 0.1)",groupItemIconBackgroundColor:"rgba(255, 255, 255, 0.1)",groupItemIconShadowColor:"rgba(0, 0, 0, 0.1)",groupItemModalBackgroundColor:"rgba(255, 255, 255, 0.8)",contextMenuTextColor:"black",contextMenuActiveColor:"#f3f4f6",contextMenuBackgroundColor:"white",contextMenuShadowColor:"rgba(0, 0, 0, 0.1)"}},Ge={token:{itemNameColor:"white",itemIconBackgroundColor:"#1f2937",itemIconShadowColor:"rgba(0, 0, 0, 0.1)",groupItemIconBackgroundColor:"rgba(0, 0, 0, 0.1)",groupItemIconShadowColor:"rgba(0, 0, 0, 0.1)",groupItemModalBackgroundColor:"rgba(0, 0, 0, 0.1)",contextMenuTextColor:"white",contextMenuActiveColor:"#1a1a1a",contextMenuBackgroundColor:"#1a1a1a",contextMenuShadowColor:"rgba(255, 255, 255, 0.1)"}},$e=d.createContext({}),ht=h=>{const{children:t,theme:c,...i}=h,p=d.useMemo(()=>c==="light"?Xe:c==="dark"?Ge:c,[c]);return n.jsx($e.Provider,{value:{theme:p,...i},children:t})},de=()=>d.useContext($e),Je={maxRow:2,maxCol:2},vt={...Je},Ke={app:Je,group:vt};class se{}Fe(se,"uniqueArray",t=>t.reduce((c,i)=>c.find(l=>l.id===i.id)?c:c.concat([i]),[])),Fe(se,"getTheme",t=>{const c=Xe.token,i=Ge.token,p={...c,...t==null?void 0:t.token},l={...i,...t==null?void 0:t.token};return{light:p,dark:l}});const He=d.createContext({list:[],setList:()=>{},contextMenu:null,setContextMenu:()=>{},listStatus:null,setListStatus:()=>{},contextMenuFuns:()=>{},hideContextMenu:()=>{},showInfoItemData:null,setShowInfoItemData:()=>{},openGroupItemData:null,setOpenGroupItemData:()=>{},longPressTriggered:!1,updateItem:()=>{},updateItemConfig:()=>{},removeItem:()=>{},addItem:()=>{},moveItemId:null,setMoveItemId:()=>{},moveTargetId:null,setMoveTargetId:()=>{}}),xt=h=>{const{children:t,list:c=[],onChange:i,storageKey:p="ZS_LIBRARY_DESKTOP_SORTABLE_CONFIG",enableCaching:l=!0}=h,[w,y]=d.useState(),[s,M]=d.useState(),[v,L]=d.useState(null),D=d.useRef(v),[G,V]=d.useState(null),[f,x]=d.useState([]),[E,m]=d.useState(null),[J,b]=d.useState(null),[N,_]=d.useState(!1),[k,S]=d.useState(null),[K,ue]=d.useState(null),[Z,pe]=d.useState(!1),[H,ne]=Ye.useLocalStorageState(p,{defaultValue:[],listenStorageChange:!0}),le=()=>{V(null),clearTimeout(w),y(void 0),D.current=null},W=(T,q)=>{V({...T,pageX:T.pageX,pageY:T.pageY,data:q}),clearTimeout(w)},ae=(T,q=!0)=>{const{config:Q={}}=T;return Q.allowContextMenu===!1?{}:{onMouseDown:O=>{y(setTimeout(()=>{q&&D.current===null&&W(O,T)},800)),_(!1),M(setTimeout(()=>{_(!0)},800))},onMouseUp:()=>{clearTimeout(s),M(void 0),clearTimeout(w),y(void 0)},onContextMenu:O=>{q&&(O.preventDefault(),W(O,T))}}},ce=(T,q)=>{const Q=[...q||[]];if(Q.length>0)x(O=>{const z=[...O],F=j=>{var Ie,Te;const P=Q.shift(),$=j.find(te=>te.id===P),oe=j.findIndex(te=>te.id===P);if(Q.length&&$){if(((Ie=$.children)==null?void 0:Ie.filter(te=>!T.some(fe=>fe.id===te.id)).length)===1&&T.length===1){const te={...T[0]};return j.splice(oe,1,te),i==null||i(j),j}return $.children=F($.children||[]),j.splice(oe,1,$),i==null||i(j),j}if($){if(!((Te=$.children)!=null&&Te.length)&&T.length){const te={...$};return $.data={name:"文件夹"},$.type="group",$.children=[te,...T],$.id=We.v4(),j.splice(oe,1,$),i==null||i(j),j}return $.children=se.uniqueArray(T),j.splice(oe,1,$),i==null||i(j),j}return se.uniqueArray(T)};return se.uniqueArray(F(z))});else{const O=se.uniqueArray(T);i==null||i(O),x(O)}},Ce=(T,q)=>{x(Q=>{const O=[...Q],z=F=>{var j;for(let P=0;P<F.length;P++)if(F[P].id===T){F[P].config=q;break}else((j=F[P].children)==null?void 0:j.length)!==void 0&&z(F[P].children)};return z(O),i==null||i(O),O})},we=(T,q)=>{x(Q=>{const O=[...Q],z=F=>{var j;for(let P=0;P<F.length;P++)if(F[P].id===T){F[P].data=q;break}else((j=F[P].children)==null?void 0:j.length)!==void 0&&z(F[P].children)};return z(O),i==null||i(O),O})},Se=T=>{x(q=>{const Q=[...q],O=z=>{var F;for(let j=0;j<z.length;j++)if(z[j].id===T){z.splice(j,1);break}else((F=z[j].children)==null?void 0:F.length)!==void 0&&O(z[j].children)};return O(Q),i==null||i(Q),Q})},je=(T,q)=>{const Q=[...f],O=(z,F)=>{const j=F.shift(),P=z.find(oe=>oe.id===j),$=z.findIndex(oe=>oe.id===j);if(P){if(F.length)P.children=O(P.children||[],F);else{const oe=(T==null?void 0:T.type)??"app";P.children=[...P.children??[],{...T,id:We.v4(),config:(T==null?void 0:T.config)??Ke[oe]}]}return z.splice($,1,P),z}else return z};x(O(Q,q))};return d.useEffect(()=>{(c==null?void 0:c.length)>0&&f.length===0&&ce(c)},[c]),d.useEffect(()=>{D.current=v,v!==null&&le()},[v]),d.useEffect(()=>{l&&H!=null&&H.length&&!Z&&(ce(H),pe(!0))},[H,Z,l]),Ye.useDebounceEffect(()=>{l&&ne(f)},[f,l],{wait:1e3}),n.jsx(He.Provider,{value:{list:f,setList:ce,contextMenu:G,setContextMenu:V,listStatus:v,setListStatus:L,contextMenuFuns:ae,hideContextMenu:le,showInfoItemData:E,setShowInfoItemData:m,openGroupItemData:J,setOpenGroupItemData:b,longPressTriggered:N,updateItemConfig:Ce,updateItem:we,removeItem:Se,addItem:je,moveItemId:k,setMoveItemId:S,moveTargetId:K,setMoveTargetId:ue},children:t})},ge=()=>d.useContext(He),bt={menuShow:{opacity:1,y:0,transition:{type:"spring",stiffness:300,damping:24}},menuHide:{opacity:0,y:20,transition:{duration:.2}}},Pe=h=>{const{icon:t,title:c,onClick:i}=h,{theme:p}=de(),{light:l,dark:w}=se.getTheme(p);return n.jsx(B.motion.div,{className:a.css`
31
31
  &:hover {
32
32
  background-color: ${l.contextMenuActiveColor};
33
33
  @media (prefers-color-scheme: dark) {
@@ -53,7 +53,7 @@ React keys must be passed directly to JSX without using spread:
53
53
  margin-bottom: 0.375rem;
54
54
  display: flex;
55
55
  justify-content: center;
56
- `),children:t}),n.jsx(B.motion.div,{children:c})]})})},kt=h=>{const{showInfoButton:t=!0,showRemoveButton:c=!0,showShareButton:i=!0,showSizeButton:p=!0,onInfoClick:l,onShareClick:w,onRemoveClick:y}=h,{contextMenu:s,setContextMenu:M,hideContextMenu:v,setShowInfoItemData:L,removeItem:D,updateItemConfig:X}=ge(),{theme:V}=de(),{light:f,dark:x}=se.getTheme(V),{data:E}=s??{},{config:m={}}=E??{},J=()=>{var _;const b=Ke[(_=s==null?void 0:s.data)==null?void 0:_.type],N=[];for(let k=1;k<=((b==null?void 0:b.maxRow)??2);k++)for(let S=1;S<=((b==null?void 0:b.maxCol)??2);S++)N.push(`${k}x${S}`);return N};return n.jsx(B.AnimatePresence,{children:s&&n.jsxs(B.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onMouseDown:b=>{b.stopPropagation(),b.preventDefault()},children:[n.jsx(B.motion.div,{className:a.cx(a.css`
56
+ `),children:t}),n.jsx(B.motion.div,{children:c})]})})},kt=h=>{const{showInfoButton:t=!0,showRemoveButton:c=!0,showShareButton:i=!0,showSizeButton:p=!0,onInfoClick:l,onShareClick:w,onRemoveClick:y}=h,{contextMenu:s,setContextMenu:M,hideContextMenu:v,setShowInfoItemData:L,removeItem:D,updateItemConfig:G}=ge(),{theme:V}=de(),{light:f,dark:x}=se.getTheme(V),{data:E}=s??{},{config:m={}}=E??{},J=()=>{var _;const b=Ke[(_=s==null?void 0:s.data)==null?void 0:_.type],N=[];for(let k=1;k<=((b==null?void 0:b.maxRow)??2);k++)for(let S=1;S<=((b==null?void 0:b.maxCol)??2);S++)N.push(`${k}x${S}`);return N};return n.jsx(B.AnimatePresence,{children:s&&n.jsxs(B.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onMouseDown:b=>{b.stopPropagation(),b.preventDefault()},children:[n.jsx(B.motion.div,{className:a.cx(a.css`
57
57
  border-radius: 0.5rem;
58
58
  overflow: hidden;
59
59
  background-color: ${f.contextMenuBackgroundColor};
@@ -66,7 +66,7 @@ React keys must be passed directly to JSX without using spread:
66
66
  background-color: white;
67
67
  padding: 0.25rem;
68
68
  margin: 0;
69
- `,children:[{label:"修改大小",key:"size",icon:n.jsx(ye.RiPencilRuler2Line,{size:14}),items:J().map(b=>({label:b,key:b,onClick:()=>{const[N,_]=b.split("x").map(Number);X(s.data.id,{row:N,col:_})}}))}].map(b=>n.jsxs(B.motion.li,{className:a.css`
69
+ `,children:[{label:"修改大小",key:"size",icon:n.jsx(ye.RiPencilRuler2Line,{size:14}),items:J().map(b=>({label:b,key:b,onClick:()=>{const[N,_]=b.split("x").map(Number);G(s.data.id,{row:N,col:_})}}))}].map(b=>n.jsxs(B.motion.li,{className:a.css`
70
70
  padding-top: 0.5rem;
71
71
  padding-bottom: 0.5rem;
72
72
  padding-left: 0.75rem;
@@ -163,7 +163,7 @@ React keys must be passed directly to JSX without using spread:
163
163
  padding: 0;
164
164
  border: none;
165
165
  }
166
- `,overlay:n.jsx(kt,{...L}),visible:(M==null?void 0:M.data.id)===t.id,onVisibleChange:D=>{D||v(null)},destroyTooltipOnHide:!0,children:n.jsx(B.motion.div,{"data-id":t.id,"data-index":i,"data-parent-ids":y==null?void 0:y.join(","),"data-children-length":s,onClick:()=>p==null?void 0:p(t),className:a.cx(l&&"drag-disabled",c),children:w??n.jsx(yt,{...h})})})},Ct=h=>{const{data:t,className:c,parentIds:i,itemIndex:p,onClick:l,noLetters:w=!1}=h,{contextMenuFuns:y,setList:s,setOpenGroupItemData:M,longPressTriggered:v,moveItemId:L,moveTargetId:D,setMoveTargetId:X,listStatus:V}=ge(),{itemIconBuilder:f,theme:x,contextMenu:E}=de(),{light:m,dark:J}=se.getTheme(x),{children:b,data:N,config:_}=t,{row:k=1,col:S=1}=_??{},K={visible:{opacity:1,scale:1},hidden:{opacity:0,scale:.95}},ue=((b==null?void 0:b.length)??0)===0,Z=ue?[t]:[...b??[]].slice(0,9),pe=d.useMemo(()=>L===t.id.toString(),[t.id,L]),H=d.useMemo(()=>D===t.id,[t.id,D]),ne=a.css`
166
+ `,overlay:n.jsx(kt,{...L}),visible:(M==null?void 0:M.data.id)===t.id,onVisibleChange:D=>{D||v(null)},destroyTooltipOnHide:!0,children:n.jsx(B.motion.div,{"data-id":t.id,"data-index":i,"data-parent-ids":y==null?void 0:y.join(","),"data-children-length":s,onClick:()=>p==null?void 0:p(t),className:a.cx(l&&"drag-disabled",c),children:w??n.jsx(yt,{...h})})})},Ct=h=>{const{data:t,className:c,parentIds:i,itemIndex:p,onClick:l,noLetters:w=!1}=h,{contextMenuFuns:y,setList:s,setOpenGroupItemData:M,longPressTriggered:v,moveItemId:L,moveTargetId:D,setMoveTargetId:G,listStatus:V}=ge(),{itemIconBuilder:f,theme:x,contextMenu:E}=de(),{light:m,dark:J}=se.getTheme(x),{children:b,data:N,config:_}=t,{row:k=1,col:S=1}=_??{},K={visible:{opacity:1,scale:1},hidden:{opacity:0,scale:.95}},ue=((b==null?void 0:b.length)??0)===0,Z=ue?[t]:[...b??[]].slice(0,9),pe=d.useMemo(()=>L===t.id.toString(),[t.id,L]),H=d.useMemo(()=>D===t.id,[t.id,D]),ne=a.css`
167
167
  overflow: hidden;
168
168
  cursor: pointer;
169
169
  background-color: ${m.itemIconBackgroundColor};
@@ -276,7 +276,7 @@ React keys must be passed directly to JSX without using spread:
276
276
  > * {
277
277
  opacity: 0;
278
278
  }
279
- `),group:{name:"nested",pull:!1,put:!0},animation:150,fallbackOnBody:!0,list:b??[],setList:W=>s(W,i),filter:()=>!0,"data-id":t.id,onChange:()=>{X(t.id)}})]})}),n.jsx(B.motion.p,{className:a.cx(a.css`
279
+ `),group:{name:"nested",pull:!1,put:!0},animation:150,fallbackOnBody:!0,list:b??[],setList:W=>s(W,i),filter:()=>!0,"data-id":t.id,onChange:()=>{G(t.id)}})]})}),n.jsx(B.motion.p,{className:a.cx(a.css`
280
280
  text-align: center;
281
281
  margin-top: 0.25rem;
282
282
  margin-bottom: 0;
@@ -298,7 +298,7 @@ React keys must be passed directly to JSX without using spread:
298
298
  transition: all 0.2s;
299
299
  }
300
300
  }
301
- `,wt=h=>{const{data:t,onClose:c,onItemClick:i}=h,{list:p,setList:l,setListStatus:w,setMoveItemId:y,setMoveTargetId:s,updateItem:M}=ge(),{theme:v}=de(),{light:L,dark:D}=se.getTheme(v),[X,V]=d.useState("文件夹"),f=[...(t==null?void 0:t.children)??[]];return d.useEffect(()=>{var x;t&&V((x=t.data)==null?void 0:x.name)},[t]),n.jsx(ze,{visible:!!t,onClose:()=>{c()},animation:"zoom",maskAnimation:"fade",mousePosition:t!=null&&t.pageX&&(t!=null&&t.pageY)?{x:t==null?void 0:t.pageX,y:t==null?void 0:t.pageY}:null,title:n.jsx("input",{className:a.css`
301
+ `,wt=h=>{const{data:t,onClose:c,onItemClick:i}=h,{list:p,setList:l,setListStatus:w,setMoveItemId:y,setMoveTargetId:s,updateItem:M}=ge(),{theme:v}=de(),{light:L,dark:D}=se.getTheme(v),[G,V]=d.useState("文件夹"),f=[...(t==null?void 0:t.children)??[]];return d.useEffect(()=>{var x;t&&V((x=t.data)==null?void 0:x.name)},[t]),n.jsx(ze,{visible:!!t,onClose:()=>{c()},animation:"zoom",maskAnimation:"fade",mousePosition:t!=null&&t.pageX&&(t!=null&&t.pageY)?{x:t==null?void 0:t.pageX,y:t==null?void 0:t.pageY}:null,title:n.jsx("input",{className:a.css`
302
302
  background-color: transparent;
303
303
  border-style: none;
304
304
  text-align: center;
@@ -311,7 +311,7 @@ React keys must be passed directly to JSX without using spread:
311
311
  &:focus {
312
312
  outline: none;
313
313
  }
314
- `,value:X,onChange:x=>{V(x.target.value)},onBlur:()=>{t&&M(t.id,{...t.data,name:X})}}),footer:null,closable:!1,className:a.cx("group-item-modal",a.css`
314
+ `,value:G,onChange:x=>{V(x.target.value)},onBlur:()=>{t&&M(t.id,{...t.data,name:G})}}),footer:null,closable:!1,className:a.cx("group-item-modal",a.css`
315
315
  .rc-dialog-content {
316
316
  background-color: transparent;
317
317
  box-shadow: none;
@@ -345,7 +345,7 @@ React keys must be passed directly to JSX without using spread:
345
345
  grid-template-columns: repeat(auto-fill, 96px);
346
346
  grid-auto-flow: dense;
347
347
  grid-auto-rows: 96px;
348
- `,group:{name:"nested",pull:!0,put:!1},animation:150,fallbackOnBody:!0,list:(t==null?void 0:t.children)??[],setList:x=>{var J,b;const E=x.map(N=>N.id),m=(b=(J=p.find(N=>N.id===(t==null?void 0:t.id)))==null?void 0:J.children)==null?void 0:b.map(N=>N.id);E.length===(m==null?void 0:m.length)&&E.every((N,_)=>N===m[_])||E.length<((m==null?void 0:m.length)??0)||l(x,[...(t==null?void 0:t.parentIds)??[],t==null?void 0:t.id])},onMove:()=>(s(null),w("onMove"),!0),onStart:x=>{const E=x.item.dataset;E!=null&&E.id&&y(E.id),w("onMove")},onEnd:()=>{y(null),s(null),w(null)},ghostClass:Ze,children:f.map((x,E)=>n.jsx(Me,{data:x,itemIndex:E,onClick:i},x.id))})})})},St=h=>{var i;const{data:t,onClose:c}=h;return n.jsx(ze,{visible:!!t,onClose:()=>{c()},animation:"zoom",maskAnimation:"fade",mousePosition:t!=null&&t.pageX&&(t!=null&&t.pageY)?{x:t==null?void 0:t.pageX,y:t==null?void 0:t.pageY}:null,footer:null,title:((i=t==null?void 0:t.data)==null?void 0:i.name)??"信息",children:t&&n.jsxs("div",{children:[n.jsx("div",{className:"mb-2",children:"开发者信息"}),n.jsx("div",{className:"p-2 rounded-md bg-[#272822]",children:n.jsx(mt,{src:t,theme:"monokai"})})]})})},jt=h=>{const{pagination:t={position:"bottom"},className:c,sliderProps:i,sliderRef:p,onItemClick:l}=h,w=d.useRef(null),y=d.useRef(null),{list:s,setList:M,setListStatus:v,showInfoItemData:L,setShowInfoItemData:D,openGroupItemData:X,setOpenGroupItemData:V,setMoveItemId:f,setMoveTargetId:x,addItem:E}=ge(),{pagingDotBuilder:m,pagingDotsBuilder:J,itemBuilder:b}=de(),N=d.useMemo(()=>t===!1?{}:{top:a.css`
348
+ `,group:{name:"nested",pull:!0,put:!1},animation:150,fallbackOnBody:!0,list:(t==null?void 0:t.children)??[],setList:x=>{var J,b;const E=x.map(N=>N.id),m=(b=(J=p.find(N=>N.id===(t==null?void 0:t.id)))==null?void 0:J.children)==null?void 0:b.map(N=>N.id);E.length===(m==null?void 0:m.length)&&E.every((N,_)=>N===m[_])||E.length<((m==null?void 0:m.length)??0)||l(x,[...(t==null?void 0:t.parentIds)??[],t==null?void 0:t.id])},onMove:()=>(s(null),w("onMove"),!0),onStart:x=>{const E=x.item.dataset;E!=null&&E.id&&y(E.id),w("onMove")},onEnd:()=>{y(null),s(null),w(null)},ghostClass:Ze,children:f.map((x,E)=>n.jsx(Me,{data:x,itemIndex:E,onClick:i},x.id))})})})},St=h=>{var i;const{data:t,onClose:c}=h;return n.jsx(ze,{visible:!!t,onClose:()=>{c()},animation:"zoom",maskAnimation:"fade",mousePosition:t!=null&&t.pageX&&(t!=null&&t.pageY)?{x:t==null?void 0:t.pageX,y:t==null?void 0:t.pageY}:null,footer:null,title:((i=t==null?void 0:t.data)==null?void 0:i.name)??"信息",children:t&&n.jsxs("div",{children:[n.jsx("div",{className:"mb-2",children:"开发者信息"}),n.jsx("div",{className:"p-2 rounded-md bg-[#272822]",children:n.jsx(mt,{src:t,theme:"monokai"})})]})})},jt=h=>{const{pagination:t={position:"bottom"},className:c,sliderProps:i,sliderRef:p,onItemClick:l}=h,w=d.useRef(null),y=d.useRef(null),{list:s,setList:M,setListStatus:v,showInfoItemData:L,setShowInfoItemData:D,openGroupItemData:G,setOpenGroupItemData:V,setMoveItemId:f,setMoveTargetId:x,addItem:E}=ge(),{pagingDotBuilder:m,pagingDotsBuilder:J,itemBuilder:b}=de(),N=d.useMemo(()=>t===!1?{}:{top:a.css`
349
349
  display: flex;
350
350
  flex-direction: column;
351
351
  .slick-list {
@@ -431,7 +431,7 @@ React keys must be passed directly to JSX without using spread:
431
431
  place-items: center;
432
432
  justify-content: center;
433
433
  align-items: center;
434
- `),animation:150,fallbackOnBody:!0,swapThreshold:.65,group:"nested",list:_.children??[],setList:k=>M(k,[_.id]),filter:".drag-disabled",onMove:k=>{v("onMove");const{dragged:S,related:K}=k,ue=S.dataset,Z=K.dataset;return x(null),!((Object.keys(Z).length===0||Z.parentIds)&&Number(ue.childrenLength)>0&&K.classList.contains("sortable-group-item"))},onStart:k=>{const S=k.item.dataset;S!=null&&S.id&&f(S.id),v("onMove")},onEnd:()=>{f(null),x(null),v(null)},ghostClass:Ze,children:(_.children??[]).map((k,S)=>{let K;if(b)return b(k);switch(k.type){case"group":case"app":K=n.jsx(Ct,{data:k,itemIndex:S,parentIds:[_.id,k.id],onClick:l},k.id);break;default:K=n.jsx(Me,{data:k,itemIndex:S,onClick:l},k.id);break}return K})})},_.id))}),n.jsx(St,{data:L,onClose:()=>{D(null)}}),n.jsx(wt,{data:X,onClose:()=>{V(null)},onItemClick:l})]})},It=h=>{const{list:t,onChange:c,storageKey:i,enableCaching:p,theme:l,noLetters:w,contextMenu:y,contextMenuBuilder:s,itemBuilder:M,itemIconBuilder:v,pagingDotBuilder:L,pagingDotsBuilder:D,...X}=h,V={list:t,onChange:c,storageKey:i,enableCaching:p},f={theme:l,noLetters:w,contextMenu:y,pagingDotsBuilder:D,pagingDotBuilder:L,itemBuilder:M,itemIconBuilder:v,contextMenuBuilder:s};return n.jsx(xt,{...V,children:n.jsx(ht,{...f,children:n.jsx(jt,{...X})})})},Tt={frontmatterEditor:{title:"编辑前置元数据",key:"键",value:"值",addEntry:"添加项目"},dialogControls:{save:"保存",cancel:"取消"},uploadImage:{uploadInstructions:"从您的设备中上传图片:",addViaUrlInstructions:"或从网址新增图片:",autoCompletePlaceholder:"选择或粘贴图片",alt:"替代文本:",title:"标题:"},imageEditor:{editImage:"编辑图片"},createLink:{url:"网址",urlPlaceholder:"选择或粘贴网址",title:"标题",saveTooltip:"设置网址",cancelTooltip:"取消更改"},linkPreview:{open:"在新窗口中打开 {{url}}",edit:"编辑链接网址",copyToClipboard:"复制到剪贴板",copied:"已复制!",remove:"移除链接"},table:{deleteTable:"删除表格",columnMenu:"列菜单",textAlignment:"文字对齐",alignLeft:"左对齐",alignCenter:"居中对齐",alignRight:"右对齐",insertColumnLeft:"在当前列左侧插入一列",insertColumnRight:"在当前列右侧插入一列",deleteColumn:"删除此列",rowMenu:"行菜单",insertRowAbove:"在当前行上方插入一行",insertRowBelow:"在当前行下方插入一行",deleteRow:"删除此行"},toolbar:{blockTypes:{paragraph:"段落",quote:"引用",heading:"标题 {{level}}"},blockTypeSelect:{selectBlockTypeTooltip:"选择块类型",placeholder:"块类型"},toggleGroup:"切换组",removeBold:"移除粗体",bold:"粗体",removeItalic:"移除斜体",italic:"斜体",underline:"移除下划线",removeUnderline:"下划线",removeInlineCode:"移除内联代码样式",inlineCode:"内联代码样式",link:"创建链接",richText:"富文本",diffMode:"差异模式",source:"源码模式",admonition:"插入注释区块",codeBlock:"插入代码块",editFrontmatter:"编辑前置元数据",insertFrontmatter:"插入前置元数据",image:"插入图片",insertSandpack:"插入 Sandpack",table:"插入表格",thematicBreak:"插入主题换行",bulletedList:"无序列表",numberedList:"有序列表",checkList:"任务列表",deleteSandpack:"删除 Sandpack",undo:"撤销 {{shortcut}}",redo:"重做 {{shortcut}}",superscript:"上标",subscript:"下标",strikethrough:"删除线",removeSubscript:"移除下标",removeSuperscript:"移除上标",removeStrikethrough:"移除删除线"},admonitions:{note:"注意",tip:"提示",danger:"危险",info:"信息",caution:"警告",changeType:"选择注释区块类型",placeholder:"注释区块类型"},codeBlock:{language:"代码块语言",selectLanguage:"选择代码块语言",inlineLanguage:"代码块语言"},codeblock:{delete:"删除代码块"},contentArea:{editableMarkdown:"可编辑的 Markdown"},image:{delete:"删除图片"}},Rt=(h,t,c)=>{const p=h.split(".").reduce((l,w)=>typeof l=="string"?l:l[w],Tt);return typeof p!="string"?t:c?p.replace(/{{(.*?)}}/g,(l,w)=>c[w]):p};function Et(h){const t=h==null?void 0:h.rootNode;return!t||t.getType()!=="directive"?!1:["note","tip","danger","info","caution"].includes(t.getMdastNode().name)}const _t=h=>{const{value:t,onChange:c,translation:i,pluginConfig:p,...l}=h,{image:w,diffSource:y={viewMode:"rich-text"},headings:s,link:M,codeBlock:v,codeMirror:L={codeBlockLanguages:{js:"JavaScript",css:"CSS",txt:"Plain Text",tsx:"TypeScript","":"Unspecified"}},directives:D={directiveDescriptors:[g.AdmonitionDirectiveDescriptor]}}=p??{},[X,V]=d.useState("");return d.useEffect(()=>{t!==void 0&&V(t)},[t]),n.jsx(g.MDXEditor,{contentEditableClassName:a.cx("markdown-body",a.css`
434
+ `),animation:150,fallbackOnBody:!0,swapThreshold:.65,group:"nested",list:_.children??[],setList:k=>M(k,[_.id]),filter:".drag-disabled",onMove:k=>{v("onMove");const{dragged:S,related:K}=k,ue=S.dataset,Z=K.dataset;return x(null),!((Object.keys(Z).length===0||Z.parentIds)&&Number(ue.childrenLength)>0&&K.classList.contains("sortable-group-item"))},onStart:k=>{const S=k.item.dataset;S!=null&&S.id&&f(S.id),v("onMove")},onEnd:()=>{f(null),x(null),v(null)},ghostClass:Ze,children:(_.children??[]).map((k,S)=>{let K;if(b)return b(k);switch(k.type){case"group":case"app":K=n.jsx(Ct,{data:k,itemIndex:S,parentIds:[_.id,k.id],onClick:l},k.id);break;default:K=n.jsx(Me,{data:k,itemIndex:S,onClick:l},k.id);break}return K})})},_.id))}),n.jsx(St,{data:L,onClose:()=>{D(null)}}),n.jsx(wt,{data:G,onClose:()=>{V(null)},onItemClick:l})]})},It=h=>{const{list:t,onChange:c,storageKey:i,enableCaching:p,theme:l,noLetters:w,contextMenu:y,contextMenuBuilder:s,itemBuilder:M,itemIconBuilder:v,pagingDotBuilder:L,pagingDotsBuilder:D,...G}=h,V={list:t,onChange:c,storageKey:i,enableCaching:p},f={theme:l,noLetters:w,contextMenu:y,pagingDotsBuilder:D,pagingDotBuilder:L,itemBuilder:M,itemIconBuilder:v,contextMenuBuilder:s};return n.jsx(xt,{...V,children:n.jsx(ht,{...f,children:n.jsx(jt,{...G})})})},Tt={frontmatterEditor:{title:"编辑前置元数据",key:"键",value:"值",addEntry:"添加项目"},dialogControls:{save:"保存",cancel:"取消"},uploadImage:{uploadInstructions:"从您的设备中上传图片:",addViaUrlInstructions:"或从网址新增图片:",autoCompletePlaceholder:"选择或粘贴图片",alt:"替代文本:",title:"标题:"},imageEditor:{editImage:"编辑图片"},createLink:{url:"网址",urlPlaceholder:"选择或粘贴网址",title:"标题",saveTooltip:"设置网址",cancelTooltip:"取消更改"},linkPreview:{open:"在新窗口中打开 {{url}}",edit:"编辑链接网址",copyToClipboard:"复制到剪贴板",copied:"已复制!",remove:"移除链接"},table:{deleteTable:"删除表格",columnMenu:"列菜单",textAlignment:"文字对齐",alignLeft:"左对齐",alignCenter:"居中对齐",alignRight:"右对齐",insertColumnLeft:"在当前列左侧插入一列",insertColumnRight:"在当前列右侧插入一列",deleteColumn:"删除此列",rowMenu:"行菜单",insertRowAbove:"在当前行上方插入一行",insertRowBelow:"在当前行下方插入一行",deleteRow:"删除此行"},toolbar:{blockTypes:{paragraph:"段落",quote:"引用",heading:"标题 {{level}}"},blockTypeSelect:{selectBlockTypeTooltip:"选择块类型",placeholder:"块类型"},toggleGroup:"切换组",removeBold:"移除粗体",bold:"粗体",removeItalic:"移除斜体",italic:"斜体",underline:"移除下划线",removeUnderline:"下划线",removeInlineCode:"移除内联代码样式",inlineCode:"内联代码样式",link:"创建链接",richText:"富文本",diffMode:"差异模式",source:"源码模式",admonition:"插入注释区块",codeBlock:"插入代码块",editFrontmatter:"编辑前置元数据",insertFrontmatter:"插入前置元数据",image:"插入图片",insertSandpack:"插入 Sandpack",table:"插入表格",thematicBreak:"插入主题换行",bulletedList:"无序列表",numberedList:"有序列表",checkList:"任务列表",deleteSandpack:"删除 Sandpack",undo:"撤销 {{shortcut}}",redo:"重做 {{shortcut}}",superscript:"上标",subscript:"下标",strikethrough:"删除线",removeSubscript:"移除下标",removeSuperscript:"移除上标",removeStrikethrough:"移除删除线"},admonitions:{note:"注意",tip:"提示",danger:"危险",info:"信息",caution:"警告",changeType:"选择注释区块类型",placeholder:"注释区块类型"},codeBlock:{language:"代码块语言",selectLanguage:"选择代码块语言",inlineLanguage:"代码块语言"},codeblock:{delete:"删除代码块"},contentArea:{editableMarkdown:"可编辑的 Markdown"},image:{delete:"删除图片"}},Rt=(h,t,c)=>{const p=h.split(".").reduce((l,w)=>typeof l=="string"?l:l[w],Tt);return typeof p!="string"?t:c?p.replace(/{{(.*?)}}/g,(l,w)=>c[w]):p};function Et(h){const t=h==null?void 0:h.rootNode;return!t||t.getType()!=="directive"?!1:["note","tip","danger","info","caution"].includes(t.getMdastNode().name)}const _t=h=>{const{value:t,onChange:c,translation:i,pluginConfig:p,...l}=h,{image:w,diffSource:y={viewMode:"rich-text"},headings:s,link:M,codeBlock:v,codeMirror:L={codeBlockLanguages:{js:"JavaScript",css:"CSS",txt:"Plain Text",tsx:"TypeScript","":"Unspecified"}},directives:D={directiveDescriptors:[g.AdmonitionDirectiveDescriptor]}}=p??{},[G,V]=d.useState("");return d.useEffect(()=>{t!==void 0&&V(t)},[t]),n.jsx(g.MDXEditor,{contentEditableClassName:a.cx("markdown-body",a.css`
435
435
  table {
436
436
  border-spacing: 0;
437
437
  border-collapse: collapse;
@@ -465,4 +465,4 @@ React keys must be passed directly to JSX without using spread:
465
465
  transition: all 0.3s;
466
466
  }
467
467
  }
468
- `),markdown:X,onChange:f=>{!t&&!c&&V(f),c&&c(f)},translation:i??Rt,plugins:[g.toolbarPlugin({toolbarContents:()=>n.jsxs(g.DiffSourceToggleWrapper,{options:["rich-text","source"],children:[n.jsx(g.UndoRedo,{}),n.jsx(g.Separator,{}),n.jsx(g.BoldItalicUnderlineToggles,{}),n.jsx(g.CodeToggle,{}),n.jsx(g.Separator,{}),n.jsx(g.StrikeThroughSupSubToggles,{}),n.jsx(g.Separator,{}),n.jsx(g.ListsToggle,{}),n.jsx(g.Separator,{}),n.jsx(g.CreateLink,{}),n.jsx(g.InsertImage,{}),n.jsx(g.Separator,{}),n.jsx(g.InsertTable,{}),n.jsx(g.InsertThematicBreak,{}),n.jsx(g.Separator,{}),n.jsx(g.InsertCodeBlock,{}),n.jsx(g.ConditionalContents,{options:[{when:f=>!Et(f),contents:()=>n.jsxs(n.Fragment,{children:[n.jsx(g.Separator,{}),n.jsx(g.InsertAdmonition,{})]})}]}),n.jsx(g.Separator,{}),n.jsx(g.InsertFrontmatter,{})]})}),g.diffSourcePlugin(y),g.listsPlugin(),g.quotePlugin(),g.headingsPlugin(s),g.linkPlugin(M),g.linkDialogPlugin(),g.imagePlugin(w),g.tablePlugin(),g.thematicBreakPlugin(),g.frontmatterPlugin(),g.codeBlockPlugin(v),g.codeMirrorPlugin(L),g.markdownShortcutPlugin(),g.directivesPlugin(D)],...l})};Y.Desktop=It,Y.MdEditor=_t,Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"})});
468
+ `),markdown:G,onChange:f=>{!t&&!c&&V(f),c&&c(f)},translation:i??Rt,plugins:[g.toolbarPlugin({toolbarContents:()=>n.jsxs(g.DiffSourceToggleWrapper,{options:["rich-text","source"],children:[n.jsx(g.UndoRedo,{}),n.jsx(g.Separator,{}),n.jsx(g.BoldItalicUnderlineToggles,{}),n.jsx(g.CodeToggle,{}),n.jsx(g.Separator,{}),n.jsx(g.StrikeThroughSupSubToggles,{}),n.jsx(g.Separator,{}),n.jsx(g.ListsToggle,{}),n.jsx(g.Separator,{}),n.jsx(g.CreateLink,{}),n.jsx(g.InsertImage,{}),n.jsx(g.Separator,{}),n.jsx(g.InsertTable,{}),n.jsx(g.InsertThematicBreak,{}),n.jsx(g.Separator,{}),n.jsx(g.InsertCodeBlock,{}),n.jsx(g.ConditionalContents,{options:[{when:f=>!Et(f),contents:()=>n.jsxs(n.Fragment,{children:[n.jsx(g.Separator,{}),n.jsx(g.InsertAdmonition,{})]})}]}),n.jsx(g.Separator,{}),n.jsx(g.InsertFrontmatter,{})]})}),g.diffSourcePlugin(y),g.listsPlugin(),g.quotePlugin(),g.headingsPlugin(s),g.linkPlugin(M),g.linkDialogPlugin(),g.imagePlugin(w),g.tablePlugin(),g.thematicBreakPlugin(),g.frontmatterPlugin(),g.codeBlockPlugin(v),g.codeMirrorPlugin(L),g.markdownShortcutPlugin(),g.directivesPlugin(D)],...l})};Y.Desktop=It,Y.MdEditor=_t,Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,109 +1,110 @@
1
- {
2
- "name": "zs_library",
3
- "version": "0.3.11",
4
- "homepage": "https://zs-library.vercel.app",
5
- "bugs": {
6
- "url": "https://github.com/virzs/zs_library/issues"
7
- },
8
- "repository": {
9
- "type": "git",
10
- "url": "git+https://github.com/virzs/zs_library.git"
11
- },
12
- "license": "MIT",
13
- "author": "v",
14
- "type": "module",
15
- "exports": {
16
- ".": {
17
- "import": "./dist/index.es.js",
18
- "require": "./dist/index.umd.js"
19
- },
20
- "./style.css": "./dist/style.css"
21
- },
22
- "main": "dist/index.umd.js",
23
- "module": "dist/index.es.js",
24
- "types": "dist/index.d.ts",
25
- "directories": {
26
- "doc": "docs"
27
- },
28
- "files": [
29
- "dist"
30
- ],
31
- "scripts": {
32
- "build": "tsc -b && vite build",
33
- "dev": "vite",
34
- "docs:build": "vite build && rspress build",
35
- "docs:dev": "rspress dev --host 0.0.0.0 --port 4372",
36
- "docs:preview": "rspress preview",
37
- "lint": "eslint .",
38
- "prepare": "husky"
39
- },
40
- "dependencies": {
41
- "@blocknote/core": "^0.15.6",
42
- "@blocknote/mantine": "^0.15.6",
43
- "@blocknote/react": "^0.15.6",
44
- "@codexteam/ajax": "^4.2.0",
45
- "@editorjs/dom": "^1.0.0",
46
- "@editorjs/editorjs": "^2.30.5",
47
- "@emotion/css": "^11.13.0",
48
- "@mantine/core": "^7.12.2",
49
- "@mdxeditor/editor": "^3.11.3",
50
- "@remixicon/react": "^4.2.0",
51
- "ahooks": "^3.8.1",
52
- "editorjs-drag-drop": "^1.1.14",
53
- "editorjs-undo": "^2.0.28",
54
- "framer-motion": "^11.5.4",
55
- "github-markdown-css": "^5.6.1",
56
- "lint-staged": "^15.2.10",
57
- "rc-dialog": "^9.6.0",
58
- "rc-tooltip": "^6.2.0",
59
- "react": "^18.3.1",
60
- "react-dom": "^18.3.1",
61
- "react-json-view": "^1.21.3",
62
- "react-modal-sheet": "^3.1.0",
63
- "react-slick": "^0.30.2",
64
- "react-sortablejs": "^6.1.4",
65
- "remixicon": "^4.3.0",
66
- "slick-carousel": "^1.8.1",
67
- "sortablejs": "^1.15.3",
68
- "uuid": "^10.0.0"
69
- },
70
- "devDependencies": {
71
- "@commitlint/cli": "^19.5.0",
72
- "@commitlint/config-conventional": "^19.5.0",
73
- "@eslint/js": "^9.9.0",
74
- "@rspress/plugin-playground": "^1.29.0",
75
- "@rspress/plugin-preview": "^1.30.0",
76
- "@rspress/plugin-typedoc": "^1.29.0",
77
- "@types/node": "^22.5.4",
78
- "@types/react": "^18.3.3",
79
- "@types/react-dom": "^18.3.0",
80
- "@types/react-slick": "^0.23.13",
81
- "@vitejs/plugin-react": "^4.3.1",
82
- "@vitejs/plugin-react-swc": "^3.5.0",
83
- "eslint": "^9.9.0",
84
- "eslint-plugin-react-hooks": "^5.1.0-rc.0",
85
- "eslint-plugin-react-refresh": "^0.4.9",
86
- "globals": "^15.9.0",
87
- "husky": "^9.1.6",
88
- "rollup": "^4.21.2",
89
- "rollup-plugin-auto-external": "^2.0.0",
90
- "rollup-plugin-visualizer": "^5.12.0",
91
- "rspress": "^1.29.0",
92
- "ts-node": "^10.9.2",
93
- "typescript": "^5.5.4",
94
- "typescript-eslint": "^8.0.1",
95
- "vite": "^5.4.1",
96
- "vite-plugin-dts": "^4.1.0",
97
- "vite-plugin-libcss": "^1.1.1"
98
- },
99
- "publishConfig": {
100
- "access": "public"
101
- },
102
- "authors": [
103
- "virs2018@outlook.com"
104
- ],
105
- "peerDependencies": {
106
- "react": "^17.0.0 || ^18.0.0",
107
- "react-dom": "^17.0.0 || ^18.0.0"
108
- }
109
- }
1
+ {
2
+ "name": "zs_library",
3
+ "version": "0.3.12",
4
+ "homepage": "https://zs-library.vercel.app",
5
+ "bugs": {
6
+ "url": "https://github.com/virzs/zs_library/issues"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/virzs/zs_library.git"
11
+ },
12
+ "license": "MIT",
13
+ "author": "v",
14
+ "type": "module",
15
+ "exports": {
16
+ ".": {
17
+ "import": "./dist/index.es.js",
18
+ "require": "./dist/index.umd.js",
19
+ "types": "./dist/index.d.ts"
20
+ },
21
+ "./style.css": "./dist/style.css"
22
+ },
23
+ "main": "dist/index.umd.js",
24
+ "module": "dist/index.es.js",
25
+ "types": "dist/index.d.ts",
26
+ "directories": {
27
+ "doc": "docs"
28
+ },
29
+ "files": [
30
+ "dist"
31
+ ],
32
+ "scripts": {
33
+ "build": "tsc -b && vite build",
34
+ "dev": "vite",
35
+ "docs:build": "vite build && rspress build",
36
+ "docs:dev": "rspress dev --host 0.0.0.0 --port 4372",
37
+ "docs:preview": "rspress preview",
38
+ "lint": "eslint .",
39
+ "prepare": "husky"
40
+ },
41
+ "dependencies": {
42
+ "@blocknote/core": "^0.15.6",
43
+ "@blocknote/mantine": "^0.15.6",
44
+ "@blocknote/react": "^0.15.6",
45
+ "@codexteam/ajax": "^4.2.0",
46
+ "@editorjs/dom": "^1.0.0",
47
+ "@editorjs/editorjs": "^2.30.5",
48
+ "@emotion/css": "^11.13.0",
49
+ "@mantine/core": "^7.12.2",
50
+ "@mdxeditor/editor": "^3.11.3",
51
+ "@remixicon/react": "^4.2.0",
52
+ "ahooks": "^3.8.1",
53
+ "editorjs-drag-drop": "^1.1.14",
54
+ "editorjs-undo": "^2.0.28",
55
+ "framer-motion": "^11.5.4",
56
+ "github-markdown-css": "^5.6.1",
57
+ "lint-staged": "^15.2.10",
58
+ "rc-dialog": "^9.6.0",
59
+ "rc-tooltip": "^6.2.0",
60
+ "react": "^18.3.1",
61
+ "react-dom": "^18.3.1",
62
+ "react-json-view": "^1.21.3",
63
+ "react-modal-sheet": "^3.1.0",
64
+ "react-slick": "^0.30.2",
65
+ "react-sortablejs": "^6.1.4",
66
+ "remixicon": "^4.3.0",
67
+ "slick-carousel": "^1.8.1",
68
+ "sortablejs": "^1.15.3",
69
+ "uuid": "^10.0.0"
70
+ },
71
+ "devDependencies": {
72
+ "@commitlint/cli": "^19.5.0",
73
+ "@commitlint/config-conventional": "^19.5.0",
74
+ "@eslint/js": "^9.9.0",
75
+ "@rspress/plugin-playground": "^1.29.0",
76
+ "@rspress/plugin-preview": "^1.30.0",
77
+ "@rspress/plugin-typedoc": "^1.29.0",
78
+ "@types/node": "^22.5.4",
79
+ "@types/react": "^18.3.3",
80
+ "@types/react-dom": "^18.3.0",
81
+ "@types/react-slick": "^0.23.13",
82
+ "@vitejs/plugin-react": "^4.3.1",
83
+ "@vitejs/plugin-react-swc": "^3.5.0",
84
+ "eslint": "^9.9.0",
85
+ "eslint-plugin-react-hooks": "^5.1.0-rc.0",
86
+ "eslint-plugin-react-refresh": "^0.4.9",
87
+ "globals": "^15.9.0",
88
+ "husky": "^9.1.6",
89
+ "rollup": "^4.21.2",
90
+ "rollup-plugin-auto-external": "^2.0.0",
91
+ "rollup-plugin-visualizer": "^5.12.0",
92
+ "rspress": "^1.29.0",
93
+ "ts-node": "^10.9.2",
94
+ "typescript": "^5.5.4",
95
+ "typescript-eslint": "^8.0.1",
96
+ "vite": "^5.4.1",
97
+ "vite-plugin-dts": "^4.1.0",
98
+ "vite-plugin-libcss": "^1.1.1"
99
+ },
100
+ "publishConfig": {
101
+ "access": "public"
102
+ },
103
+ "authors": [
104
+ "virs2018@outlook.com"
105
+ ],
106
+ "peerDependencies": {
107
+ "react": "^17.0.0 || ^18.0.0",
108
+ "react-dom": "^17.0.0 || ^18.0.0"
109
+ }
110
+ }