feat: sync full workspace including web modules, docs, and configurations to Gitea

Optimized the root .gitignore to exclude virtual environments, node modules,
and temp folders to ensure clean and lightweight version tracking.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
王冕
2026-06-09 18:12:25 +08:00
parent 351688006e
commit a27e3b8e43
1510 changed files with 162044 additions and 1517 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1 @@
:root{color-scheme:light;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}html,body,#canvas-root,.canvas-template-shell,.canvas-template-canvas{width:100%;height:100%;min-height:100%;min-width:0}body{margin:0;overflow:hidden;background:#f1f5f9;color:#475569}body.dark{background:#0f172a;color:#94a3b8}.canvas-template-shell{background:inherit}.canvas-template-placeholder,.canvas-template-status,.canvas-template-error{display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:24px;box-sizing:border-box;font-size:12px;line-height:1.5}.canvas-template-status,.canvas-template-placeholder{color:inherit}.canvas-template-error{color:#dc2626}body.dark .canvas-template-error{color:#fca5a5}

View File

@@ -0,0 +1 @@
import{r as n,j as c,d as R}from"./chunks/vendor-react.js?v=1775123024591";import{I as T}from"./chunks/vendor-excalidraw.js?v=1775123024591";import"./chunks/_commonjsHelpers.js?v=1775123024591";import"./chunks/preload-helper.js?v=1775123024591";import"./chunks/vendor-common.js?v=1775123024591";import"./chunks/_commonjs-dynamic-modules.js?v=1775123024591";const N=1500;function S({canvasName:t,isDarkMode:e}){const[s,i]=n.useState(null),[l,v]=n.useState(null),[I,h]=n.useState(!0),[g,w]=n.useState(""),u=n.useRef(null),d=n.useRef(!1),C=n.useRef(t),f=n.useRef(!1);n.useEffect(()=>{C.current=t,f.current=!1,h(!0),w(""),v(null);let r=!1;return(async()=>{try{const a=await fetch(`/api/canvas/${encodeURIComponent(t)}`);if(r)return;if(!a.ok)throw new Error(`加载画布失败 (${a.status})`);const m=await a.json();if(r)return;v(m),f.current=!0}catch(a){if(r)return;w((a==null?void 0:a.message)||"加载画布失败")}finally{r||h(!1)}})(),()=>{r=!0}},[t]);const E=n.useCallback(async(r,o)=>{if(!d.current){d.current=!0;try{const a=(s==null?void 0:s.getFiles())||{},m={type:"excalidraw",version:2,source:"axhub-make",elements:r,appState:{gridSize:(o==null?void 0:o.gridSize)??null,viewBackgroundColor:(o==null?void 0:o.viewBackgroundColor)??"#ffffff"},files:a};await fetch(`/api/canvas/${encodeURIComponent(C.current)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:JSON.stringify(m,null,2)})})}catch(a){console.warn("Failed to save canvas:",a)}finally{d.current=!1}}},[s]),j=n.useCallback((r,o)=>{f.current&&(u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{E(r,o)},N))},[E]);return n.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]),I?c.jsx("div",{className:"canvas-template-status",children:"加载中..."}):g?c.jsx("div",{className:"canvas-template-error",children:g}):c.jsx("div",{className:"canvas-template-canvas",children:c.jsx(T,{excalidrawAPI:r=>i(r),initialData:l,onChange:j,theme:e?"dark":"light",UIOptions:{canvasActions:{saveAsImage:!0,export:!1}}},t)})}const p="axhub-make-dark-mode";function x(t){var e;return typeof document>"u"?"":((e=document.querySelector(`meta[name="${t}"]`))==null?void 0:e.getAttribute("content"))||""}function y(t){const e=String(t||"").trim();return!e||e.startsWith("{{")?"":e}function b(t){const e=t.match(/^\/canvas\/(.+?)\/?$/);if(!(e!=null&&e[1]))return"";try{return decodeURIComponent(e[1])}catch{return e[1]}}function A(){const t=y(x("axhub-canvas-name"));return t||(typeof window>"u"?"":b(window.location.pathname))}function D(t){const e=y(x("axhub-canvas-title"));if(e)return e;const s=t.replace(/\.excalidraw$/i,"").trim();return s?`${s} - Canvas`:"Canvas"}function M(){try{return localStorage.getItem(p)==="true"}catch{return!1}}function $(){const[t]=n.useState(()=>A()),[e,s]=n.useState(()=>M());return n.useEffect(()=>{const i=l=>{l.key===p&&s(l.newValue==="true")};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i)}},[]),n.useEffect(()=>{const i=D(t);document.title=i,document.documentElement.classList.toggle("dark",e),document.body.classList.toggle("dark",e)},[t,e]),c.jsx("div",{className:e?"canvas-template-shell dark":"canvas-template-shell",children:t?c.jsx(S,{canvasName:t,isDarkMode:e}):c.jsx("div",{className:"canvas-template-placeholder",children:"未指定画布"})})}const k=document.getElementById("canvas-root");if(!k)throw new Error("[Canvas Template] 找不到 #canvas-root 元素");const L=R.createRoot(k);L.render(c.jsx($,{}));

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
function r(o){throw new Error('Could not dynamically require "'+o+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}export{r as c};

View File

@@ -0,0 +1 @@
var u=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function l(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var t=function o(){return this instanceof o?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}),t}export{f as a,u as c,l as g};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
const h="modulepreload",E=function(i){return"/"+i},a={},y=function(u,s,v){let c=Promise.resolve();if(s&&s.length>0){document.getElementsByTagName("link");const e=document.querySelector("meta[property=csp-nonce]"),t=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));c=Promise.allSettled(s.map(r=>{if(r=E(r),r in a)return;a[r]=!0;const o=r.endsWith(".css"),d=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${d}`))return;const n=document.createElement("link");if(n.rel=o?"stylesheet":h,o||(n.as="script"),n.crossOrigin="",n.href=r,t&&n.setAttribute("nonce",t),document.head.appendChild(n),o)return new Promise((f,m)=>{n.addEventListener("load",f),n.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${r}`)))})}))}function l(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return c.then(e=>{for(const t of e||[])t.status==="rejected"&&l(t.reason);return u().catch(l)})};export{y as _};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 745 B

View File

@@ -0,0 +1 @@
import{e as i,f as c,R as s,c as l}from"./chunks/vendor-react.js?v=1775123024591";import{A as m}from"./chunks/vendor-antd.js?v=1775123024591";import"./chunks/_commonjsHelpers.js?v=1775123024591";import"./chunks/vendor-common.js?v=1775123024591";import"./chunks/preload-helper.js?v=1775123024591";import"./chunks/_commonjs-dynamic-modules.js?v=1775123024591";function f(r,n){const e=document.getElementById("root");if(!e){console.error("[Html Template] 找不到 #root 元素");return}const o=n||{container:e,config:{},data:{},events:{}};try{l(e).render(s.createElement(m,null,s.createElement(r,o)))}catch(t){console.error("[Html Template] 渲染失败:",t)}}const p={...c,...i};if(typeof window<"u"){const r=new URLSearchParams(window.location.search),n=r.get("scale"),e=r.get("width"),a=r.get("height"),o=document.getElementById("root");if(o){if(n){const t=parseFloat(n);!isNaN(t)&&t>0&&(o.style.transform=`scale(${t})`,o.style.transformOrigin="top left")}if(e||a){if(e){const t=parseInt(e);!isNaN(t)&&t>0&&(o.style.width=`${t}px`)}if(a){const t=parseInt(a);!isNaN(t)&&t>0&&(o.style.height=`${t}px`)}}}window.HtmlTemplateBootstrap={renderComponent:f,React:s,ReactDOM:p}}

View File

@@ -0,0 +1 @@
.resize-handle-right{cursor:ew-resize!important;z-index:100!important}.resize-handle-right:before{content:"";position:absolute;right:50%;top:50%;transform:translate(50%,-50%);width:2px;height:40px;background:hsl(var(--border));border-radius:1px;transition:all .2s;z-index:100}.resize-handle-right:hover:before,.resize-handle-right:active:before{background:hsl(var(--muted-foreground));width:3px;height:50px}.resize-handle-bottom{cursor:ns-resize!important;z-index:100!important}.resize-handle-bottom:before{content:"";position:absolute;left:50%;bottom:50%;transform:translate(-50%,50%);width:40px;height:2px;background:hsl(var(--border));border-radius:1px;transition:all .2s;z-index:100}.resize-handle-bottom:hover:before,.resize-handle-bottom:active:before{background:hsl(var(--muted-foreground));width:50px;height:3px}.resize-handle-bottomRight{cursor:nwse-resize!important;z-index:100!important}.resize-handle-bottomRight:before{content:"";position:absolute;right:0;bottom:0;width:12px;height:12px;background:hsl(var(--border));border-radius:0 0 6px;transition:all .2s;z-index:100}.resize-handle-bottomRight:hover:before,.resize-handle-bottomRight:active:before{background:hsl(var(--border-strong));width:16px;height:16px}.ant-card-hoverable:hover .resize-handle-right:before,.ant-card-hoverable:hover .resize-handle-bottom:before,.ant-card-hoverable:hover .resize-handle-bottomRight:before{background:hsl(var(--border-strong))}.menu-item-wrapper .more-btn{opacity:0;transition:opacity .2s,color .2s}.menu-item-wrapper:hover .more-btn,.menu-item-wrapper.is-selected .more-btn,.menu-item-wrapper .more-btn.ant-dropdown-open,.menu-item-wrapper .more-btn[data-state=open],.menu-item-wrapper .more-btn:focus-visible{opacity:1}.menu-item-wrapper .prototype-row-action{opacity:0;transition:opacity .2s,color .2s}.menu-item-wrapper.is-selected .prototype-row-action{opacity:0}.menu-item-wrapper:hover .prototype-row-action,.menu-item-wrapper .prototype-row-action.ant-dropdown-open,.menu-item-wrapper .prototype-row-action[data-state=open],.menu-item-wrapper .prototype-row-action:focus-visible{opacity:1}@media (max-width: 768px){.pc-layout{display:none!important}.mobile-layout{display:block!important}}@media (min-width: 769px){.pc-layout{display:block!important}.mobile-layout{display:none!important}}.mobile-item-card{background:var(--mobile-item-bg, hsl(var(--card)));border:1px solid var(--mobile-item-border, hsl(var(--border)));border-radius:8px;padding:16px;margin-bottom:12px;cursor:pointer;transition:all .2s}.mobile-item-card:hover{border-color:var(--mobile-item-hover-border, hsl(var(--ring)));box-shadow:var(--mobile-item-hover-shadow, var(--shadow-sm))}.mobile-item-card:active{transform:scale(.98)}.mobile-item-title{font-size:16px;font-weight:500;color:var(--mobile-item-title-color, hsl(var(--foreground)));margin-bottom:4px}.mobile-item-name{font-size:12px;color:var(--mobile-item-name-color, hsl(var(--muted-foreground)))}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long