zs_library 0.3.13 → 0.3.14
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/README.md +4 -0
- package/dist/components/{Desktop → desktop}/context/config/context.d.ts +3 -3
- package/dist/components/{Desktop → desktop}/index.d.ts +2 -2
- package/dist/components/{Desktop/Items/GroupItem.d.ts → desktop/items/group-item.d.ts} +1 -1
- package/dist/components/{Desktop/Sortable.d.ts → desktop/sortable.d.ts} +2 -2
- package/dist/components/dock/dock-desktop.d.ts +8 -0
- package/dist/components/dock/dock-mobile.d.ts +10 -0
- package/dist/components/dock/index.d.ts +18 -0
- package/dist/components/dock/utils.d.ts +2 -0
- package/dist/components/index.d.ts +3 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +1102 -943
- package/dist/index.umd.js +97 -97
- package/dist/zs_library.css +1 -0
- package/package.json +114 -116
- package/dist/components/Editor/components/BlockTools/MediaAndEmbed/Image/index.d.ts +0 -146
- package/dist/components/Editor/components/BlockTools/MediaAndEmbed/Image/types/types.d.ts +0 -172
- package/dist/components/Editor/components/BlockTools/MediaAndEmbed/Image/ui.d.ts +0 -132
- package/dist/components/Editor/components/BlockTools/MediaAndEmbed/Image/uploader.d.ts +0 -60
- package/dist/components/Editor/components/BlockTools/MediaAndEmbed/Image/utils/dom.d.ts +0 -10
- package/dist/components/Editor/components/BlockTools/MediaAndEmbed/Image/utils/isPromise.d.ts +0 -7
- package/dist/components/Editor/components/BlockTools/TextAndTypography/Alert/index.d.ts +0 -238
- package/dist/components/Editor/components/BlockTools/TextAndTypography/Delimiter/index.d.ts +0 -270
- package/dist/components/Editor/components/BlockTools/TextAndTypography/Header/index.d.ts +0 -249
- package/dist/components/Editor/components/BlockTools/TextAndTypography/Paragraph/index.d.ts +0 -189
- package/dist/components/Editor/components/BlockTools/TextAndTypography/Paragraph/utils/makeFragment.d.ts +0 -7
- package/dist/components/Editor/components/BlockTools/TextAndTypography/Quote/index.d.ts +0 -282
- package/dist/components/Editor/components/BlockTuneTools/Delete/index.d.ts +0 -33
- package/dist/components/Editor/components/BlockTuneTools/MoveDown/index.d.ts +0 -37
- package/dist/components/Editor/components/BlockTuneTools/MoveUp/index.d.ts +0 -37
- package/dist/components/Editor/index.d.ts +0 -9
- package/dist/style.css +0 -1
- /package/dist/components/{Desktop → desktop}/config.d.ts +0 -0
- /package/dist/components/{Desktop → desktop}/context/config/hooks.d.ts +0 -0
- /package/dist/components/{Desktop → desktop}/context/state/context.d.ts +0 -0
- /package/dist/components/{Desktop → desktop}/context/state/hooks.d.ts +0 -0
- /package/dist/components/{Desktop/ContextMenu → desktop/context-menu}/index.d.ts +0 -0
- /package/dist/components/{Desktop/Items/Modal/GroupItemModal.d.ts → desktop/items/modal/group-item-modal.d.ts} +0 -0
- /package/dist/components/{Desktop/Items/Modal/InfoModal.d.ts → desktop/items/modal/info-modal.d.ts} +0 -0
- /package/dist/components/{Desktop/Items/SortableItem.d.ts → desktop/items/sortable-item.d.ts} +0 -0
- /package/dist/components/{Desktop → desktop}/style.d.ts +0 -0
- /package/dist/components/{Desktop → desktop}/theme.d.ts +0 -0
- /package/dist/components/{Desktop → desktop}/types.d.ts +0 -0
- /package/dist/components/{Desktop → desktop}/utils.d.ts +0 -0
- /package/dist/components/{MdEditor → md-editor}/i18n/index.d.ts +0 -0
- /package/dist/components/{MdEditor → md-editor}/i18n/zh_CN.d.ts +0 -0
- /package/dist/components/{MdEditor → md-editor}/index.d.ts +0 -0
- /package/dist/components/{MdEditor → md-editor}/preview.d.ts +0 -0
- /package/dist/components/{MdEditor → md-editor}/style.d.ts +0 -0
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
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,kt,Pe,h,Ye,We,vt,ke,Ve,xt,C,wt,yt,Ct,St,jt,Tt,It){"use strict";var hr=Object.defineProperty;var br=(E,u,a)=>u in E?hr(E,u,{enumerable:!0,configurable:!0,writable:!0,value:a}):E[u]=a;var ze=(E,u,a)=>br(E,typeof u!="symbol"?u+"":u,a);require("./style.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
|
|
9
|
+
*/var Xe;function Rt(){if(Xe)return ve;Xe=1;var f=u,t=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:t,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,24 +14,24 @@
|
|
|
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
|
|
19
|
-
`),ee=
|
|
20
|
-
`),
|
|
21
|
-
`+
|
|
17
|
+
*/var Ue;function Et(){return Ue||(Ue=1,process.env.NODE_ENV!=="production"&&function(){var f=u,t=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(re){p=re}Reflect.construct(e,[],R)}else{try{R.call()}catch(re){p=re}e.call(R.prototype)}}else{try{throw Error()}catch(re){p=re}e()}}catch(re){if(re&&p&&typeof re.stack=="string"){for(var S=re.stack.split(`
|
|
19
|
+
`),ee=p.stack.split(`
|
|
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 te(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 te(e.type,o,i);case M:{var p=e,D=p._payload,F=p._init;try{return te(F(D),o,i)}catch{}}}return""}var ge=Object.prototype.hasOwnProperty,at={},it=_.ReactDebugCurrentFrame;function Ee(e){if(e){var o=e._owner,i=te(e.type,e._source,o?o.type:null);it.setExtraStackFrame(i)}else it.setExtraStackFrame(null)}function Jt(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 at)&&(at[S.message]=!0,Ee(D),b("Failed %s type: %s",i,S.message),Ee(null))}}}var Kt=Array.isArray;function Ne(e){return Kt(e)}function $t(e){{var o=typeof Symbol=="function"&&Symbol.toStringTag,i=o&&e[Symbol.toStringTag]||e.constructor.name||"Object";return i}}function qt(e){try{return lt(e),!1}catch{return!0}}function lt(e){return""+e}function st(e){if(qt(e))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",$t(e)),lt(e)}var we=_.ReactCurrentOwner,Zt={key:!0,ref:!0,__self:!0,__source:!0},ct,dt,Oe;Oe={};function Qt(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 er(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 tr(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 rr(e,o){{var i=function(){ct||(ct=!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 or(e,o){{var i=function(){dt||(dt=!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 nr=function(e,o,i,p,D,F,R){var S={$$typeof:t,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 ar(e,o,i,p,D){{var F,R={},S=null,ee=null;i!==void 0&&(st(i),S=""+i),er(o)&&(st(o.key),S=""+o.key),Qt(o)&&(ee=o.ref,tr(o,D));for(F in o)ge.call(o,F)&&!Zt.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&&rr(R,H),ee&&or(R,H)}return nr(e,S,ee,D,p,we.current,R)}}var Ae=_.ReactCurrentOwner,ut=_.ReactDebugCurrentFrame;function he(e){if(e){var o=e._owner,i=te(e.type,e._source,o?o.type:null);ut.setExtraStackFrame(i)}else ut.setExtraStackFrame(null)}var Be;Be=!1;function Le(e){return typeof e=="object"&&e!==null&&e.$$typeof===t}function gt(){{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 ir(e){return""}var mt={};function lr(e){{var o=gt();if(!o){var i=typeof e=="string"?e:e.displayName||e.name;i&&(o=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+i+">.")}return o}}function pt(e,o){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var i=lr(o);if(mt[i])return;mt[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 ft(e,o){{if(typeof e!="object")return;if(Ne(e))for(var i=0;i<e.length;i++){var p=e[i];Le(p)&&pt(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)&&pt(R.value,o)}}}function sr(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);Jt(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 cr(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 ht={};function bt(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=ir();ee?S+=ee:S+=gt();var G;e===null?G="null":Ne(e)?G="array":e!==void 0&&e.$$typeof===t?(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=ar(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++)ft(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 ft(ie,e)}if(ge.call(o,"key")){var me=$(e),re=Object.keys(o).filter(function(fr){return fr!=="key"}),Fe=re.length>0?"{key: someKey, "+re.join(": ..., ")+": ...}":"{key: someKey}";if(!ht[me+Fe]){var pr=re.length>0?"{"+re.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} />`,
|
|
30
|
+
<%s key={someKey} {...props} />`,Fe,me,pr,me),ht[me+Fe]=!0}}return e===n?cr(H):sr(H),H}}function dr(e,o,i){return bt(e,o,i,!0)}function ur(e,o,i){return bt(e,o,i,!1)}var gr=ur,mr=dr;xe.Fragment=n,xe.jsx=gr,xe.jsxs=mr}()),xe}var Ge;function Pt(){return Ge||(Ge=1,process.env.NODE_ENV==="production"?ye.exports=Rt():ye.exports=Et()),ye.exports}var r=Pt();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({}),_t=f=>{const{children:t,theme:c,...n}=f,d=u.useMemo(()=>c==="light"?He:c==="dark"?Je:c,[c]);return r.jsx(Ke.Provider,{value:{theme:d,...n},children:t})},ue=()=>u.useContext(Ke),$e={maxRow:2,maxCol:2},Dt={...$e},qe={app:$e,group:Dt};class le{}ze(le,"uniqueArray",t=>t.reduce((c,n)=>c.find(s=>s.id===n.id)?c:c.concat([n]),[])),ze(le,"getTheme",t=>{const c=He.token,n=Je.token,d={...c,...t==null?void 0:t.token},s={...n,...t==null?void 0:t.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:()=>{}}),Mt=f=>{const{children:t,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(te=>te.id===A),ne=I.findIndex(te=>te.id===A);if(Z.length&&J){if(((Ie=J.children)==null?void 0:Ie.filter(te=>!P.some(ge=>ge.id===te.id)).length)===1&&P.length===1){const te={...P[0]};return I.splice(ne,1,te),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 te={...J};return J.data={name:"文件夹"},J.type="group",J.children=[te,...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}),r.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:t})},pe=()=>u.useContext(Ze),Nt={menuShow:{opacity:1,y:0,transition:{type:"spring",stiffness:300,damping:24}},menuHide:{opacity:0,y:20,transition:{duration:.2}}},_e=f=>{const{icon:t,title:c,onClick:n}=f,{theme:d}=ue(),{light:s,dark:g}=le.getTheme(d);return r.jsx(h.motion.div,{className:a.css`
|
|
31
31
|
&:hover {
|
|
32
32
|
background-color: ${s.contextMenuActiveColor};
|
|
33
33
|
@media (prefers-color-scheme: dark) {
|
|
34
|
-
background-color: ${
|
|
34
|
+
background-color: ${g.contextMenuActiveColor};
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
@media (prefers-color-scheme: dark) {
|
|
@@ -43,35 +43,35 @@ 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:
|
|
46
|
+
`,onClick:k=>{k.stopPropagation(),n==null||n()},variants:Nt,children:r.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:[r.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:t}),r.jsx(h.motion.div,{children:c})]})})},Ot=f=>{const{showInfoButton:t=!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 r.jsx(h.AnimatePresence,{children:l&&r.jsxs(h.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onMouseDown:w=>{w.stopPropagation(),w.preventDefault()},children:[r.jsx(h.motion.div,{className:a.cx(a.css`
|
|
57
57
|
border-radius: 0.5rem;
|
|
58
58
|
overflow: hidden;
|
|
59
|
-
background-color: ${
|
|
60
|
-
box-shadow: 0 0 0.5rem ${
|
|
59
|
+
background-color: ${v.contextMenuBackgroundColor};
|
|
60
|
+
box-shadow: 0 0 0.5rem ${v.contextMenuShadowColor};
|
|
61
61
|
@media (prefers-color-scheme: dark) {
|
|
62
|
-
background-color: ${
|
|
63
|
-
box-shadow: 0 0 0.5rem ${
|
|
62
|
+
background-color: ${m.contextMenuBackgroundColor};
|
|
63
|
+
box-shadow: 0 0 0.5rem ${m.contextMenuShadowColor};
|
|
64
64
|
}
|
|
65
|
-
`),children:
|
|
65
|
+
`),children:d&&b.allowResize!==!1&&r.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:r.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=>r.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:[r.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:[
|
|
82
|
+
`,children:[w.icon," ",w.label]}),r.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:
|
|
86
|
+
`,children:w.items.map(B=>r.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;
|
|
@@ -94,27 +94,27 @@ React keys must be passed directly to JSX without using spread:
|
|
|
94
94
|
line-height: 1.25rem;
|
|
95
95
|
cursor: pointer;
|
|
96
96
|
text-align: center;
|
|
97
|
-
color: ${
|
|
97
|
+
color: ${v.contextMenuTextColor};
|
|
98
98
|
@media (prefers-color-scheme: dark) {
|
|
99
|
-
color: ${
|
|
99
|
+
color: ${m.contextMenuTextColor};
|
|
100
100
|
}
|
|
101
101
|
&:hover {
|
|
102
|
-
background-color: ${
|
|
102
|
+
background-color: ${v.contextMenuActiveColor};
|
|
103
103
|
@media (prefers-color-scheme: dark) {
|
|
104
|
-
background-color: ${
|
|
104
|
+
background-color: ${m.contextMenuActiveColor};
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
`,`${
|
|
108
|
-
background-color: ${
|
|
107
|
+
`,`${b.row}x${b.col}`===B.key&&a.css`
|
|
108
|
+
background-color: ${v.contextMenuActiveColor};
|
|
109
109
|
@media (prefers-color-scheme: dark) {
|
|
110
|
-
background-color: ${
|
|
110
|
+
background-color: ${m.contextMenuActiveColor};
|
|
111
111
|
}
|
|
112
|
-
`),onClick:
|
|
113
|
-
background-color: ${
|
|
114
|
-
box-shadow: 0 0 0.5rem ${
|
|
112
|
+
`),onClick:B.onClick,children:B.label},B.key))})]},w.key))})}),r.jsxs(h.motion.div,{className:a.cx(a.css`
|
|
113
|
+
background-color: ${v.contextMenuBackgroundColor};
|
|
114
|
+
box-shadow: 0 0 0.5rem ${v.contextMenuShadowColor};
|
|
115
115
|
@media (prefers-color-scheme: dark) {
|
|
116
|
-
background-color: ${
|
|
117
|
-
box-shadow: 0 0 0.5rem ${
|
|
116
|
+
background-color: ${m.contextMenuBackgroundColor};
|
|
117
|
+
box-shadow: 0 0 0.5rem ${m.contextMenuShadowColor};
|
|
118
118
|
}
|
|
119
119
|
display: flex;
|
|
120
120
|
justify-content: space-around;
|
|
@@ -123,12 +123,12 @@ 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:[
|
|
126
|
+
`),children:[n&&r.jsx(_e,{icon:r.jsx(ke.RiShareLine,{size:20}),title:"分享",onClick:()=>{if(g){g(l.data);return}}}),t&&r.jsx(_e,{icon:r.jsx(ke.RiInformationLine,{size:20}),title:"信息",onClick:()=>{if(s){s(l.data);return}N({...l.data,pageX:l.pageX,pageY:l.pageY}),x()}}),c&&r.jsx(_e,{icon:r.jsx(ke.RiCloseCircleLine,{size:20}),title:"移除",onClick:()=>{if(k){k(l.data,M);return}j(null),M(l.data.id)}})]})]})})},At=f=>{const{data:t,noLetters:c=!1}=f,{contextMenuFuns:n}=pe(),{itemIconBuilder:d,theme:s,contextMenu:g}=ue(),{light:k,dark:l}=le.getTheme(s),{data:j={}}=t,{name:x}=j;return r.jsxs(r.Fragment,{children:[r.jsx(h.motion.div,{className:a.css`
|
|
127
127
|
width: 4rem;
|
|
128
128
|
height: 4rem;
|
|
129
|
-
background-color: ${
|
|
129
|
+
background-color: ${k.itemIconBackgroundColor};
|
|
130
130
|
border-radius: 0.75rem;
|
|
131
|
-
box-shadow: 0 0 0.5rem ${
|
|
131
|
+
box-shadow: 0 0 0.5rem ${k.itemIconShadowColor};
|
|
132
132
|
cursor: pointer;
|
|
133
133
|
position: relative;
|
|
134
134
|
overflow: hidden;
|
|
@@ -136,69 +136,69 @@ 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:r.jsx("div",{className:a.css`
|
|
140
140
|
position: absolute;
|
|
141
141
|
left: 0;
|
|
142
142
|
top: 0;
|
|
143
143
|
width: 100%;
|
|
144
144
|
height: 100%;
|
|
145
|
-
color: ${
|
|
145
|
+
color: ${k.itemNameColor};
|
|
146
146
|
@media (prefers-color-scheme: dark) {
|
|
147
147
|
color: ${l.itemNameColor};
|
|
148
148
|
}
|
|
149
|
-
`,...
|
|
149
|
+
`,...n(t,g!==!1),children:d==null?void 0:d(t)})}),r.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;
|
|
153
|
-
color: ${
|
|
153
|
+
color: ${k.itemNameColor};
|
|
154
154
|
@media (prefers-color-scheme: dark) {
|
|
155
155
|
color: ${l.itemNameColor};
|
|
156
156
|
}
|
|
157
|
-
`,c&&
|
|
157
|
+
`,c&&a.css`
|
|
158
158
|
color: transparent;
|
|
159
|
-
`),children:
|
|
159
|
+
`),children:x})]})},De=f=>{const{data:t,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 r.jsx(vt,{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:r.jsx(Ot,{...N}),visible:(j==null?void 0:j.data.id)===t.id,onVisibleChange:M=>{M||x(null)},destroyTooltipOnHide:!0,children:r.jsx(h.motion.div,{"data-id":t.id,"data-index":n,"data-parent-ids":k==null?void 0:k.join(","),"data-children-length":l,onClick:()=>d==null?void 0:d(t),className:a.cx(s&&"drag-disabled",c),children:g??r.jsx(At,{...f})})})},Bt=f=>{const{data:t,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}=t,{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?[t]:[...w??[]].slice(0,9),fe=u.useMemo(()=>N===t.id.toString(),[t.id,N]),$=u.useMemo(()=>M===t.id,[t.id,M]),oe=a.css`
|
|
167
167
|
overflow: hidden;
|
|
168
168
|
cursor: pointer;
|
|
169
|
-
background-color: ${
|
|
170
|
-
box-shadow: 0 0 0.5rem ${
|
|
169
|
+
background-color: ${b.itemIconBackgroundColor};
|
|
170
|
+
box-shadow: 0 0 0.5rem ${b.itemIconShadowColor};
|
|
171
171
|
@media (prefers-color-scheme: dark) {
|
|
172
|
-
background-color: ${
|
|
173
|
-
box-shadow: 0 0 0.5rem ${
|
|
172
|
+
background-color: ${U.itemIconBackgroundColor};
|
|
173
|
+
box-shadow: 0 0 0.5rem ${U.itemIconShadowColor};
|
|
174
174
|
}
|
|
175
|
-
`,se=()=>{if(
|
|
175
|
+
`,se=()=>{if(de)return r.jsx(h.motion.div,{className:a.cx("sortable-group-item",a.css`
|
|
176
176
|
overflow: hidden;
|
|
177
177
|
cursor: pointer;
|
|
178
178
|
width: 100%;
|
|
179
179
|
height: 100%;
|
|
180
|
-
background-color: ${
|
|
180
|
+
background-color: ${b.itemIconBackgroundColor};
|
|
181
181
|
position: absolute;
|
|
182
182
|
left: 0;
|
|
183
183
|
top: 0;
|
|
184
184
|
border-radius: 0.75rem;
|
|
185
185
|
@media (prefers-color-scheme: dark) {
|
|
186
|
-
background-color: ${
|
|
186
|
+
background-color: ${U.itemIconBackgroundColor};
|
|
187
187
|
}
|
|
188
|
-
`),onClick:Y=>{Y.stopPropagation(),s==null||s(
|
|
188
|
+
`),onClick:Y=>{Y.stopPropagation(),s==null||s(t)},children:v==null?void 0:v(t)});if(y===1&&T===1||y===2&&T===2)return r.jsx(h.motion.div,{className:a.css`
|
|
189
189
|
display: grid;
|
|
190
190
|
width: 100%;
|
|
191
191
|
height: 100%;
|
|
192
192
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
193
193
|
grid-template-rows: repeat(3, minmax(0, 1fr));
|
|
194
|
-
padding: ${
|
|
195
|
-
gap: ${
|
|
194
|
+
padding: ${T===1?"0.125rem":"0.25rem"};
|
|
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=>
|
|
198
|
-
border-radius: ${
|
|
197
|
+
`,children:q==null?void 0:q.slice(0,9).map(Y=>r.jsx(h.motion.div,{className:a.cx(oe,a.css`
|
|
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:
|
|
201
|
+
`),onClick:ae=>{ae.stopPropagation(),s==null||s(Y)},children:v==null?void 0:v(Y)},Y.id))});if(y===1&&T===2)return r.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,19 +207,19 @@ 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)=>r.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;
|
|
214
214
|
grid-column: span 4 / span 4;
|
|
215
215
|
grid-row: span 4 / span 4;
|
|
216
|
-
`:
|
|
216
|
+
`:a.css`
|
|
217
217
|
width: 1.5rem;
|
|
218
218
|
height: 1.5rem;
|
|
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:
|
|
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 r.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,36 +228,36 @@ 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)=>r.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;
|
|
235
235
|
grid-column: span 4 / span 4;
|
|
236
236
|
grid-row: span 4 / span 4;
|
|
237
|
-
`:
|
|
237
|
+
`:a.css`
|
|
238
238
|
width: 1.5rem;
|
|
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:
|
|
243
|
-
grid-row: span ${
|
|
244
|
-
grid-column: span ${
|
|
245
|
-
`,c),children:[
|
|
242
|
+
`),onClick:ce=>{ae>2||(ce.stopPropagation(),s==null||s(Y))},children:v==null?void 0:v(Y)},Y.id))})};return r.jsxs(De,{data:t,itemIndex:d,parentIds:n,childrenLength:w==null?void 0:w.length,className:a.cx(a.css`
|
|
243
|
+
grid-row: span ${y};
|
|
244
|
+
grid-column: span ${T};
|
|
245
|
+
`,c),children:[r.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;
|
|
249
|
-
background-color: ${
|
|
250
|
-
box-shadow: 0 0 0.5rem ${
|
|
249
|
+
background-color: ${b.groupItemIconBackgroundColor};
|
|
250
|
+
box-shadow: 0 0 0.5rem ${b.groupItemIconShadowColor};
|
|
251
251
|
@media (prefers-color-scheme: dark) {
|
|
252
|
-
background-color: ${
|
|
253
|
-
box-shadow: 0 0 0.5rem ${
|
|
252
|
+
background-color: ${U.groupItemIconBackgroundColor};
|
|
253
|
+
box-shadow: 0 0 0.5rem ${U.groupItemIconShadowColor};
|
|
254
254
|
}
|
|
255
255
|
/* overflow: hidden; */
|
|
256
256
|
transition: all 0.3s;
|
|
257
257
|
margin: 0 auto;
|
|
258
|
-
width: ${
|
|
259
|
-
height: ${
|
|
260
|
-
`),onClick:Y=>{!
|
|
258
|
+
width: ${T*64+32*(T-1)}px;
|
|
259
|
+
height: ${y*64+32*(y-1)}px;
|
|
260
|
+
`),onClick:Y=>{!de&&!x&&(t.parentIds=n,t.pageX=Y.pageX,t.pageY=Y.pageY,j(t))},...k(t,_!==!1),children:r.jsxs(h.motion.div,{className:a.css`
|
|
261
261
|
position: relative;
|
|
262
262
|
width: 100%;
|
|
263
263
|
height: 100%;
|
|
@@ -265,28 +265,28 @@ 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(),r.jsx(Pe.ReactSortable,{className:a.cx("sortable-group-item",a.css`
|
|
269
269
|
position: absolute;
|
|
270
270
|
cursor: pointer;
|
|
271
271
|
left: 0.375rem;
|
|
272
272
|
top: 0.375rem;
|
|
273
273
|
width: calc(100% - 0.75rem);
|
|
274
274
|
height: calc(100% - 0.75rem);
|
|
275
|
-
pointer-events: ${
|
|
275
|
+
pointer-events: ${X===null?"none":"auto"};
|
|
276
276
|
> * {
|
|
277
277
|
opacity: 0;
|
|
278
278
|
}
|
|
279
|
-
`),group:{name:"nested",pull:!1,put:!0},animation:150,fallbackOnBody:!0,list:
|
|
279
|
+
`),group:{name:"nested",pull:!1,put:!0},animation:150,fallbackOnBody:!0,list:w??[],setList:Y=>l(Y,n),filter:()=>!0,"data-id":t.id,onChange:()=>{V(t.id)}})]})}),r.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;
|
|
283
|
-
color: ${
|
|
283
|
+
color: ${b.itemNameColor};
|
|
284
284
|
@media (prefers-color-scheme: dark) {
|
|
285
|
-
color: ${
|
|
285
|
+
color: ${U.itemNameColor};
|
|
286
286
|
}
|
|
287
|
-
`,
|
|
287
|
+
`,g&&a.css`
|
|
288
288
|
color: transparent;
|
|
289
|
-
`),variants:
|
|
289
|
+
`),variants:K,animate:fe?"hidden":"visible",children:(B==null?void 0:B.name)??"文件夹"})]})},Qe=a.css`
|
|
290
290
|
padding: 8px;
|
|
291
291
|
transition: all 0.2s;
|
|
292
292
|
> div {
|
|
@@ -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
|
+
`,Lt=f=>{const{data:t,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=[...(t==null?void 0:t.children)??[]];return u.useEffect(()=>{var m;t&&X((m=t.data)==null?void 0:m.name)},[t]),r.jsx(Ve,{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:r.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:
|
|
314
|
+
`,value:V,onChange:m=>{X(m.target.value)},onBlur:()=>{t&&j(t.id,{...t.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;
|
|
@@ -326,26 +326,26 @@ React keys must be passed directly to JSX without using spread:
|
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
.rc-dialog-body {
|
|
329
|
-
background-color: ${
|
|
329
|
+
background-color: ${N.groupItemModalBackgroundColor};
|
|
330
330
|
@media (prefers-color-scheme: dark) {
|
|
331
|
-
background-color: ${
|
|
331
|
+
background-color: ${M.groupItemModalBackgroundColor};
|
|
332
332
|
}
|
|
333
333
|
border-radius: 0.5rem;
|
|
334
334
|
overflow: hidden;
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
|
-
`),width:600,destroyOnClose:!0,children:
|
|
337
|
+
`),width:600,destroyOnClose:!0,children:r.jsx("div",{className:a.css`
|
|
338
338
|
overflow-y: auto;
|
|
339
339
|
max-height: 60vh;
|
|
340
340
|
padding: 1.25rem 0;
|
|
341
|
-
`,onDragLeave:
|
|
341
|
+
`,onDragLeave:m=>{const _=m.relatedTarget;_&&(m.currentTarget.contains(_)||setTimeout(()=>{c()},500))},children:r.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:(t==null?void 0:t.children)??[],setList:m=>{var U,w;const _=m.map(B=>B.id),b=(w=(U=d.find(B=>B.id===(t==null?void 0:t.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,[...(t==null?void 0:t.parentIds)??[],t==null?void 0:t.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,_)=>r.jsx(De,{data:m,itemIndex:_,onClick:n},m.id))})})})},Ft=f=>{var n;const{data:t,onClose:c}=f;return r.jsx(Ve,{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:((n=t==null?void 0:t.data)==null?void 0:n.name)??"信息",children:t&&r.jsxs("div",{children:[r.jsx("div",{className:"mb-2",children:"开发者信息"}),r.jsx("div",{className:"p-2 rounded-md bg-[#272822]",children:r.jsx(xt,{src:t,theme:"monokai"})})]})})},zt=f=>{const{pagination:t={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(()=>t===!1?{}:{top:a.css`
|
|
349
349
|
display: flex;
|
|
350
350
|
flex-direction: column;
|
|
351
351
|
.slick-list {
|
|
@@ -354,11 +354,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
354
354
|
.slick-dots {
|
|
355
355
|
position: static;
|
|
356
356
|
}
|
|
357
|
-
`,bottom:
|
|
357
|
+
`,bottom:a.css`
|
|
358
358
|
.slick-dots {
|
|
359
359
|
position: static;
|
|
360
360
|
}
|
|
361
|
-
`,left:
|
|
361
|
+
`,left:a.css`
|
|
362
362
|
.slick-dots {
|
|
363
363
|
position: absolute;
|
|
364
364
|
width: auto;
|
|
@@ -373,7 +373,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
373
373
|
flex-direction: column;
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
|
-
`,right:
|
|
376
|
+
`,right:a.css`
|
|
377
377
|
.slick-dots {
|
|
378
378
|
position: absolute;
|
|
379
379
|
width: auto;
|
|
@@ -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
|
+
`}[t.position??"bottom"],[t]);return r.jsxs(r.Fragment,{children:[r.jsx(kt,{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:
|
|
406
|
+
`,c),customPaging:O=>{var y,T;return b?b(l[O],O):r.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):t===!1?r.jsx("div",{}):r.jsx("div",{children:r.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:
|
|
425
|
+
`),children:O})}),...n,children:l.map(O=>r.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:r.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:
|
|
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=r.jsx(Bt,{data:y,itemIndex:T,parentIds:[O.id,y.id],onClick:s},y.id);break;default:K=r.jsx(De,{data:y,itemIndex:T,onClick:s},y.id);break}return K})})},O.id))}),r.jsx(Ft,{data:N,onClose:()=>{M(null)}}),r.jsx(Lt,{data:V,onClose:()=>{X(null)},onItemClick:s})]})},Yt=f=>{const{list:t,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:t,onChange:c,storageKey:n,enableCaching:d},v={theme:s,noLetters:g,contextMenu:k,pagingDotsBuilder:M,pagingDotBuilder:N,itemBuilder:j,itemIconBuilder:x,contextMenuBuilder:l};return r.jsx(Mt,{...X,children:r.jsx(_t,{...v,children:r.jsx(zt,{...V})})})},Wt={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:"删除图片"}},Vt=(f,t,c)=>{const d=f.split(".").reduce((s,g)=>typeof s=="string"?s:s[g],Wt);return typeof d!="string"?t:c?d.replace(/{{(.*?)}}/g,(s,g)=>c[g]):d},Xt=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
|
+
`,et=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
|
-
`),Lo={'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%)"}},Fo=C=>{const{children:o="",className:c}=C;return t.jsx(bo,{className:n.cx(Ze,c),remarkPlugins:[ko,vo],rehypePlugins:[xo],components:{code(i){const{children:p,className:s,node:f,ref:b,...l}=i,E=/language-(\w+)/.exec(s||"");return E?t.jsx(wo.Prism,{...l,PreTag:"div",children:String(p).replace(/\n$/,""),language:E[1],style:Lo}):t.jsx("code",{...l,className:s,children:p})}},children:o})},Qe=C=>{const{value:o,onChange:c,translation:i,pluginConfig:p,...s}=C,f=d.useRef(null),{image:b,diffSource:l={viewMode:"rich-text"},headings:E,link:k,codeBlock:F,codeMirror:N={codeBlockLanguages:{js:"JavaScript",css:"CSS",txt:"Plain Text",tsx:"TypeScript","":"Unspecified"}},directives:X={directiveDescriptors:[w.AdmonitionDirectiveDescriptor]}}=p??{},[G,h]=d.useState("");return d.useEffect(()=>{var g;o!==void 0&&f.current&&((g=f.current)==null||g.setMarkdown(o),h(o))},[o,f]),t.jsx(w.MDXEditor,{ref:f,className:Bo,contentEditableClassName:Ze,markdown:G,onChange:g=>{!o&&!c&&h(g),c&&c(g)},translation:i??Ao,plugins:[w.toolbarPlugin({toolbarContents:()=>t.jsxs(w.DiffSourceToggleWrapper,{options:["rich-text","source"],children:[t.jsx(w.UndoRedo,{}),t.jsx(w.Separator,{}),t.jsx(w.BoldItalicUnderlineToggles,{}),t.jsx(w.CodeToggle,{}),t.jsx(w.Separator,{}),t.jsx(w.StrikeThroughSupSubToggles,{}),t.jsx(w.Separator,{}),t.jsx(w.ListsToggle,{}),t.jsx(w.Separator,{}),t.jsx(w.CreateLink,{}),t.jsx(w.InsertImage,{}),t.jsx(w.Separator,{}),t.jsx(w.InsertTable,{}),t.jsx(w.InsertThematicBreak,{}),t.jsx(w.Separator,{}),t.jsx(w.InsertCodeBlock,{}),t.jsx(w.Separator,{}),t.jsx(w.InsertFrontmatter,{})]})}),w.diffSourcePlugin(l),w.listsPlugin(),w.quotePlugin(),w.headingsPlugin(E),w.linkPlugin(k),w.linkDialogPlugin(),w.imagePlugin(b),w.tablePlugin(),w.thematicBreakPlugin(),w.frontmatterPlugin(),w.codeBlockPlugin(F),w.codeMirrorPlugin(N),w.markdownShortcutPlugin(),w.directivesPlugin(X)],...s})};Qe.Preview=Fo,I.Desktop=No,I.MdEditor=Qe,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"})});
|
|
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"})});
|