zs_library 0.3.14 → 0.3.15
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.es.js +1 -1
- package/dist/index.umd.js +45 -45
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var qr = Object.defineProperty;
|
|
2
2
|
var Ur = (d, r, i) => r in d ? qr(d, r, { enumerable: !0, configurable: !0, writable: !0, value: i }) : d[r] = i;
|
|
3
3
|
var Fe = (d, r, i) => Ur(d, typeof r != "symbol" ? r + "" : r, i);
|
|
4
|
-
import "./
|
|
4
|
+
import "./zs_library.css";
|
|
5
5
|
import sr, { createContext as cr, useMemo as De, useContext as dr, useState as Q, useRef as Ce, useEffect as ye } from "react";
|
|
6
6
|
import { cx as V, css as p } from "@emotion/css";
|
|
7
7
|
import Gr from "react-slick";
|
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(E,u){typeof exports=="object"&&typeof module<"u"?u(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"),require("react-markdown"),require("remark-gfm"),require("remark-emoji"),require("rehype-raw"),require("react-syntax-highlighter"),require("clsx"),require("tailwind-merge")):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","react-markdown","remark-gfm","remark-emoji","rehype-raw","react-syntax-highlighter","clsx","tailwind-merge"],u):(E=typeof globalThis<"u"?globalThis:E||self,u(E.zs_library={},E.React,E.css,E.Slider,E.reactSortablejs,E.framerMotion,E.ahooks,E.uuid,E.RcTooltip,E.react,E.Dialog,E.ReactJson,E.MDXEditor,E.Markdown,E.remarkGfm,E.emoji,E.rehypeRaw,E.reactSyntaxHighlighter,E.clsx,E.tailwindMerge))})(this,function(E,u,a,
|
|
1
|
+
(function(E,u){typeof exports=="object"&&typeof module<"u"?u(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"),require("react-markdown"),require("remark-gfm"),require("remark-emoji"),require("rehype-raw"),require("react-syntax-highlighter"),require("clsx"),require("tailwind-merge")):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","react-markdown","remark-gfm","remark-emoji","rehype-raw","react-syntax-highlighter","clsx","tailwind-merge"],u):(E=typeof globalThis<"u"?globalThis:E||self,u(E.zs_library={},E.React,E.css,E.Slider,E.reactSortablejs,E.framerMotion,E.ahooks,E.uuid,E.RcTooltip,E.react,E.Dialog,E.ReactJson,E.MDXEditor,E.Markdown,E.remarkGfm,E.emoji,E.rehypeRaw,E.reactSyntaxHighlighter,E.clsx,E.tailwindMerge))})(this,function(E,u,a,kr,Pe,h,Ye,We,vr,ke,Ve,xr,C,wr,yr,Cr,Sr,jr,Tr,Ir){"use strict";var ht=Object.defineProperty;var bt=(E,u,a)=>u in E?ht(E,u,{enumerable:!0,configurable:!0,writable:!0,value:a}):E[u]=a;var ze=(E,u,a)=>bt(E,typeof u!="symbol"?u+"":u,a);require("./zs_library.css");var ye={exports:{}},ve={};/**
|
|
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 Xe;function
|
|
9
|
+
*/var Xe;function Rr(){if(Xe)return ve;Xe=1;var f=u,r=Symbol.for("react.element"),c=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,d=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function g(k,l,j){var x,N={},M=null,V=null;j!==void 0&&(M=""+j),l.key!==void 0&&(M=""+l.key),l.ref!==void 0&&(V=l.ref);for(x in l)n.call(l,x)&&!s.hasOwnProperty(x)&&(N[x]=l[x]);if(k&&k.defaultProps)for(x in l=k.defaultProps,l)N[x]===void 0&&(N[x]=l[x]);return{$$typeof:r,type:k,key:M,ref:V,props:N,_owner:d.current}}return ve.Fragment=c,ve.jsx=g,ve.jsxs=g,ve}var xe={};/**
|
|
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 Ue;function
|
|
18
|
-
`+W+e}}var I=!1,A;{var J=typeof WeakMap=="function"?WeakMap:Map;A=new J}function ne(e,o){if(!e||I)return"";{var i=A.get(e);if(i!==void 0)return i}var p;I=!0;var D=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var F;F=L.current,L.current=null,Q();try{if(o){var R=function(){throw Error()};if(Object.defineProperty(R.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(R,[])}catch(
|
|
17
|
+
*/var Ue;function Er(){return Ue||(Ue=1,process.env.NODE_ENV!=="production"&&function(){var f=u,r=Symbol.for("react.element"),c=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),k=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),X=Symbol.iterator,v="@@iterator";function m(e){if(e===null||typeof e!="object")return null;var o=X&&e[X]||e[v];return typeof o=="function"?o:null}var _=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(e){{for(var o=arguments.length,i=new Array(o>1?o-1:0),p=1;p<o;p++)i[p-1]=arguments[p];U("error",e,i)}}function U(e,o,i){{var p=_.ReactDebugCurrentFrame,D=p.getStackAddendum();D!==""&&(o+="%s",i=i.concat([D]));var F=i.map(function(R){return String(R)});F.unshift("Warning: "+o),Function.prototype.apply.call(console[e],console,F)}}var w=!1,B=!1,O=!1,y=!1,T=!1,K;K=Symbol.for("react.module.reference");function de(e){return!!(typeof e=="string"||typeof e=="function"||e===n||e===s||T||e===d||e===j||e===x||y||e===V||w||B||O||typeof e=="object"&&e!==null&&(e.$$typeof===M||e.$$typeof===N||e.$$typeof===g||e.$$typeof===k||e.$$typeof===l||e.$$typeof===K||e.getModuleId!==void 0))}function q(e,o,i){var p=e.displayName;if(p)return p;var D=o.displayName||o.name||"";return D!==""?i+"("+D+")":i}function fe(e){return e.displayName||"Context"}function $(e){if(e==null)return null;if(typeof e.tag=="number"&&b("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 n:return"Fragment";case c:return"Portal";case s:return"Profiler";case d:return"StrictMode";case j:return"Suspense";case x:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case k:var o=e;return fe(o)+".Consumer";case g:var i=e;return fe(i._context)+".Provider";case l:return q(e,e.render,"ForwardRef");case N:var p=e.displayName||null;return p!==null?p:$(e.type)||"Memo";case M:{var D=e,F=D._payload,R=D._init;try{return $(R(F))}catch{return null}}}return null}var oe=Object.assign,se=0,Y,ae,ce,Ce,Se,je,Te;function P(){}P.__reactDisabledLog=!0;function Q(){{if(se===0){Y=console.log,ae=console.info,ce=console.warn,Ce=console.error,Se=console.group,je=console.groupCollapsed,Te=console.groupEnd;var e={configurable:!0,enumerable:!0,value:P,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}se++}}function Z(){{if(se--,se===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:oe({},e,{value:Y}),info:oe({},e,{value:ae}),warn:oe({},e,{value:ce}),error:oe({},e,{value:Ce}),group:oe({},e,{value:Se}),groupCollapsed:oe({},e,{value:je}),groupEnd:oe({},e,{value:Te})})}se<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var L=_.ReactCurrentDispatcher,W;function z(e,o,i){{if(W===void 0)try{throw Error()}catch(D){var p=D.stack.trim().match(/\n( *(at )?)/);W=p&&p[1]||""}return`
|
|
18
|
+
`+W+e}}var I=!1,A;{var J=typeof WeakMap=="function"?WeakMap:Map;A=new J}function ne(e,o){if(!e||I)return"";{var i=A.get(e);if(i!==void 0)return i}var p;I=!0;var D=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var F;F=L.current,L.current=null,Q();try{if(o){var R=function(){throw Error()};if(Object.defineProperty(R.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(R,[])}catch(te){p=te}Reflect.construct(e,[],R)}else{try{R.call()}catch(te){p=te}e.call(R.prototype)}}else{try{throw Error()}catch(te){p=te}e()}}catch(te){if(te&&p&&typeof te.stack=="string"){for(var S=te.stack.split(`
|
|
19
19
|
`),ee=p.stack.split(`
|
|
20
20
|
`),G=S.length-1,H=ee.length-1;G>=1&&H>=0&&S[G]!==ee[H];)H--;for(;G>=1&&H>=0;G--,H--)if(S[G]!==ee[H]){if(G!==1||H!==1)do if(G--,H--,H<0||S[G]!==ee[H]){var ie=`
|
|
21
|
-
`+S[G].replace(" at new "," at ");return e.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",e.displayName)),typeof e=="function"&&A.set(e,ie),ie}while(G>=1&&H>=0);break}}}finally{I=!1,L.current=F,Z(),Error.prepareStackTrace=D}var be=e?e.displayName||e.name:"",me=be?z(be):"";return typeof e=="function"&&A.set(e,me),me}function Ie(e,o,i){return ne(e,!1)}function Re(e){var o=e.prototype;return!!(o&&o.isReactComponent)}function
|
|
21
|
+
`+S[G].replace(" at new "," at ");return e.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",e.displayName)),typeof e=="function"&&A.set(e,ie),ie}while(G>=1&&H>=0);break}}}finally{I=!1,L.current=F,Z(),Error.prepareStackTrace=D}var be=e?e.displayName||e.name:"",me=be?z(be):"";return typeof e=="function"&&A.set(e,me),me}function Ie(e,o,i){return ne(e,!1)}function Re(e){var o=e.prototype;return!!(o&&o.isReactComponent)}function re(e,o,i){if(e==null)return"";if(typeof e=="function")return ne(e,Re(e));if(typeof e=="string")return z(e);switch(e){case j:return z("Suspense");case x:return z("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return Ie(e.render);case N:return re(e.type,o,i);case M:{var p=e,D=p._payload,F=p._init;try{return re(F(D),o,i)}catch{}}}return""}var ge=Object.prototype.hasOwnProperty,ar={},ir=_.ReactDebugCurrentFrame;function Ee(e){if(e){var o=e._owner,i=re(e.type,e._source,o?o.type:null);ir.setExtraStackFrame(i)}else ir.setExtraStackFrame(null)}function Jr(e,o,i,p,D){{var F=Function.call.bind(ge);for(var R in e)if(F(e,R)){var S=void 0;try{if(typeof e[R]!="function"){var ee=Error((p||"React class")+": "+i+" type `"+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[R]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ee.name="Invariant Violation",ee}S=e[R](o,R,p,i,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(G){S=G}S&&!(S instanceof Error)&&(Ee(D),b("%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).",p||"React class",i,R,typeof S),Ee(null)),S instanceof Error&&!(S.message in ar)&&(ar[S.message]=!0,Ee(D),b("Failed %s type: %s",i,S.message),Ee(null))}}}var Kr=Array.isArray;function Ne(e){return Kr(e)}function $r(e){{var o=typeof Symbol=="function"&&Symbol.toStringTag,i=o&&e[Symbol.toStringTag]||e.constructor.name||"Object";return i}}function qr(e){try{return lr(e),!1}catch{return!0}}function lr(e){return""+e}function sr(e){if(qr(e))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",$r(e)),lr(e)}var we=_.ReactCurrentOwner,Zr={key:!0,ref:!0,__self:!0,__source:!0},cr,dr,Oe;Oe={};function Qr(e){if(ge.call(e,"ref")){var o=Object.getOwnPropertyDescriptor(e,"ref").get;if(o&&o.isReactWarning)return!1}return e.ref!==void 0}function et(e){if(ge.call(e,"key")){var o=Object.getOwnPropertyDescriptor(e,"key").get;if(o&&o.isReactWarning)return!1}return e.key!==void 0}function rt(e,o){if(typeof e.ref=="string"&&we.current&&o&&we.current.stateNode!==o){var i=$(we.current.type);Oe[i]||(b('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',$(we.current.type),e.ref),Oe[i]=!0)}}function tt(e,o){{var i=function(){cr||(cr=!0,b("%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)",o))};i.isReactWarning=!0,Object.defineProperty(e,"key",{get:i,configurable:!0})}}function ot(e,o){{var i=function(){dr||(dr=!0,b("%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)",o))};i.isReactWarning=!0,Object.defineProperty(e,"ref",{get:i,configurable:!0})}}var nt=function(e,o,i,p,D,F,R){var S={$$typeof:r,type:e,key:o,ref:i,props:R,_owner:F};return S._store={},Object.defineProperty(S._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(S,"_self",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.defineProperty(S,"_source",{configurable:!1,enumerable:!1,writable:!1,value:D}),Object.freeze&&(Object.freeze(S.props),Object.freeze(S)),S};function at(e,o,i,p,D){{var F,R={},S=null,ee=null;i!==void 0&&(sr(i),S=""+i),et(o)&&(sr(o.key),S=""+o.key),Qr(o)&&(ee=o.ref,rt(o,D));for(F in o)ge.call(o,F)&&!Zr.hasOwnProperty(F)&&(R[F]=o[F]);if(e&&e.defaultProps){var G=e.defaultProps;for(F in G)R[F]===void 0&&(R[F]=G[F])}if(S||ee){var H=typeof e=="function"?e.displayName||e.name||"Unknown":e;S&&tt(R,H),ee&&ot(R,H)}return nt(e,S,ee,D,p,we.current,R)}}var Ae=_.ReactCurrentOwner,ur=_.ReactDebugCurrentFrame;function he(e){if(e){var o=e._owner,i=re(e.type,e._source,o?o.type:null);ur.setExtraStackFrame(i)}else ur.setExtraStackFrame(null)}var Be;Be=!1;function Le(e){return typeof e=="object"&&e!==null&&e.$$typeof===r}function gr(){{if(Ae.current){var e=$(Ae.current.type);if(e)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function it(e){return""}var mr={};function lt(e){{var o=gr();if(!o){var i=typeof e=="string"?e:e.displayName||e.name;i&&(o=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+i+">.")}return o}}function
|
|
25
|
+
Check the top-level render call using <`+i+">.")}return o}}function pr(e,o){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var i=lt(o);if(mr[i])return;mr[i]=!0;var p="";e&&e._owner&&e._owner!==Ae.current&&(p=" It was passed a child from "+$(e._owner.type)+"."),he(e),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',i,p),he(null)}}function fr(e,o){{if(typeof e!="object")return;if(Ne(e))for(var i=0;i<e.length;i++){var p=e[i];Le(p)&&pr(p,o)}else if(Le(e))e._store&&(e._store.validated=!0);else if(e){var D=m(e);if(typeof D=="function"&&D!==e.entries)for(var F=D.call(e),R;!(R=F.next()).done;)Le(R.value)&&pr(R.value,o)}}}function st(e){{var o=e.type;if(o==null||typeof o=="string")return;var i;if(typeof o=="function")i=o.propTypes;else if(typeof o=="object"&&(o.$$typeof===l||o.$$typeof===N))i=o.propTypes;else return;if(i){var p=$(o);Jr(i,e.props,"prop",p,e)}else if(o.PropTypes!==void 0&&!Be){Be=!0;var D=$(o);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",D||"Unknown")}typeof o.getDefaultProps=="function"&&!o.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ct(e){{for(var o=Object.keys(e.props),i=0;i<o.length;i++){var p=o[i];if(p!=="children"&&p!=="key"){he(e),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",p),he(null);break}}e.ref!==null&&(he(e),b("Invalid attribute `ref` supplied to `React.Fragment`."),he(null))}}var hr={};function br(e,o,i,p,D,F){{var R=de(e);if(!R){var S="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(S+=" 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=it();ee?S+=ee:S+=gr();var G;e===null?G="null":Ne(e)?G="array":e!==void 0&&e.$$typeof===r?(G="<"+($(e.type)||"Unknown")+" />",S=" Did you accidentally export a JSX literal instead of a component?"):G=typeof e,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",G,S)}var H=at(e,o,i,D,F);if(H==null)return H;if(R){var ie=o.children;if(ie!==void 0)if(p)if(Ne(ie)){for(var be=0;be<ie.length;be++)fr(ie[be],e);Object.freeze&&Object.freeze(ie)}else b("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 fr(ie,e)}if(ge.call(o,"key")){var me=$(e),te=Object.keys(o).filter(function(ft){return ft!=="key"}),Fe=te.length>0?"{key: someKey, "+te.join(": ..., ")+": ...}":"{key: someKey}";if(!hr[me+Fe]){var pt=te.length>0?"{"+te.join(": ..., ")+": ...}":"{}";b(`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} />`,Fe,me,
|
|
30
|
+
<%s key={someKey} {...props} />`,Fe,me,pt,me),hr[me+Fe]=!0}}return e===n?ct(H):st(H),H}}function dt(e,o,i){return br(e,o,i,!0)}function ut(e,o,i){return br(e,o,i,!1)}var gt=ut,mt=dt;xe.Fragment=n,xe.jsx=gt,xe.jsxs=mt}()),xe}var Ge;function Pr(){return Ge||(Ge=1,process.env.NODE_ENV==="production"?ye.exports=Rr():ye.exports=Er()),ye.exports}var t=Pr();const He={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)"}},Je={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)"}},Ke=u.createContext({}),_r=f=>{const{children:r,theme:c,...n}=f,d=u.useMemo(()=>c==="light"?He:c==="dark"?Je:c,[c]);return t.jsx(Ke.Provider,{value:{theme:d,...n},children:r})},ue=()=>u.useContext(Ke),$e={maxRow:2,maxCol:2},Dr={...$e},qe={app:$e,group:Dr};class le{}ze(le,"uniqueArray",r=>r.reduce((c,n)=>c.find(s=>s.id===n.id)?c:c.concat([n]),[])),ze(le,"getTheme",r=>{const c=He.token,n=Je.token,d={...c,...r==null?void 0:r.token},s={...n,...r==null?void 0:r.token};return{light:d,dark:s}});const Ze=u.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:()=>{}}),Mr=f=>{const{children:r,list:c=[],onChange:n,storageKey:d="ZS_LIBRARY_DESKTOP_SORTABLE_CONFIG",enableCaching:s=!0}=f,[g,k]=u.useState(),[l,j]=u.useState(),[x,N]=u.useState(null),M=u.useRef(x),[V,X]=u.useState(null),[v,m]=u.useState([]),[_,b]=u.useState(null),[U,w]=u.useState(null),[B,O]=u.useState(!1),[y,T]=u.useState(null),[K,de]=u.useState(null),[q,fe]=u.useState(!1),[$,oe]=Ye.useLocalStorageState(d,{defaultValue:[],listenStorageChange:!0}),se=()=>{X(null),clearTimeout(g),k(void 0),M.current=null},Y=(P,Q)=>{X({...P,pageX:P.pageX,pageY:P.pageY,data:Q}),clearTimeout(g)},ae=(P,Q=!0)=>{const{config:Z={}}=P;return Z.allowContextMenu===!1?{}:{onMouseDown:L=>{k(setTimeout(()=>{Q&&M.current===null&&Y(L,P)},800)),O(!1),j(setTimeout(()=>{O(!0)},800))},onMouseUp:()=>{clearTimeout(l),j(void 0),clearTimeout(g),k(void 0)},onContextMenu:L=>{Q&&(L.preventDefault(),Y(L,P))}}},ce=(P,Q)=>{const Z=[...Q||[]];if(Z.length>0)m(L=>{const W=[...L],z=I=>{var Ie,Re;const A=Z.shift(),J=I.find(re=>re.id===A),ne=I.findIndex(re=>re.id===A);if(Z.length&&J){if(((Ie=J.children)==null?void 0:Ie.filter(re=>!P.some(ge=>ge.id===re.id)).length)===1&&P.length===1){const re={...P[0]};return I.splice(ne,1,re),n==null||n(I),I}return J.children=z(J.children||[]),I.splice(ne,1,J),n==null||n(I),I}if(J){if(!((Re=J.children)!=null&&Re.length)&&P.length){const re={...J};return J.data={name:"文件夹"},J.type="group",J.children=[re,...P],J.id=We.v4(),I.splice(ne,1,J),n==null||n(I),I}return J.children=le.uniqueArray(P),I.splice(ne,1,J),n==null||n(I),I}return le.uniqueArray(P)};return le.uniqueArray(z(W))});else{const L=le.uniqueArray(P);n==null||n(L),m(L)}},Ce=(P,Q)=>{m(Z=>{const L=[...Z],W=z=>{var I;for(let A=0;A<z.length;A++)if(z[A].id===P){z[A].config=Q;break}else((I=z[A].children)==null?void 0:I.length)!==void 0&&W(z[A].children)};return W(L),n==null||n(L),L})},Se=(P,Q)=>{m(Z=>{const L=[...Z],W=z=>{var I;for(let A=0;A<z.length;A++)if(z[A].id===P){z[A].data=Q;break}else((I=z[A].children)==null?void 0:I.length)!==void 0&&W(z[A].children)};return W(L),n==null||n(L),L})},je=P=>{m(Q=>{const Z=[...Q],L=W=>{var z;for(let I=0;I<W.length;I++)if(W[I].id===P){W.splice(I,1);break}else((z=W[I].children)==null?void 0:z.length)!==void 0&&L(W[I].children)};return L(Z),n==null||n(Z),Z})},Te=(P,Q)=>{const Z=[...v],L=(W,z)=>{const I=z.shift(),A=W.find(ne=>ne.id===I),J=W.findIndex(ne=>ne.id===I);if(A){if(z.length)A.children=L(A.children||[],z);else{const ne=(P==null?void 0:P.type)??"app";A.children=[...A.children??[],{...P,id:We.v4(),config:(P==null?void 0:P.config)??qe[ne]}]}return W.splice(J,1,A),W}else return W};m(L(Z,Q))};return u.useEffect(()=>{(c==null?void 0:c.length)>0&&v.length===0&&ce(c)},[c]),u.useEffect(()=>{M.current=x,x!==null&&se()},[x]),u.useEffect(()=>{s&&$!=null&&$.length&&!q&&(ce($),fe(!0))},[$,q,s]),Ye.useDebounceEffect(()=>{s&&oe(v)},[v,s],{wait:1e3}),t.jsx(Ze.Provider,{value:{list:v,setList:ce,contextMenu:V,setContextMenu:X,listStatus:x,setListStatus:N,contextMenuFuns:ae,hideContextMenu:se,showInfoItemData:_,setShowInfoItemData:b,openGroupItemData:U,setOpenGroupItemData:w,longPressTriggered:B,updateItemConfig:Ce,updateItem:Se,removeItem:je,addItem:Te,moveItemId:y,setMoveItemId:T,moveTargetId:K,setMoveTargetId:de},children:r})},pe=()=>u.useContext(Ze),Nr={menuShow:{opacity:1,y:0,transition:{type:"spring",stiffness:300,damping:24}},menuHide:{opacity:0,y:20,transition:{duration:.2}}},_e=f=>{const{icon:r,title:c,onClick:n}=f,{theme:d}=ue(),{light:s,dark:g}=le.getTheme(d);return t.jsx(h.motion.div,{className:a.css`
|
|
31
31
|
&:hover {
|
|
32
32
|
background-color: ${s.contextMenuActiveColor};
|
|
33
33
|
@media (prefers-color-scheme: dark) {
|
|
@@ -43,17 +43,17 @@ React keys must be passed directly to JSX without using spread:
|
|
|
43
43
|
transition: all 0.3s;
|
|
44
44
|
user-select: none;
|
|
45
45
|
border-radius: 0.5rem;
|
|
46
|
-
`,onClick:k=>{k.stopPropagation(),n==null||n()},variants:
|
|
46
|
+
`,onClick:k=>{k.stopPropagation(),n==null||n()},variants:Nr,children:t.jsxs(h.motion.div,{className:a.cx("py-1.5 px-3 rounded-lg",a.css`
|
|
47
47
|
padding-top: 0.375rem;
|
|
48
48
|
padding-bottom: 0.375rem;
|
|
49
49
|
padding-left: 0.75rem;
|
|
50
50
|
padding-right: 0.75rem;
|
|
51
51
|
border-radius: 0.5rem;
|
|
52
|
-
`),whileTap:{scale:.9},children:[
|
|
52
|
+
`),whileTap:{scale:.9},children:[t.jsx(h.motion.div,{className:a.cx(a.css`
|
|
53
53
|
margin-bottom: 0.375rem;
|
|
54
54
|
display: flex;
|
|
55
55
|
justify-content: center;
|
|
56
|
-
`),children:
|
|
56
|
+
`),children:r}),t.jsx(h.motion.div,{children:c})]})})},Or=f=>{const{showInfoButton:r=!0,showRemoveButton:c=!0,showShareButton:n=!0,showSizeButton:d=!0,onInfoClick:s,onShareClick:g,onRemoveClick:k}=f,{contextMenu:l,setContextMenu:j,hideContextMenu:x,setShowInfoItemData:N,removeItem:M,updateItemConfig:V}=pe(),{theme:X}=ue(),{light:v,dark:m}=le.getTheme(X),{data:_}=l??{},{config:b={}}=_??{},U=()=>{var O;const w=qe[(O=l==null?void 0:l.data)==null?void 0:O.type],B=[];for(let y=1;y<=((w==null?void 0:w.maxRow)??2);y++)for(let T=1;T<=((w==null?void 0:w.maxCol)??2);T++)B.push(`${y}x${T}`);return B};return t.jsx(h.AnimatePresence,{children:l&&t.jsxs(h.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onMouseDown:w=>{w.stopPropagation(),w.preventDefault()},children:[t.jsx(h.motion.div,{className:a.cx(a.css`
|
|
57
57
|
border-radius: 0.5rem;
|
|
58
58
|
overflow: hidden;
|
|
59
59
|
background-color: ${v.contextMenuBackgroundColor};
|
|
@@ -62,16 +62,16 @@ React keys must be passed directly to JSX without using spread:
|
|
|
62
62
|
background-color: ${m.contextMenuBackgroundColor};
|
|
63
63
|
box-shadow: 0 0 0.5rem ${m.contextMenuShadowColor};
|
|
64
64
|
}
|
|
65
|
-
`),children:d&&b.allowResize!==!1&&
|
|
65
|
+
`),children:d&&b.allowResize!==!1&&t.jsx(h.motion.ul,{className:a.css`
|
|
66
66
|
background-color: white;
|
|
67
67
|
padding: 0.25rem;
|
|
68
68
|
margin: 0;
|
|
69
|
-
`,children:[{label:"修改大小",key:"size",icon:
|
|
69
|
+
`,children:[{label:"修改大小",key:"size",icon:t.jsx(ke.RiPencilRuler2Line,{size:14}),items:U().map(w=>({label:w,key:w,onClick:()=>{const[B,O]=w.split("x").map(Number);V(l.data.id,{row:B,col:O})}}))}].map(w=>t.jsxs(h.motion.li,{className:a.css`
|
|
70
70
|
padding-top: 0.5rem;
|
|
71
71
|
padding-bottom: 0.5rem;
|
|
72
72
|
padding-left: 0.75rem;
|
|
73
73
|
padding-right: 0.75rem;
|
|
74
|
-
`,children:[
|
|
74
|
+
`,children:[t.jsxs(h.motion.p,{className:a.css`
|
|
75
75
|
display: flex;
|
|
76
76
|
align-items: center;
|
|
77
77
|
font-size: 0.875rem;
|
|
@@ -79,11 +79,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
79
79
|
gap: 0.5rem;
|
|
80
80
|
padding-bottom: 0.5rem;
|
|
81
81
|
margin: 0;
|
|
82
|
-
`,children:[w.icon," ",w.label]}),
|
|
82
|
+
`,children:[w.icon," ",w.label]}),t.jsx(h.motion.div,{className:a.css`
|
|
83
83
|
display: grid;
|
|
84
84
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
85
85
|
gap: 0.25rem;
|
|
86
|
-
`,children:w.items.map(B=>
|
|
86
|
+
`,children:w.items.map(B=>t.jsx(h.motion.div,{className:a.cx("py-1 px-2 hover:bg-gray-100 rounded transition-all cursor-pointer text-center text-sm",a.css`
|
|
87
87
|
padding-top: 0.25rem;
|
|
88
88
|
padding-bottom: 0.25rem;
|
|
89
89
|
padding-left: 0.5rem;
|
|
@@ -109,7 +109,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
109
109
|
@media (prefers-color-scheme: dark) {
|
|
110
110
|
background-color: ${m.contextMenuActiveColor};
|
|
111
111
|
}
|
|
112
|
-
`),onClick:B.onClick,children:B.label},B.key))})]},w.key))})}),
|
|
112
|
+
`),onClick:B.onClick,children:B.label},B.key))})]},w.key))})}),t.jsxs(h.motion.div,{className:a.cx(a.css`
|
|
113
113
|
background-color: ${v.contextMenuBackgroundColor};
|
|
114
114
|
box-shadow: 0 0 0.5rem ${v.contextMenuShadowColor};
|
|
115
115
|
@media (prefers-color-scheme: dark) {
|
|
@@ -123,7 +123,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
123
123
|
border-radius: 0.5rem;
|
|
124
124
|
overflow: hidden;
|
|
125
125
|
padding: 0.25rem;
|
|
126
|
-
`),children:[n&&
|
|
126
|
+
`),children:[n&&t.jsx(_e,{icon:t.jsx(ke.RiShareLine,{size:20}),title:"分享",onClick:()=>{if(g){g(l.data);return}}}),r&&t.jsx(_e,{icon:t.jsx(ke.RiInformationLine,{size:20}),title:"信息",onClick:()=>{if(s){s(l.data);return}N({...l.data,pageX:l.pageX,pageY:l.pageY}),x()}}),c&&t.jsx(_e,{icon:t.jsx(ke.RiCloseCircleLine,{size:20}),title:"移除",onClick:()=>{if(k){k(l.data,M);return}j(null),M(l.data.id)}})]})]})})},Ar=f=>{const{data:r,noLetters:c=!1}=f,{contextMenuFuns:n}=pe(),{itemIconBuilder:d,theme:s,contextMenu:g}=ue(),{light:k,dark:l}=le.getTheme(s),{data:j={}}=r,{name:x}=j;return t.jsxs(t.Fragment,{children:[t.jsx(h.motion.div,{className:a.css`
|
|
127
127
|
width: 4rem;
|
|
128
128
|
height: 4rem;
|
|
129
129
|
background-color: ${k.itemIconBackgroundColor};
|
|
@@ -136,7 +136,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
136
136
|
background-color: ${l.itemIconBackgroundColor};
|
|
137
137
|
box-shadow: 0 0 0.5rem ${l.itemIconShadowColor};
|
|
138
138
|
}
|
|
139
|
-
`,whileTap:{scale:.9},children:
|
|
139
|
+
`,whileTap:{scale:.9},children:t.jsx("div",{className:a.css`
|
|
140
140
|
position: absolute;
|
|
141
141
|
left: 0;
|
|
142
142
|
top: 0;
|
|
@@ -146,7 +146,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
146
146
|
@media (prefers-color-scheme: dark) {
|
|
147
147
|
color: ${l.itemNameColor};
|
|
148
148
|
}
|
|
149
|
-
`,...n(
|
|
149
|
+
`,...n(r,g!==!1),children:d==null?void 0:d(r)})}),t.jsx(h.motion.p,{className:a.cx(a.css`
|
|
150
150
|
text-align: center;
|
|
151
151
|
margin-top: 0.25rem;
|
|
152
152
|
margin-bottom: 0;
|
|
@@ -156,14 +156,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
156
156
|
}
|
|
157
157
|
`,c&&a.css`
|
|
158
158
|
color: transparent;
|
|
159
|
-
`),children:x})]})},De=f=>{const{data:
|
|
159
|
+
`),children:x})]})},De=f=>{const{data:r,className:c,itemIndex:n,onClick:d,disabledDrag:s=!1,children:g,parentIds:k,childrenLength:l}=f,{contextMenu:j,setContextMenu:x}=pe(),{contextMenu:N}=ue();return t.jsx(vr,{placement:"bottom",overlayClassName:a.css`
|
|
160
160
|
background-color: transparent;
|
|
161
161
|
.rc-tooltip-inner {
|
|
162
162
|
background-color: transparent;
|
|
163
163
|
padding: 0;
|
|
164
164
|
border: none;
|
|
165
165
|
}
|
|
166
|
-
`,overlay:
|
|
166
|
+
`,overlay:t.jsx(Or,{...N}),visible:(j==null?void 0:j.data.id)===r.id,onVisibleChange:M=>{M||x(null)},destroyTooltipOnHide:!0,children:t.jsx(h.motion.div,{"data-id":r.id,"data-index":n,"data-parent-ids":k==null?void 0:k.join(","),"data-children-length":l,onClick:()=>d==null?void 0:d(r),className:a.cx(s&&"drag-disabled",c),children:g??t.jsx(Ar,{...f})})})},Br=f=>{const{data:r,className:c,parentIds:n,itemIndex:d,onClick:s,noLetters:g=!1}=f,{contextMenuFuns:k,setList:l,setOpenGroupItemData:j,longPressTriggered:x,moveItemId:N,moveTargetId:M,setMoveTargetId:V,listStatus:X}=pe(),{itemIconBuilder:v,theme:m,contextMenu:_}=ue(),{light:b,dark:U}=le.getTheme(m),{children:w,data:B,config:O}=r,{row:y=1,col:T=1}=O??{},K={visible:{opacity:1,scale:1},hidden:{opacity:0,scale:.95}},de=((w==null?void 0:w.length)??0)===0,q=de?[r]:[...w??[]].slice(0,9),fe=u.useMemo(()=>N===r.id.toString(),[r.id,N]),$=u.useMemo(()=>M===r.id,[r.id,M]),oe=a.css`
|
|
167
167
|
overflow: hidden;
|
|
168
168
|
cursor: pointer;
|
|
169
169
|
background-color: ${b.itemIconBackgroundColor};
|
|
@@ -172,7 +172,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
172
172
|
background-color: ${U.itemIconBackgroundColor};
|
|
173
173
|
box-shadow: 0 0 0.5rem ${U.itemIconShadowColor};
|
|
174
174
|
}
|
|
175
|
-
`,se=()=>{if(de)return
|
|
175
|
+
`,se=()=>{if(de)return t.jsx(h.motion.div,{className:a.cx("sortable-group-item",a.css`
|
|
176
176
|
overflow: hidden;
|
|
177
177
|
cursor: pointer;
|
|
178
178
|
width: 100%;
|
|
@@ -185,7 +185,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
185
185
|
@media (prefers-color-scheme: dark) {
|
|
186
186
|
background-color: ${U.itemIconBackgroundColor};
|
|
187
187
|
}
|
|
188
|
-
`),onClick:Y=>{Y.stopPropagation(),s==null||s(
|
|
188
|
+
`),onClick:Y=>{Y.stopPropagation(),s==null||s(r)},children:v==null?void 0:v(r)});if(y===1&&T===1||y===2&&T===2)return t.jsx(h.motion.div,{className:a.css`
|
|
189
189
|
display: grid;
|
|
190
190
|
width: 100%;
|
|
191
191
|
height: 100%;
|
|
@@ -194,11 +194,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
194
194
|
padding: ${T===1?"0.125rem":"0.25rem"};
|
|
195
195
|
gap: ${T===1?"0.125rem":"0.5rem"};
|
|
196
196
|
place-items: center;
|
|
197
|
-
`,children:q==null?void 0:q.slice(0,9).map(Y=>
|
|
197
|
+
`,children:q==null?void 0:q.slice(0,9).map(Y=>t.jsx(h.motion.div,{className:a.cx(oe,a.css`
|
|
198
198
|
border-radius: ${T===1?"0.25rem":"0.5rem"};
|
|
199
199
|
width: 100%;
|
|
200
200
|
height: 100%;
|
|
201
|
-
`),onClick:ae=>{ae.stopPropagation(),s==null||s(Y)},children:v==null?void 0:v(Y)},Y.id))});if(y===1&&T===2)return
|
|
201
|
+
`),onClick:ae=>{ae.stopPropagation(),s==null||s(Y)},children:v==null?void 0:v(Y)},Y.id))});if(y===1&&T===2)return t.jsx(h.motion.div,{className:a.css`
|
|
202
202
|
display: grid;
|
|
203
203
|
grid-template-columns: repeat(10, minmax(0, 1fr));
|
|
204
204
|
grid-template-rows: repeat(4, minmax(0, 1fr));
|
|
@@ -207,7 +207,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
207
207
|
width: 144px;
|
|
208
208
|
height: 52px;
|
|
209
209
|
place-items: center;
|
|
210
|
-
`,children:q==null?void 0:q.slice(0,4).map((Y,ae)=>
|
|
210
|
+
`,children:q==null?void 0:q.slice(0,4).map((Y,ae)=>t.jsx(h.motion.div,{className:a.cx(oe,ae<2?a.css`
|
|
211
211
|
width: 52px;
|
|
212
212
|
height: 52px;
|
|
213
213
|
border-radius: 0.5rem;
|
|
@@ -219,7 +219,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
219
219
|
border-radius: 0.375rem;
|
|
220
220
|
grid-column: span 2 / span 2;
|
|
221
221
|
grid-row: span 2 / span 2;
|
|
222
|
-
`),onClick:ce=>{ae>2||(ce.stopPropagation(),s==null||s(Y))},children:v==null?void 0:v(Y)},Y.id))});if(y===2&&T===1)return
|
|
222
|
+
`),onClick:ce=>{ae>2||(ce.stopPropagation(),s==null||s(Y))},children:v==null?void 0:v(Y)},Y.id))});if(y===2&&T===1)return t.jsx(h.motion.div,{className:a.css`
|
|
223
223
|
display: grid;
|
|
224
224
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
225
225
|
grid-template-rows: repeat(10, minmax(0, 1fr));
|
|
@@ -228,7 +228,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
228
228
|
width: 52px;
|
|
229
229
|
height: 144px;
|
|
230
230
|
place-items: center;
|
|
231
|
-
`,children:q==null?void 0:q.slice(0,4).map((Y,ae)=>
|
|
231
|
+
`,children:q==null?void 0:q.slice(0,4).map((Y,ae)=>t.jsx(h.motion.div,{className:a.cx(oe,ae<2?a.css`
|
|
232
232
|
width: 52px;
|
|
233
233
|
height: 52px;
|
|
234
234
|
border-radius: 0.5rem;
|
|
@@ -239,10 +239,10 @@ React keys must be passed directly to JSX without using spread:
|
|
|
239
239
|
height: 1.5rem;
|
|
240
240
|
grid-column: span 2 / span 2;
|
|
241
241
|
grid-row: span 2 / span 2;
|
|
242
|
-
`),onClick:ce=>{ae>2||(ce.stopPropagation(),s==null||s(Y))},children:v==null?void 0:v(Y)},Y.id))})};return
|
|
242
|
+
`),onClick:ce=>{ae>2||(ce.stopPropagation(),s==null||s(Y))},children:v==null?void 0:v(Y)},Y.id))})};return t.jsxs(De,{data:r,itemIndex:d,parentIds:n,childrenLength:w==null?void 0:w.length,className:a.cx(a.css`
|
|
243
243
|
grid-row: span ${y};
|
|
244
244
|
grid-column: span ${T};
|
|
245
|
-
`,c),children:[
|
|
245
|
+
`,c),children:[t.jsx(h.motion.div,{whileTap:{scale:.9},className:a.cx($?"!scale-110":"",a.css`
|
|
246
246
|
cursor: pointer;
|
|
247
247
|
position: relative;
|
|
248
248
|
border-radius: 0.75rem;
|
|
@@ -257,7 +257,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
257
257
|
margin: 0 auto;
|
|
258
258
|
width: ${T*64+32*(T-1)}px;
|
|
259
259
|
height: ${y*64+32*(y-1)}px;
|
|
260
|
-
`),onClick:Y=>{!de&&!x&&(
|
|
260
|
+
`),onClick:Y=>{!de&&!x&&(r.parentIds=n,r.pageX=Y.pageX,r.pageY=Y.pageY,j(r))},...k(r,_!==!1),children:t.jsxs(h.motion.div,{className:a.css`
|
|
261
261
|
position: relative;
|
|
262
262
|
width: 100%;
|
|
263
263
|
height: 100%;
|
|
@@ -265,7 +265,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
265
265
|
justify-content: center;
|
|
266
266
|
align-items: center;
|
|
267
267
|
padding: 0.375rem;
|
|
268
|
-
`,children:[se(),
|
|
268
|
+
`,children:[se(),t.jsx(Pe.ReactSortable,{className:a.cx("sortable-group-item",a.css`
|
|
269
269
|
position: absolute;
|
|
270
270
|
cursor: pointer;
|
|
271
271
|
left: 0.375rem;
|
|
@@ -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:w??[],setList:Y=>l(Y,n),filter:()=>!0,"data-id":
|
|
279
|
+
`),group:{name:"nested",pull:!1,put:!0},animation:150,fallbackOnBody:!0,list:w??[],setList:Y=>l(Y,n),filter:()=>!0,"data-id":r.id,onChange:()=>{V(r.id)}})]})}),t.jsx(h.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
|
-
`,
|
|
301
|
+
`,Lr=f=>{const{data:r,onClose:c,onItemClick:n}=f,{list:d,setList:s,setListStatus:g,setMoveItemId:k,setMoveTargetId:l,updateItem:j}=pe(),{theme:x}=ue(),{light:N,dark:M}=le.getTheme(x),[V,X]=u.useState("文件夹"),v=[...(r==null?void 0:r.children)??[]];return u.useEffect(()=>{var m;r&&X((m=r.data)==null?void 0:m.name)},[r]),t.jsx(Ve,{visible:!!r,onClose:()=>{c()},animation:"zoom",maskAnimation:"fade",mousePosition:r!=null&&r.pageX&&(r!=null&&r.pageY)?{x:r==null?void 0:r.pageX,y:r==null?void 0:r.pageY}:null,title:t.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:V,onChange:m=>{X(m.target.value)},onBlur:()=>{
|
|
314
|
+
`,value:V,onChange:m=>{X(m.target.value)},onBlur:()=>{r&&j(r.id,{...r.data,name:V})}}),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;
|
|
@@ -334,18 +334,18 @@ React keys must be passed directly to JSX without using spread:
|
|
|
334
334
|
overflow: hidden;
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
|
-
`),width:600,destroyOnClose:!0,children:
|
|
337
|
+
`),width:600,destroyOnClose:!0,children:t.jsx("div",{className:a.css`
|
|
338
338
|
overflow-y: auto;
|
|
339
339
|
max-height: 60vh;
|
|
340
340
|
padding: 1.25rem 0;
|
|
341
|
-
`,onDragLeave:m=>{const _=m.relatedTarget;_&&(m.currentTarget.contains(_)||setTimeout(()=>{c()},500))},children:
|
|
341
|
+
`,onDragLeave:m=>{const _=m.relatedTarget;_&&(m.currentTarget.contains(_)||setTimeout(()=>{c()},500))},children:t.jsx(Pe.ReactSortable,{className:a.css`
|
|
342
342
|
display: grid;
|
|
343
343
|
gap: 1rem;
|
|
344
344
|
place-items: center;
|
|
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:(
|
|
348
|
+
`,group:{name:"nested",pull:!0,put:!1},animation:150,fallbackOnBody:!0,list:(r==null?void 0:r.children)??[],setList:m=>{var U,w;const _=m.map(B=>B.id),b=(w=(U=d.find(B=>B.id===(r==null?void 0:r.id)))==null?void 0:U.children)==null?void 0:w.map(B=>B.id);_.length===(b==null?void 0:b.length)&&_.every((B,O)=>B===b[O])||_.length<((b==null?void 0:b.length)??0)||s(m,[...(r==null?void 0:r.parentIds)??[],r==null?void 0:r.id])},onMove:()=>(l(null),g("onMove"),!0),onStart:m=>{const _=m.item.dataset;_!=null&&_.id&&k(_.id),g("onMove")},onEnd:()=>{k(null),l(null),g(null)},ghostClass:Qe,children:v.map((m,_)=>t.jsx(De,{data:m,itemIndex:_,onClick:n},m.id))})})})},Fr=f=>{var n;const{data:r,onClose:c}=f;return t.jsx(Ve,{visible:!!r,onClose:()=>{c()},animation:"zoom",maskAnimation:"fade",mousePosition:r!=null&&r.pageX&&(r!=null&&r.pageY)?{x:r==null?void 0:r.pageX,y:r==null?void 0:r.pageY}:null,footer:null,title:((n=r==null?void 0:r.data)==null?void 0:n.name)??"信息",children:r&&t.jsxs("div",{children:[t.jsx("div",{className:"mb-2",children:"开发者信息"}),t.jsx("div",{className:"p-2 rounded-md bg-[#272822]",children:t.jsx(xr,{src:r,theme:"monokai"})})]})})},zr=f=>{const{pagination:r={position:"bottom"},className:c,sliderProps:n,sliderRef:d,onItemClick:s}=f,g=u.useRef(null),k=u.useRef(null),{list:l,setList:j,setListStatus:x,showInfoItemData:N,setShowInfoItemData:M,openGroupItemData:V,setOpenGroupItemData:X,setMoveItemId:v,setMoveTargetId:m,addItem:_}=pe(),{pagingDotBuilder:b,pagingDotsBuilder:U,itemBuilder:w}=ue(),B=u.useMemo(()=>r===!1?{}:{top:a.css`
|
|
349
349
|
display: flex;
|
|
350
350
|
flex-direction: column;
|
|
351
351
|
.slick-list {
|
|
@@ -388,7 +388,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
388
388
|
flex-direction: column;
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
|
-
`}[
|
|
391
|
+
`}[r.position??"bottom"],[r]);return t.jsxs(t.Fragment,{children:[t.jsx(kr,{useCSS:!0,useTransform:!0,arrows:!1,ref:d??g,infinite:!1,dots:!0,touchMove:!1,lazyLoad:"anticipated",className:a.cx(B,a.css`
|
|
392
392
|
.slick-track {
|
|
393
393
|
display: flex;
|
|
394
394
|
align-items: stretch;
|
|
@@ -403,7 +403,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
403
403
|
width: 100%;
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
|
-
`,c),customPaging:O=>{var y,T;return b?b(l[O],O):
|
|
406
|
+
`,c),customPaging:O=>{var y,T;return b?b(l[O],O):t.jsx("div",{onDragEnter:()=>{var K;(K=(d??g).current)==null||K.slickGoTo(O)},children:(T=(y=l[O])==null?void 0:y.data)==null?void 0:T.name})},appendDots:O=>U?U(O):r===!1?t.jsx("div",{}):t.jsx("div",{children:t.jsx("ul",{ref:k,className:a.cx("slick-dots-default",a.css`
|
|
407
407
|
padding: 0.5rem;
|
|
408
408
|
display: inline-flex;
|
|
409
409
|
justify-content: center;
|
|
@@ -422,7 +422,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
422
422
|
width: auto;
|
|
423
423
|
height: auto;
|
|
424
424
|
}
|
|
425
|
-
`),children:O})}),...n,children:l.map(O=>
|
|
425
|
+
`),children:O})}),...n,children:l.map(O=>t.jsx("div",{onDrop:y=>{y.preventDefault();const T=y.dataTransfer.getData("text/plain");if(T!=="")try{_(JSON.parse(T),[O.id])}catch(K){console.log("drag error",K)}},onDragOver:y=>{y.preventDefault()},children:t.jsx(Pe.ReactSortable,{className:a.cx(a.css`
|
|
426
426
|
display: grid;
|
|
427
427
|
transition: all 0.3s;
|
|
428
428
|
grid-template-columns: repeat(auto-fill, 96px);
|
|
@@ -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:O.children??[],setList:y=>j(y,[O.id]),filter:".drag-disabled",onMove:y=>{x("onMove");const{dragged:T,related:K}=y,de=T.dataset,q=K.dataset;return m(null),!((Object.keys(q).length===0||q.parentIds)&&Number(de.childrenLength)>0&&K.classList.contains("sortable-group-item"))},onStart:y=>{const T=y.item.dataset;T!=null&&T.id&&v(T.id),x("onMove")},onEnd:()=>{v(null),m(null),x(null)},ghostClass:Qe,children:(O.children??[]).map((y,T)=>{let K;if(w)return w(y);switch(y.type){case"group":case"app":K=
|
|
434
|
+
`),animation:150,fallbackOnBody:!0,swapThreshold:.65,group:"nested",list:O.children??[],setList:y=>j(y,[O.id]),filter:".drag-disabled",onMove:y=>{x("onMove");const{dragged:T,related:K}=y,de=T.dataset,q=K.dataset;return m(null),!((Object.keys(q).length===0||q.parentIds)&&Number(de.childrenLength)>0&&K.classList.contains("sortable-group-item"))},onStart:y=>{const T=y.item.dataset;T!=null&&T.id&&v(T.id),x("onMove")},onEnd:()=>{v(null),m(null),x(null)},ghostClass:Qe,children:(O.children??[]).map((y,T)=>{let K;if(w)return w(y);switch(y.type){case"group":case"app":K=t.jsx(Br,{data:y,itemIndex:T,parentIds:[O.id,y.id],onClick:s},y.id);break;default:K=t.jsx(De,{data:y,itemIndex:T,onClick:s},y.id);break}return K})})},O.id))}),t.jsx(Fr,{data:N,onClose:()=>{M(null)}}),t.jsx(Lr,{data:V,onClose:()=>{X(null)},onItemClick:s})]})},Yr=f=>{const{list:r,onChange:c,storageKey:n,enableCaching:d,theme:s,noLetters:g,contextMenu:k,contextMenuBuilder:l,itemBuilder:j,itemIconBuilder:x,pagingDotBuilder:N,pagingDotsBuilder:M,...V}=f,X={list:r,onChange:c,storageKey:n,enableCaching:d},v={theme:s,noLetters:g,contextMenu:k,pagingDotsBuilder:M,pagingDotBuilder:N,itemBuilder:j,itemIconBuilder:x,contextMenuBuilder:l};return t.jsx(Mr,{...X,children:t.jsx(_r,{...v,children:t.jsx(zr,{...V})})})},Wr={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:"删除图片"}},Vr=(f,r,c)=>{const d=f.split(".").reduce((s,g)=>typeof s=="string"?s:s[g],Wr);return typeof d!="string"?r:c?d.replace(/{{(.*?)}}/g,(s,g)=>c[g]):d},Xr=a.css`
|
|
435
435
|
[class*="_toolbarRoot"] {
|
|
436
436
|
flex-wrap: wrap;
|
|
437
437
|
}
|
|
@@ -500,7 +500,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
500
500
|
margin-bottom: 0;
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
`,
|
|
503
|
+
`,er=a.cx("markdown-body",a.css`
|
|
504
504
|
p {
|
|
505
505
|
margin-bottom: 8px;
|
|
506
506
|
}
|
|
@@ -520,4 +520,4 @@ React keys must be passed directly to JSX without using spread:
|
|
|
520
520
|
margin: 0 !important;
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
`),Ut={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}},Gt=f=>{const{children:t="",className:c}=f;return r.jsx(wt,{className:a.cx(et,c),remarkPlugins:[yt,Ct],rehypePlugins:[St],components:{code(n){const{children:d,className:s,node:g,ref:k,...l}=n,j=/language-(\w+)/.exec(s||"");return j?r.jsx(jt.Prism,{...l,PreTag:"div",children:String(d).replace(/\n$/,""),language:j[1],style:Ut}):r.jsx("code",{...l,className:s,children:d})}},children:t})},tt=f=>{const{value:t,onChange:c,translation:n,pluginConfig:d,...s}=f,g=u.useRef(null),{image:k,diffSource:l={viewMode:"rich-text"},headings:j,link:x,codeBlock:N,codeMirror:M={codeBlockLanguages:{js:"JavaScript",css:"CSS",txt:"Plain Text",tsx:"TypeScript","":"Unspecified"}},directives:V={directiveDescriptors:[C.AdmonitionDirectiveDescriptor]}}=d??{},[X,v]=u.useState("");return u.useEffect(()=>{var m;t!==void 0&&g.current&&((m=g.current)==null||m.setMarkdown(t),v(t))},[t,g]),r.jsx(C.MDXEditor,{ref:g,className:Xt,contentEditableClassName:et,markdown:X,onChange:m=>{!t&&!c&&v(m),c&&c(m)},translation:n??Vt,plugins:[C.toolbarPlugin({toolbarContents:()=>r.jsxs(C.DiffSourceToggleWrapper,{options:["rich-text","source"],children:[r.jsx(C.UndoRedo,{}),r.jsx(C.Separator,{}),r.jsx(C.BoldItalicUnderlineToggles,{}),r.jsx(C.CodeToggle,{}),r.jsx(C.Separator,{}),r.jsx(C.StrikeThroughSupSubToggles,{}),r.jsx(C.Separator,{}),r.jsx(C.ListsToggle,{}),r.jsx(C.Separator,{}),r.jsx(C.CreateLink,{}),r.jsx(C.InsertImage,{}),r.jsx(C.Separator,{}),r.jsx(C.InsertTable,{}),r.jsx(C.InsertThematicBreak,{}),r.jsx(C.Separator,{}),r.jsx(C.InsertCodeBlock,{}),r.jsx(C.Separator,{}),r.jsx(C.InsertFrontmatter,{})]})}),C.diffSourcePlugin(l),C.listsPlugin(),C.quotePlugin(),C.headingsPlugin(j),C.linkPlugin(x),C.linkDialogPlugin(),C.imagePlugin(k),C.tablePlugin(),C.thematicBreakPlugin(),C.frontmatterPlugin(),C.codeBlockPlugin(N),C.codeMirrorPlugin(M),C.markdownShortcutPlugin(),C.directivesPlugin(V)],...s})};tt.Preview=Gt;function rt(...f){return It.twMerge(Tt.clsx(f))}const Ht=f=>{const{mouseX:t,title:c,icon:n,href:d}=f,s=u.useRef(null),g=h.useTransform(t,_=>{var U;const b=((U=s.current)==null?void 0:U.getBoundingClientRect())??{x:0,width:0};return _-b.x-b.width/2}),k=h.useTransform(g,[-150,0,150],[40,80,40]),l=h.useTransform(g,[-150,0,150],[40,80,40]),j=h.useTransform(g,[-150,0,150],[20,40,20]),x=h.useTransform(g,[-150,0,150],[20,40,20]),N=h.useSpring(k,{mass:.1,stiffness:150,damping:12}),M=h.useSpring(l,{mass:.1,stiffness:150,damping:12}),V=h.useSpring(j,{mass:.1,stiffness:150,damping:12}),X=h.useSpring(x,{mass:.1,stiffness:150,damping:12}),[v,m]=u.useState(!1);return r.jsx("a",{href:d,children:r.jsxs(h.motion.div,{ref:s,style:{width:N,height:M},onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),className:"aspect-square rounded-full bg-gray-200 dark:bg-neutral-800 flex items-center justify-center relative",children:[r.jsx(h.AnimatePresence,{children:v&&r.jsx(h.motion.div,{initial:{opacity:0,y:10,x:"-50%"},animate:{opacity:1,y:0,x:"-50%"},exit:{opacity:0,y:2,x:"-50%"},className:"px-2 py-0.5 whitespace-pre rounded-md bg-gray-100 border dark:bg-neutral-800 dark:border-neutral-900 dark:text-white border-gray-200 text-neutral-700 absolute left-1/2 -translate-x-1/2 -top-8 w-fit text-xs",children:c})}),r.jsx(h.motion.div,{style:{width:V,height:X},className:"flex items-center justify-center",children:n})]})})},ot=f=>{const{items:t,className:c}=f,n=h.useMotionValue(1/0);return r.jsx(h.motion.div,{onMouseMove:d=>n.set(d.pageX),onMouseLeave:()=>n.set(1/0),className:rt("mx-auto hidden md:flex h-16 gap-4 items-end rounded-2xl bg-gray-50 dark:bg-neutral-900 px-4 pb-3",c),children:t.map(d=>r.jsx(Ht,{mouseX:n,...d},d.title))})},nt=f=>{const{items:t,className:c,collapseIcon:n,autoHidden:d=!1}=f,[s,g]=u.useState(!1),k=()=>{g(!s)};return r.jsxs("div",{className:rt("relative block",d?"md:hidden":"",c),children:[r.jsx(h.AnimatePresence,{children:s&&r.jsx(h.motion.div,{layoutId:"nav",className:"absolute bottom-full mb-2 inset-x-0 flex flex-col gap-2",children:t.map((l,j)=>r.jsx(h.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10,transition:{delay:j*.05}},transition:{delay:(t.length-1-j)*.05},children:r.jsx("a",{href:l.href,className:"h-10 w-10 rounded-full bg-gray-50 dark:bg-neutral-900 flex items-center justify-center",children:r.jsx("div",{className:"h-4 w-4",children:l.icon})},l.title)},l.title))})}),r.jsx("button",{onClick:k,className:"h-10 w-10 rounded-full bg-gray-50 dark:bg-neutral-800 flex items-center justify-center",children:n||r.jsx(ke.RiMoreLine,{className:"h-5 w-5 text-neutral-500 dark:text-neutral-400"})})]})},Me=f=>{const{items:t,desktopClassName:c,mobileClassName:n,...d}=f;return r.jsxs(r.Fragment,{children:[r.jsx(ot,{items:t,className:c,...d}),r.jsx(nt,{items:t,className:n,autoHidden:!0,...d})]})};Me.Desktop=ot,Me.Mobile=nt,E.Desktop=Yt,E.Dock=Me,E.MdEditor=tt,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
|
|
523
|
+
`),Ur={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}},Gr=f=>{const{children:r="",className:c}=f;return t.jsx(wr,{className:a.cx(er,c),remarkPlugins:[yr,Cr],rehypePlugins:[Sr],components:{code(n){const{children:d,className:s,node:g,ref:k,...l}=n,j=/language-(\w+)/.exec(s||"");return j?t.jsx(jr.Prism,{...l,PreTag:"div",children:String(d).replace(/\n$/,""),language:j[1],style:Ur}):t.jsx("code",{...l,className:s,children:d})}},children:r})},rr=f=>{const{value:r,onChange:c,translation:n,pluginConfig:d,...s}=f,g=u.useRef(null),{image:k,diffSource:l={viewMode:"rich-text"},headings:j,link:x,codeBlock:N,codeMirror:M={codeBlockLanguages:{js:"JavaScript",css:"CSS",txt:"Plain Text",tsx:"TypeScript","":"Unspecified"}},directives:V={directiveDescriptors:[C.AdmonitionDirectiveDescriptor]}}=d??{},[X,v]=u.useState("");return u.useEffect(()=>{var m;r!==void 0&&g.current&&((m=g.current)==null||m.setMarkdown(r),v(r))},[r,g]),t.jsx(C.MDXEditor,{ref:g,className:Xr,contentEditableClassName:er,markdown:X,onChange:m=>{!r&&!c&&v(m),c&&c(m)},translation:n??Vr,plugins:[C.toolbarPlugin({toolbarContents:()=>t.jsxs(C.DiffSourceToggleWrapper,{options:["rich-text","source"],children:[t.jsx(C.UndoRedo,{}),t.jsx(C.Separator,{}),t.jsx(C.BoldItalicUnderlineToggles,{}),t.jsx(C.CodeToggle,{}),t.jsx(C.Separator,{}),t.jsx(C.StrikeThroughSupSubToggles,{}),t.jsx(C.Separator,{}),t.jsx(C.ListsToggle,{}),t.jsx(C.Separator,{}),t.jsx(C.CreateLink,{}),t.jsx(C.InsertImage,{}),t.jsx(C.Separator,{}),t.jsx(C.InsertTable,{}),t.jsx(C.InsertThematicBreak,{}),t.jsx(C.Separator,{}),t.jsx(C.InsertCodeBlock,{}),t.jsx(C.Separator,{}),t.jsx(C.InsertFrontmatter,{})]})}),C.diffSourcePlugin(l),C.listsPlugin(),C.quotePlugin(),C.headingsPlugin(j),C.linkPlugin(x),C.linkDialogPlugin(),C.imagePlugin(k),C.tablePlugin(),C.thematicBreakPlugin(),C.frontmatterPlugin(),C.codeBlockPlugin(N),C.codeMirrorPlugin(M),C.markdownShortcutPlugin(),C.directivesPlugin(V)],...s})};rr.Preview=Gr;function tr(...f){return Ir.twMerge(Tr.clsx(f))}const Hr=f=>{const{mouseX:r,title:c,icon:n,href:d}=f,s=u.useRef(null),g=h.useTransform(r,_=>{var U;const b=((U=s.current)==null?void 0:U.getBoundingClientRect())??{x:0,width:0};return _-b.x-b.width/2}),k=h.useTransform(g,[-150,0,150],[40,80,40]),l=h.useTransform(g,[-150,0,150],[40,80,40]),j=h.useTransform(g,[-150,0,150],[20,40,20]),x=h.useTransform(g,[-150,0,150],[20,40,20]),N=h.useSpring(k,{mass:.1,stiffness:150,damping:12}),M=h.useSpring(l,{mass:.1,stiffness:150,damping:12}),V=h.useSpring(j,{mass:.1,stiffness:150,damping:12}),X=h.useSpring(x,{mass:.1,stiffness:150,damping:12}),[v,m]=u.useState(!1);return t.jsx("a",{href:d,children:t.jsxs(h.motion.div,{ref:s,style:{width:N,height:M},onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),className:"aspect-square rounded-full bg-gray-200 dark:bg-neutral-800 flex items-center justify-center relative",children:[t.jsx(h.AnimatePresence,{children:v&&t.jsx(h.motion.div,{initial:{opacity:0,y:10,x:"-50%"},animate:{opacity:1,y:0,x:"-50%"},exit:{opacity:0,y:2,x:"-50%"},className:"px-2 py-0.5 whitespace-pre rounded-md bg-gray-100 border dark:bg-neutral-800 dark:border-neutral-900 dark:text-white border-gray-200 text-neutral-700 absolute left-1/2 -translate-x-1/2 -top-8 w-fit text-xs",children:c})}),t.jsx(h.motion.div,{style:{width:V,height:X},className:"flex items-center justify-center",children:n})]})})},or=f=>{const{items:r,className:c}=f,n=h.useMotionValue(1/0);return t.jsx(h.motion.div,{onMouseMove:d=>n.set(d.pageX),onMouseLeave:()=>n.set(1/0),className:tr("mx-auto hidden md:flex h-16 gap-4 items-end rounded-2xl bg-gray-50 dark:bg-neutral-900 px-4 pb-3",c),children:r.map(d=>t.jsx(Hr,{mouseX:n,...d},d.title))})},nr=f=>{const{items:r,className:c,collapseIcon:n,autoHidden:d=!1}=f,[s,g]=u.useState(!1),k=()=>{g(!s)};return t.jsxs("div",{className:tr("relative block",d?"md:hidden":"",c),children:[t.jsx(h.AnimatePresence,{children:s&&t.jsx(h.motion.div,{layoutId:"nav",className:"absolute bottom-full mb-2 inset-x-0 flex flex-col gap-2",children:r.map((l,j)=>t.jsx(h.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10,transition:{delay:j*.05}},transition:{delay:(r.length-1-j)*.05},children:t.jsx("a",{href:l.href,className:"h-10 w-10 rounded-full bg-gray-50 dark:bg-neutral-900 flex items-center justify-center",children:t.jsx("div",{className:"h-4 w-4",children:l.icon})},l.title)},l.title))})}),t.jsx("button",{onClick:k,className:"h-10 w-10 rounded-full bg-gray-50 dark:bg-neutral-800 flex items-center justify-center",children:n||t.jsx(ke.RiMoreLine,{className:"h-5 w-5 text-neutral-500 dark:text-neutral-400"})})]})},Me=f=>{const{items:r,desktopClassName:c,mobileClassName:n,...d}=f;return t.jsxs(t.Fragment,{children:[t.jsx(or,{items:r,className:c,...d}),t.jsx(nr,{items:r,className:n,autoHidden:!0,...d})]})};Me.Desktop=or,Me.Mobile=nr,E.Desktop=Yr,E.Dock=Me,E.MdEditor=rr,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
|