@dimina-kit/devtools 0.3.1-dev.20260517100756 → 0.3.1-dev.20260518114324

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/README.md +138 -7
  2. package/dist/main/app/app.js +8 -0
  3. package/dist/main/index.bundle.js +374 -58
  4. package/dist/main/ipc/projects.d.ts +3 -1
  5. package/dist/main/ipc/projects.js +88 -4
  6. package/dist/main/ipc/session.js +9 -1
  7. package/dist/main/ipc/settings.js +8 -6
  8. package/dist/main/menu/index.js +11 -0
  9. package/dist/main/services/projects/builtin-templates.d.ts +3 -0
  10. package/dist/main/services/projects/builtin-templates.js +24 -0
  11. package/dist/main/services/projects/create-project-service.d.ts +7 -0
  12. package/dist/main/services/projects/create-project-service.js +84 -0
  13. package/dist/main/services/projects/index.d.ts +7 -0
  14. package/dist/main/services/projects/index.js +9 -0
  15. package/dist/main/services/projects/local-provider.d.ts +3 -0
  16. package/dist/main/services/projects/local-provider.js +25 -0
  17. package/dist/main/services/projects/templates.d.ts +21 -0
  18. package/dist/main/services/projects/templates.js +39 -0
  19. package/dist/main/services/projects/thumbnail.d.ts +8 -0
  20. package/dist/main/services/projects/thumbnail.js +37 -0
  21. package/dist/main/services/projects/types.d.ts +118 -0
  22. package/dist/main/services/projects/types.js +19 -0
  23. package/dist/main/services/settings/index.d.ts +7 -0
  24. package/dist/main/services/settings/index.js +4 -0
  25. package/dist/main/services/workbench-context.d.ts +35 -0
  26. package/dist/main/services/workbench-context.js +9 -0
  27. package/dist/main/services/workspace/workspace-service.d.ts +9 -7
  28. package/dist/main/services/workspace/workspace-service.js +81 -9
  29. package/dist/main/utils/sender-policy.d.ts +7 -5
  30. package/dist/main/utils/sender-policy.js +8 -6
  31. package/dist/main/windows/main-window/create.js +1 -1
  32. package/dist/preload/runtime/custom-apis.js +32 -3
  33. package/dist/preload/windows/simulator.js +26 -5
  34. package/dist/renderer/assets/index-Czz_bp6b.js +46 -0
  35. package/dist/renderer/assets/{input-C5M5Wxn6.js → input-DqVQNCx_.js} +2 -2
  36. package/dist/renderer/assets/{ipc-transport-CUsl-fS2.js → ipc-transport-CCHrCtDr.js} +2 -2
  37. package/dist/renderer/assets/ipc-transport-DqbRdZNO.css +1 -0
  38. package/dist/renderer/assets/{popover-BSBPVO0o.js → popover-BRg4XI_w.js} +2 -2
  39. package/dist/renderer/assets/{select-B1tF3UAc.js → select-CvILHHZU.js} +2 -2
  40. package/dist/renderer/assets/{settings-7w54H6p-.js → settings-BFNfnYvU.js} +2 -2
  41. package/dist/renderer/assets/{settings-api-BjJalghB.js → settings-api-DOAgmBst.js} +2 -2
  42. package/dist/renderer/assets/{workbenchSettings-q2_-nc8t.js → workbenchSettings-DjVMgMMH.js} +2 -2
  43. package/dist/renderer/entries/main/index.html +5 -5
  44. package/dist/renderer/entries/popover/index.html +5 -5
  45. package/dist/renderer/entries/settings/index.html +5 -5
  46. package/dist/renderer/entries/workbench-settings/index.html +4 -4
  47. package/dist/shared/ipc-channels.d.ts +20 -1
  48. package/dist/shared/ipc-channels.js +27 -0
  49. package/dist/shared/ipc-schemas.d.ts +5 -0
  50. package/dist/shared/ipc-schemas.js +5 -0
  51. package/dist/shared/types.d.ts +80 -0
  52. package/package.json +9 -4
  53. package/templates/blank/app.js +6 -0
  54. package/templates/blank/app.json +11 -0
  55. package/templates/blank/app.wxss +5 -0
  56. package/templates/blank/pages/index/index.js +6 -0
  57. package/templates/blank/pages/index/index.json +3 -0
  58. package/templates/blank/pages/index/index.wxml +3 -0
  59. package/templates/blank/pages/index/index.wxss +11 -0
  60. package/templates/blank/project.config.json +13 -0
  61. package/templates/blank/sitemap.json +9 -0
  62. package/templates/taro-todo/app.js +1 -0
  63. package/templates/taro-todo/app.json +1 -0
  64. package/templates/taro-todo/app.wxss +1 -0
  65. package/templates/taro-todo/base.wxml +851 -0
  66. package/templates/taro-todo/common.js +1 -0
  67. package/templates/taro-todo/comp.js +1 -0
  68. package/templates/taro-todo/comp.json +1 -0
  69. package/templates/taro-todo/comp.wxml +2 -0
  70. package/templates/taro-todo/custom-wrapper.js +1 -0
  71. package/templates/taro-todo/custom-wrapper.json +1 -0
  72. package/templates/taro-todo/custom-wrapper.wxml +4 -0
  73. package/templates/taro-todo/pages/index/index.js +2 -0
  74. package/templates/taro-todo/pages/index/index.json +1 -0
  75. package/templates/taro-todo/pages/index/index.wxml +2 -0
  76. package/templates/taro-todo/pages/index/index.wxss +1 -0
  77. package/templates/taro-todo/project.config.json +44 -0
  78. package/templates/taro-todo/runtime.js +1 -0
  79. package/templates/taro-todo/taro.js +2 -0
  80. package/templates/taro-todo/utils.wxs +39 -0
  81. package/templates/taro-todo/vendors.js +2 -0
  82. package/dist/renderer/assets/index-DW_0thr-.js +0 -46
  83. package/dist/renderer/assets/ipc-transport-CltRuvhi.css +0 -1
@@ -1,2 +1,2 @@
1
- import{b as e,f as t,i as n,n as r,r as i,t as a}from"./ipc-transport-CUsl-fS2.js";function o(e){n(t.ConfigChanged,e)}function s(e){n(t.ProjectSettingsChanged,e)}function c(e){return i(t.Init,t=>e(t))}function l(){return r(e.Get)}function u(t){return a(e.Save,t)}function d(t){return a(e.SetTheme,t)}function f(){return r(e.GetCdpStatus)}function p(t){return i(e.Init,e=>t(e))}export{c as a,d as c,l as i,o as n,p as o,f as r,u as s,s as t};
2
- //# sourceMappingURL=settings-api-BjJalghB.js.map
1
+ import{S as e,f as t,i as n,n as r,r as i,t as a}from"./ipc-transport-CCHrCtDr.js";function o(e){n(t.ConfigChanged,e)}function s(e){n(t.ProjectSettingsChanged,e)}function c(e){return i(t.Init,t=>e(t))}function l(){return r(e.Get)}function u(t){return a(e.Save,t)}function d(t){return a(e.SetTheme,t)}function f(){return r(e.GetCdpStatus)}function p(t){return i(e.Init,e=>t(e))}export{c as a,d as c,l as i,o as n,p as o,f as r,u as s,s as t};
2
+ //# sourceMappingURL=settings-api-DOAgmBst.js.map
@@ -1,8 +1,8 @@
1
- import{S as e,T as t,w as n,x as r}from"./ipc-transport-CUsl-fS2.js";import{c as i,i as a,o,r as s,s as c}from"./settings-api-BjJalghB.js";var l=t(e(),1),u=t(n(),1),d=r(),f=[{id:`general`,label:`通用`},{id:`debug`,label:`调试`},{id:`mcp`,label:`MCP`}];function p({checked:e,onClick:t}){return(0,d.jsx)(`button`,{type:`button`,onClick:t,className:`relative inline-flex h-5 w-9 shrink-0 rounded-full transition-colors`,style:{background:e?`var(--color-accent)`:`var(--color-surface-3)`},children:(0,d.jsx)(`span`,{className:`inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform`,style:{marginTop:3,transform:e?`translateX(18px)`:`translateX(3px)`}})})}function m(){let[e,t]=(0,u.useState)({cdp:{enabled:!1,port:9222},mcp:{enabled:!1,port:7789},compile:{watch:!0},theme:`system`}),[n,r]=(0,u.useState)(null),[l,m]=(0,u.useState)(`general`),[h,g]=(0,u.useState)(!1),[_,v]=(0,u.useState)(`9222`),[y,b]=(0,u.useState)(`7789`);(0,u.useEffect)(()=>{let e=o(e=>{t(e.settings),v(String(e.settings.cdp.port)),b(String(e.settings.mcp.port))});return a().then(e=>{t(e),v(String(e.cdp.port)),b(String(e.mcp.port))}),s().then(r),e},[]);function x(){g(!0),window.setTimeout(()=>g(!1),2e3)}function S(){t(e=>({...e,cdp:{...e.cdp,enabled:!e.cdp.enabled}}))}function C(){t(e=>({...e,mcp:{...e.mcp,enabled:!e.mcp.enabled}}))}function w(n){let r={...e,theme:n};t(r),i(n),c(r)}function T(n){let r={...e,compile:{...e.compile,watch:n}};t(r),c(r).then(x)}async function E(){let n=parseInt(_,10);if(Number.isNaN(n)||n<1024||n>65535)return;let i=parseInt(y,10);if(Number.isNaN(i)||i<1024||i>65535)return;let a={...e,cdp:{...e.cdp,port:n},mcp:{...e.mcp,port:i}};t(a),await c(a),r(await s()),x()}let D=n&&!n.implicitDevDefault&&(e.cdp.enabled!==n.active||e.cdp.enabled&&n.active&&e.cdp.port!==n.activePort);return(0,d.jsxs)(`div`,{className:`flex flex-col h-screen bg-surface text-text`,children:[(0,d.jsx)(`div`,{className:`flex items-center border-b border-border shrink-0`,children:f.map(e=>(0,d.jsx)(`button`,{className:`flex-1 py-2.5 text-[12px] text-center transition-colors ${l===e.id?`text-accent border-b-2 border-accent`:`text-text-secondary hover:text-text`}`,onClick:()=>m(e.id),children:e.label},e.id))}),(0,d.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-4`,children:[l===`general`&&(0,d.jsxs)(`div`,{className:`space-y-4`,children:[(0,d.jsxs)(`section`,{className:`rounded-lg border border-border p-4 space-y-4 bg-bg`,children:[(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`h2`,{className:`text-[13px] font-medium mb-1`,children:`编译`}),(0,d.jsx)(`p`,{className:`text-[11px] leading-relaxed text-text-secondary`,children:`开启后,打开项目时会监听源文件改动并自动重新编译。关闭则只在打开/手动重新编译时构建。配置在下次打开项目时生效。`})]}),(0,d.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,d.jsx)(`span`,{className:`text-[12px] text-text-secondary`,children:`监听文件变化自动编译`}),(0,d.jsx)(p,{checked:e.compile.watch,onClick:()=>T(!e.compile.watch)})]})]}),(0,d.jsxs)(`section`,{className:`rounded-lg border border-border p-4 space-y-3 bg-bg`,children:[(0,d.jsx)(`div`,{children:(0,d.jsx)(`h2`,{className:`text-[13px] font-medium mb-1`,children:`外观`})}),(0,d.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,d.jsx)(`span`,{className:`text-[12px] text-text-secondary`,children:`颜色模式`}),(0,d.jsx)(`div`,{className:`flex rounded overflow-hidden border border-border text-[11px]`,children:[`system`,`dark`,`light`].map((t,n)=>{let r=t===`system`?`跟随系统`:t===`dark`?`深色`:`浅色`,i=e.theme===t;return(0,d.jsx)(`button`,{onClick:()=>w(t),className:[`px-3 py-1 transition-colors`,n>0?`border-l border-border`:``,i?`bg-accent text-white`:`text-text-secondary hover:text-text hover:bg-surface-3`].join(` `),children:r},t)})})]})]}),h&&(0,d.jsx)(`div`,{className:`text-[11px] text-status-success`,children:`已保存`})]}),l===`debug`&&(0,d.jsxs)(`section`,{className:`rounded-lg border border-border p-4 space-y-4 bg-bg`,children:[(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`h2`,{className:`text-[13px] font-medium mb-1`,children:`DevTools Protocol`}),(0,d.jsx)(`p`,{className:`text-[11px] leading-relaxed text-text-secondary`,children:`开启后可通过 DevTools Protocol 连接调试模拟器。配置变更需要重启应用后生效。`})]}),(0,d.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,d.jsx)(`span`,{className:`text-[12px] text-text-secondary`,children:`启用 DevTools Protocol`}),(0,d.jsx)(p,{checked:e.cdp.enabled,onClick:S})]}),(0,d.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,d.jsx)(`label`,{className:`text-[12px] shrink-0 w-16 text-text-secondary`,children:`调试端口`}),(0,d.jsx)(`input`,{type:`number`,min:1024,max:65535,value:_,onChange:e=>v(e.target.value),disabled:!e.cdp.enabled,className:`w-24 h-7 px-2 rounded text-[12px] outline-none bg-surface border border-border text-text`,style:{opacity:e.cdp.enabled?1:.4}}),(0,d.jsx)(`span`,{className:`text-[11px] text-text-dim`,children:`默认 9222`})]}),(0,d.jsxs)(`div`,{className:`rounded p-3 space-y-2 border border-border bg-surface`,children:[(0,d.jsx)(`div`,{className:`text-[11px] font-medium text-text-secondary`,children:`当前状态`}),(0,d.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,d.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-full`,style:{background:n?.active?`var(--color-status-success)`:`var(--color-text-dim)`}}),(0,d.jsx)(`span`,{className:`text-[12px] text-text-secondary`,children:n?.active?`CDP 已激活 - 端口 ${n.activePort}`:`CDP 未激活`})]}),n?.implicitDevDefault&&(0,d.jsx)(`div`,{className:`text-[11px] text-text-dim`,children:`当前为开发模式默认端口`}),n?.active&&(0,d.jsxs)(`div`,{className:`text-[11px] text-text-dim font-mono`,children:[`调试地址: http://localhost:`,n.activePort]})]}),D&&(0,d.jsx)(`div`,{className:`rounded px-3 py-2 text-[12px] border bg-warn-bg text-[var(--color-status-warn)]`,children:`配置已变更,需要重启应用后生效`}),(0,d.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,d.jsx)(`button`,{onClick:E,className:`h-7 px-4 rounded text-[13px] font-medium text-white bg-accent hover:bg-accent-hover`,children:`保存`}),h&&(0,d.jsx)(`span`,{className:`text-[11px] text-status-success`,children:`已保存`})]})]}),l===`mcp`&&(0,d.jsxs)(`section`,{className:`rounded-lg border border-border p-4 space-y-4 bg-bg`,children:[(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`h2`,{className:`text-[13px] font-medium mb-1`,children:`MCP 配置`}),(0,d.jsx)(`p`,{className:`text-[11px] leading-relaxed text-text-secondary`,children:`AI 助手可以通过 MCP 连接当前开发工具,读取 console、截图、执行 JS、查看 DOM / Storage / 网络请求。启用后开发工具启动时会自动监听 SSE 端点,并自动启用 CDP。`})]}),(0,d.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,d.jsx)(`span`,{className:`text-[12px] text-text-secondary`,children:`启用 MCP 服务`}),(0,d.jsx)(p,{checked:e.mcp.enabled,onClick:C})]}),(0,d.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,d.jsx)(`label`,{className:`text-[12px] shrink-0 w-16 text-text-secondary`,children:`SSE 端口`}),(0,d.jsx)(`input`,{type:`number`,min:1024,max:65535,value:y,onChange:e=>b(e.target.value),disabled:!e.mcp.enabled,className:`w-24 h-7 px-2 rounded text-[12px] outline-none bg-surface border border-border text-text`,style:{opacity:e.mcp.enabled?1:.4}}),(0,d.jsx)(`span`,{className:`text-[11px] text-text-dim`,children:`默认 7789`})]}),(0,d.jsxs)(`div`,{className:`rounded p-3 border border-border bg-surface`,children:[(0,d.jsx)(`div`,{className:`text-[11px] font-medium mb-2 text-text-secondary`,children:"`.mcp.json` 示例(SSE 传输)"}),(0,d.jsx)(`pre`,{className:`text-[11px] whitespace-pre-wrap leading-relaxed text-[var(--color-code-blue)] font-mono`,children:`{
1
+ import{C as e,D as t,E as n,w as r}from"./ipc-transport-CCHrCtDr.js";import{c as i,i as a,o,r as s,s as c}from"./settings-api-DOAgmBst.js";var l=t(r(),1),u=t(n(),1),d=e(),f=[{id:`general`,label:`通用`},{id:`debug`,label:`调试`},{id:`mcp`,label:`MCP`}];function p({checked:e,onClick:t}){return(0,d.jsx)(`button`,{type:`button`,onClick:t,className:`relative inline-flex h-5 w-9 shrink-0 rounded-full transition-colors`,style:{background:e?`var(--color-accent)`:`var(--color-surface-3)`},children:(0,d.jsx)(`span`,{className:`inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform`,style:{marginTop:3,transform:e?`translateX(18px)`:`translateX(3px)`}})})}function m(){let[e,t]=(0,u.useState)({cdp:{enabled:!1,port:9222},mcp:{enabled:!1,port:7789},compile:{watch:!0},theme:`system`}),[n,r]=(0,u.useState)(null),[l,m]=(0,u.useState)(`general`),[h,g]=(0,u.useState)(!1),[_,v]=(0,u.useState)(`9222`),[y,b]=(0,u.useState)(`7789`);(0,u.useEffect)(()=>{let e=o(e=>{t(e.settings),v(String(e.settings.cdp.port)),b(String(e.settings.mcp.port))});return a().then(e=>{t(e),v(String(e.cdp.port)),b(String(e.mcp.port))}),s().then(r),e},[]);function x(){g(!0),window.setTimeout(()=>g(!1),2e3)}function S(){t(e=>({...e,cdp:{...e.cdp,enabled:!e.cdp.enabled}}))}function C(){t(e=>({...e,mcp:{...e.mcp,enabled:!e.mcp.enabled}}))}function w(n){let r={...e,theme:n};t(r),i(n),c(r)}function T(n){let r={...e,compile:{...e.compile,watch:n}};t(r),c(r).then(x)}async function E(){let n=parseInt(_,10);if(Number.isNaN(n)||n<1024||n>65535)return;let i=parseInt(y,10);if(Number.isNaN(i)||i<1024||i>65535)return;let a={...e,cdp:{...e.cdp,port:n},mcp:{...e.mcp,port:i}};t(a),await c(a),r(await s()),x()}let D=n&&!n.implicitDevDefault&&(e.cdp.enabled!==n.active||e.cdp.enabled&&n.active&&e.cdp.port!==n.activePort);return(0,d.jsxs)(`div`,{className:`flex flex-col h-screen bg-surface text-text`,children:[(0,d.jsx)(`div`,{className:`flex items-center border-b border-border shrink-0`,children:f.map(e=>(0,d.jsx)(`button`,{className:`flex-1 py-2.5 text-[12px] text-center transition-colors ${l===e.id?`text-accent border-b-2 border-accent`:`text-text-secondary hover:text-text`}`,onClick:()=>m(e.id),children:e.label},e.id))}),(0,d.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-4`,children:[l===`general`&&(0,d.jsxs)(`div`,{className:`space-y-4`,children:[(0,d.jsxs)(`section`,{className:`rounded-lg border border-border p-4 space-y-4 bg-bg`,children:[(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`h2`,{className:`text-[13px] font-medium mb-1`,children:`编译`}),(0,d.jsx)(`p`,{className:`text-[11px] leading-relaxed text-text-secondary`,children:`开启后,打开项目时会监听源文件改动并自动重新编译。关闭则只在打开/手动重新编译时构建。配置在下次打开项目时生效。`})]}),(0,d.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,d.jsx)(`span`,{className:`text-[12px] text-text-secondary`,children:`监听文件变化自动编译`}),(0,d.jsx)(p,{checked:e.compile.watch,onClick:()=>T(!e.compile.watch)})]})]}),(0,d.jsxs)(`section`,{className:`rounded-lg border border-border p-4 space-y-3 bg-bg`,children:[(0,d.jsx)(`div`,{children:(0,d.jsx)(`h2`,{className:`text-[13px] font-medium mb-1`,children:`外观`})}),(0,d.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,d.jsx)(`span`,{className:`text-[12px] text-text-secondary`,children:`颜色模式`}),(0,d.jsx)(`div`,{className:`flex rounded overflow-hidden border border-border text-[11px]`,children:[`system`,`dark`,`light`].map((t,n)=>{let r=t===`system`?`跟随系统`:t===`dark`?`深色`:`浅色`,i=e.theme===t;return(0,d.jsx)(`button`,{onClick:()=>w(t),className:[`px-3 py-1 transition-colors`,n>0?`border-l border-border`:``,i?`bg-accent text-white`:`text-text-secondary hover:text-text hover:bg-surface-3`].join(` `),children:r},t)})})]})]}),h&&(0,d.jsx)(`div`,{className:`text-[11px] text-status-success`,children:`已保存`})]}),l===`debug`&&(0,d.jsxs)(`section`,{className:`rounded-lg border border-border p-4 space-y-4 bg-bg`,children:[(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`h2`,{className:`text-[13px] font-medium mb-1`,children:`DevTools Protocol`}),(0,d.jsx)(`p`,{className:`text-[11px] leading-relaxed text-text-secondary`,children:`开启后可通过 DevTools Protocol 连接调试模拟器。配置变更需要重启应用后生效。`})]}),(0,d.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,d.jsx)(`span`,{className:`text-[12px] text-text-secondary`,children:`启用 DevTools Protocol`}),(0,d.jsx)(p,{checked:e.cdp.enabled,onClick:S})]}),(0,d.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,d.jsx)(`label`,{className:`text-[12px] shrink-0 w-16 text-text-secondary`,children:`调试端口`}),(0,d.jsx)(`input`,{type:`number`,min:1024,max:65535,value:_,onChange:e=>v(e.target.value),disabled:!e.cdp.enabled,className:`w-24 h-7 px-2 rounded text-[12px] outline-none bg-surface border border-border text-text`,style:{opacity:e.cdp.enabled?1:.4}}),(0,d.jsx)(`span`,{className:`text-[11px] text-text-dim`,children:`默认 9222`})]}),(0,d.jsxs)(`div`,{className:`rounded p-3 space-y-2 border border-border bg-surface`,children:[(0,d.jsx)(`div`,{className:`text-[11px] font-medium text-text-secondary`,children:`当前状态`}),(0,d.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,d.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-full`,style:{background:n?.active?`var(--color-status-success)`:`var(--color-text-dim)`}}),(0,d.jsx)(`span`,{className:`text-[12px] text-text-secondary`,children:n?.active?`CDP 已激活 - 端口 ${n.activePort}`:`CDP 未激活`})]}),n?.implicitDevDefault&&(0,d.jsx)(`div`,{className:`text-[11px] text-text-dim`,children:`当前为开发模式默认端口`}),n?.active&&(0,d.jsxs)(`div`,{className:`text-[11px] text-text-dim font-mono`,children:[`调试地址: http://localhost:`,n.activePort]})]}),D&&(0,d.jsx)(`div`,{className:`rounded px-3 py-2 text-[12px] border bg-warn-bg text-[var(--color-status-warn)]`,children:`配置已变更,需要重启应用后生效`}),(0,d.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,d.jsx)(`button`,{onClick:E,className:`h-7 px-4 rounded text-[13px] font-medium text-white bg-accent hover:bg-accent-hover`,children:`保存`}),h&&(0,d.jsx)(`span`,{className:`text-[11px] text-status-success`,children:`已保存`})]})]}),l===`mcp`&&(0,d.jsxs)(`section`,{className:`rounded-lg border border-border p-4 space-y-4 bg-bg`,children:[(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`h2`,{className:`text-[13px] font-medium mb-1`,children:`MCP 配置`}),(0,d.jsx)(`p`,{className:`text-[11px] leading-relaxed text-text-secondary`,children:`AI 助手可以通过 MCP 连接当前开发工具,读取 console、截图、执行 JS、查看 DOM / Storage / 网络请求。启用后开发工具启动时会自动监听 SSE 端点,并自动启用 CDP。`})]}),(0,d.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,d.jsx)(`span`,{className:`text-[12px] text-text-secondary`,children:`启用 MCP 服务`}),(0,d.jsx)(p,{checked:e.mcp.enabled,onClick:C})]}),(0,d.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,d.jsx)(`label`,{className:`text-[12px] shrink-0 w-16 text-text-secondary`,children:`SSE 端口`}),(0,d.jsx)(`input`,{type:`number`,min:1024,max:65535,value:y,onChange:e=>b(e.target.value),disabled:!e.mcp.enabled,className:`w-24 h-7 px-2 rounded text-[12px] outline-none bg-surface border border-border text-text`,style:{opacity:e.mcp.enabled?1:.4}}),(0,d.jsx)(`span`,{className:`text-[11px] text-text-dim`,children:`默认 7789`})]}),(0,d.jsxs)(`div`,{className:`rounded p-3 border border-border bg-surface`,children:[(0,d.jsx)(`div`,{className:`text-[11px] font-medium mb-2 text-text-secondary`,children:"`.mcp.json` 示例(SSE 传输)"}),(0,d.jsx)(`pre`,{className:`text-[11px] whitespace-pre-wrap leading-relaxed text-[var(--color-code-blue)] font-mono`,children:`{
2
2
  "mcpServers": {
3
3
  "dimina-devtools": {
4
4
  "url": "http://127.0.0.1:${e.mcp.port}/sse"
5
5
  }
6
6
  }
7
7
  }`})]}),(0,d.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,d.jsx)(`button`,{onClick:E,className:`h-7 px-4 rounded text-[13px] font-medium text-white bg-accent hover:bg-accent-hover`,children:`保存`}),h&&(0,d.jsx)(`span`,{className:`text-[11px] text-status-success`,children:`已保存`})]})]})]})]})}l.createRoot(document.getElementById(`root`)).render((0,d.jsx)(m,{}));
8
- //# sourceMappingURL=workbenchSettings-q2_-nc8t.js.map
8
+ //# sourceMappingURL=workbenchSettings-DjVMgMMH.js.map
@@ -10,11 +10,11 @@
10
10
  -->
11
11
  <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: http: https:; font-src 'self' data:; media-src 'self' blob: http: https:; connect-src 'self' http: https: ws: wss:;" />
12
12
  <title>Dimina DevTools</title>
13
- <script type="module" crossorigin src="../../assets/index-DW_0thr-.js"></script>
14
- <link rel="modulepreload" crossorigin href="../../assets/ipc-transport-CUsl-fS2.js">
15
- <link rel="modulepreload" crossorigin href="../../assets/input-C5M5Wxn6.js">
16
- <link rel="modulepreload" crossorigin href="../../assets/select-B1tF3UAc.js">
17
- <link rel="stylesheet" crossorigin href="../../assets/ipc-transport-CltRuvhi.css">
13
+ <script type="module" crossorigin src="../../assets/index-Czz_bp6b.js"></script>
14
+ <link rel="modulepreload" crossorigin href="../../assets/ipc-transport-CCHrCtDr.js">
15
+ <link rel="modulepreload" crossorigin href="../../assets/input-DqVQNCx_.js">
16
+ <link rel="modulepreload" crossorigin href="../../assets/select-CvILHHZU.js">
17
+ <link rel="stylesheet" crossorigin href="../../assets/ipc-transport-DqbRdZNO.css">
18
18
  </head>
19
19
  <body>
20
20
  <div id="root"></div>
@@ -8,11 +8,11 @@
8
8
  <style>
9
9
  html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: transparent !important; }
10
10
  </style>
11
- <script type="module" crossorigin src="../../assets/popover-BSBPVO0o.js"></script>
12
- <link rel="modulepreload" crossorigin href="../../assets/ipc-transport-CUsl-fS2.js">
13
- <link rel="modulepreload" crossorigin href="../../assets/input-C5M5Wxn6.js">
14
- <link rel="modulepreload" crossorigin href="../../assets/select-B1tF3UAc.js">
15
- <link rel="stylesheet" crossorigin href="../../assets/ipc-transport-CltRuvhi.css">
11
+ <script type="module" crossorigin src="../../assets/popover-BRg4XI_w.js"></script>
12
+ <link rel="modulepreload" crossorigin href="../../assets/ipc-transport-CCHrCtDr.js">
13
+ <link rel="modulepreload" crossorigin href="../../assets/input-DqVQNCx_.js">
14
+ <link rel="modulepreload" crossorigin href="../../assets/select-CvILHHZU.js">
15
+ <link rel="stylesheet" crossorigin href="../../assets/ipc-transport-DqbRdZNO.css">
16
16
  </head>
17
17
  <body>
18
18
  <div id="root"></div>
@@ -5,11 +5,11 @@
5
5
  <!-- See main/index.html for CSP rationale. -->
6
6
  <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: http: https:; font-src 'self' data:; media-src 'self' blob: http: https:; connect-src 'self' http: https: ws: wss:;" />
7
7
  <title>Settings</title>
8
- <script type="module" crossorigin src="../../assets/settings-7w54H6p-.js"></script>
9
- <link rel="modulepreload" crossorigin href="../../assets/ipc-transport-CUsl-fS2.js">
10
- <link rel="modulepreload" crossorigin href="../../assets/input-C5M5Wxn6.js">
11
- <link rel="modulepreload" crossorigin href="../../assets/settings-api-BjJalghB.js">
12
- <link rel="stylesheet" crossorigin href="../../assets/ipc-transport-CltRuvhi.css">
8
+ <script type="module" crossorigin src="../../assets/settings-BFNfnYvU.js"></script>
9
+ <link rel="modulepreload" crossorigin href="../../assets/ipc-transport-CCHrCtDr.js">
10
+ <link rel="modulepreload" crossorigin href="../../assets/input-DqVQNCx_.js">
11
+ <link rel="modulepreload" crossorigin href="../../assets/settings-api-DOAgmBst.js">
12
+ <link rel="stylesheet" crossorigin href="../../assets/ipc-transport-DqbRdZNO.css">
13
13
  </head>
14
14
  <body>
15
15
  <div id="root"></div>
@@ -6,10 +6,10 @@
6
6
  <!-- See entries/main/index.html for CSP rationale. -->
7
7
  <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: http: https:; font-src 'self' data:; media-src 'self' blob: http: https:; connect-src 'self' http: https: ws: wss:;" />
8
8
  <title>开发工具设置</title>
9
- <script type="module" crossorigin src="../../assets/workbenchSettings-q2_-nc8t.js"></script>
10
- <link rel="modulepreload" crossorigin href="../../assets/ipc-transport-CUsl-fS2.js">
11
- <link rel="modulepreload" crossorigin href="../../assets/settings-api-BjJalghB.js">
12
- <link rel="stylesheet" crossorigin href="../../assets/ipc-transport-CltRuvhi.css">
9
+ <script type="module" crossorigin src="../../assets/workbenchSettings-DjVMgMMH.js"></script>
10
+ <link rel="modulepreload" crossorigin href="../../assets/ipc-transport-CCHrCtDr.js">
11
+ <link rel="modulepreload" crossorigin href="../../assets/settings-api-DOAgmBst.js">
12
+ <link rel="stylesheet" crossorigin href="../../assets/ipc-transport-DqbRdZNO.css">
13
13
  </head>
14
14
  <body>
15
15
  <div id="root"></div>
@@ -19,6 +19,10 @@ export declare const SimulatorCustomApiChannel: {
19
19
  readonly List: "simulator:custom-apis:list";
20
20
  readonly Invoke: "simulator:custom-apis:invoke";
21
21
  };
22
+ export declare const SimulatorCustomApiBridgeChannel: {
23
+ readonly Request: "simulator:custom-apis:bridge-request";
24
+ readonly Response: "simulator:custom-apis:bridge-response";
25
+ };
22
26
  export declare const SimulatorStorageChannel: {
23
27
  readonly GetSnapshot: "simulator:storage:snapshot";
24
28
  readonly GetActivePrefix: "simulator:storage:activePrefix";
@@ -96,12 +100,27 @@ export declare const ProjectChannel: {
96
100
  readonly GetCompileConfig: "project:getCompileConfig";
97
101
  readonly SaveCompileConfig: "project:saveCompileConfig";
98
102
  readonly Status: "project:status";
103
+ readonly CaptureThumbnail: "project:captureThumbnail";
104
+ readonly GetThumbnail: "project:getThumbnail";
99
105
  };
100
106
  export declare const ProjectsChannel: {
101
107
  readonly List: "projects:list";
102
108
  readonly Add: "projects:add";
103
109
  readonly Remove: "projects:remove";
104
- };
110
+ /** Phase 3: merged + sanitized template catalog for the create-project dialog. */
111
+ readonly ListTemplates: "projects:listTemplates";
112
+ /** Phase 3: host-supplied create-project dialog hook (returns input or null). */
113
+ readonly OpenCreateDialog: "projects:openCreateDialog";
114
+ /** Phase 3: server-side scaffold + register (delegates to create-project-service). */
115
+ readonly Create: "projects:create";
116
+ /** Default values used to pre-fill the create-project dialog (baseDir). */
117
+ readonly GetCreateDefaults: "projects:getCreateDefaults";
118
+ };
119
+ /** Renderer-facing payload for `projects:getCreateDefaults`. */
120
+ export interface ProjectCreateDefaults {
121
+ /** Absolute directory used as the parent for new projects. */
122
+ baseDir: string;
123
+ }
105
124
  export declare const DialogChannel: {
106
125
  readonly OpenDirectory: "dialog:openDirectory";
107
126
  };
@@ -19,10 +19,27 @@ export const SimulatorChannel = {
19
19
  // ── Custom simulator APIs (downstream-registered, main-process handlers) ──
20
20
  // list: simulator queries the names registered via @dimina-kit/devtools/simulator-apis.
21
21
  // invoke: simulator forwards an API call to the registry; result/reject propagates.
22
+ //
23
+ // These are ipcMain.handle channels invoked by the **main-window renderer**
24
+ // only (trusted host). The simulator <webview> never reaches them directly —
25
+ // it proxies through the host via the bridge channels below, so the
26
+ // sender-policy can keep the webview off the IPC white-list.
22
27
  export const SimulatorCustomApiChannel = {
23
28
  List: 'simulator:custom-apis:list',
24
29
  Invoke: 'simulator:custom-apis:invoke',
25
30
  };
31
+ // ── Custom APIs bridge proxy (simulator <webview> ↔ main-window renderer) ──
32
+ // Request: webview → host via `ipcRenderer.sendToHost`,
33
+ // payload = { id, op: 'list' } | { id, op: 'invoke', name, params }
34
+ // Response: host → webview via `<webview>.send`,
35
+ // payload = { id, result } | { id, error }
36
+ //
37
+ // Request/response are correlated by `id` so multiple concurrent invokes can
38
+ // be in flight at once.
39
+ export const SimulatorCustomApiBridgeChannel = {
40
+ Request: 'simulator:custom-apis:bridge-request',
41
+ Response: 'simulator:custom-apis:bridge-response',
42
+ };
26
43
  // ── Storage (CDP-backed; main process attaches the debugger to the
27
44
  // simulator <webview> and forwards DOMStorage events to the renderer) ──
28
45
  export const SimulatorStorageChannel = {
@@ -62,12 +79,22 @@ export const ProjectChannel = {
62
79
  GetCompileConfig: 'project:getCompileConfig',
63
80
  SaveCompileConfig: 'project:saveCompileConfig',
64
81
  Status: 'project:status',
82
+ CaptureThumbnail: 'project:captureThumbnail',
83
+ GetThumbnail: 'project:getThumbnail',
65
84
  };
66
85
  // ── Project list / workspace ─────────────────────────────────────────────
67
86
  export const ProjectsChannel = {
68
87
  List: 'projects:list',
69
88
  Add: 'projects:add',
70
89
  Remove: 'projects:remove',
90
+ /** Phase 3: merged + sanitized template catalog for the create-project dialog. */
91
+ ListTemplates: 'projects:listTemplates',
92
+ /** Phase 3: host-supplied create-project dialog hook (returns input or null). */
93
+ OpenCreateDialog: 'projects:openCreateDialog',
94
+ /** Phase 3: server-side scaffold + register (delegates to create-project-service). */
95
+ Create: 'projects:create',
96
+ /** Default values used to pre-fill the create-project dialog (baseDir). */
97
+ GetCreateDefaults: 'projects:getCreateDefaults',
71
98
  };
72
99
  // ── Dialog ───────────────────────────────────────────────────────────────
73
100
  export const DialogChannel = {
@@ -69,6 +69,7 @@ export declare const WorkbenchSettingsSaveSchema: z.ZodTuple<[z.ZodObject<{
69
69
  dark: "dark";
70
70
  light: "light";
71
71
  }>;
72
+ lastCreateBaseDir: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
72
73
  }, z.core.$loose>], null>;
73
74
  /** workbenchSettings:setTheme — fixed enum of supported theme sources. */
74
75
  export declare const WorkbenchSettingsSetThemeSchema: z.ZodTuple<[z.ZodEnum<{
@@ -110,4 +111,8 @@ export declare const SettingsProjectSettingsChangedSchema: z.ZodTuple<[z.ZodObje
110
111
  }, z.core.$loose>], null>;
111
112
  /** panel:select — single panel id string. */
112
113
  export declare const PanelSelectSchema: z.ZodTuple<[z.ZodString], null>;
114
+ /** project:captureThumbnail — absolute project path. */
115
+ export declare const ProjectCaptureThumbnailSchema: z.ZodTuple<[z.ZodString], null>;
116
+ /** project:getThumbnail — absolute project path. */
117
+ export declare const ProjectGetThumbnailSchema: z.ZodTuple<[z.ZodString], null>;
113
118
  //# sourceMappingURL=ipc-schemas.d.ts.map
@@ -97,6 +97,7 @@ export const WorkbenchSettingsSaveSchema = z.tuple([
97
97
  watch: z.boolean(),
98
98
  }),
99
99
  theme: z.enum(['system', 'light', 'dark']),
100
+ lastCreateBaseDir: z.union([z.string(), z.null()]),
100
101
  }),
101
102
  ]);
102
103
  /** workbenchSettings:setTheme — fixed enum of supported theme sources. */
@@ -125,4 +126,8 @@ export const SettingsProjectSettingsChangedSchema = z.tuple([
125
126
  ]);
126
127
  /** panel:select — single panel id string. */
127
128
  export const PanelSelectSchema = z.tuple([z.string().min(1).max(200)]);
129
+ /** project:captureThumbnail — absolute project path. */
130
+ export const ProjectCaptureThumbnailSchema = z.tuple([AbsolutePath]);
131
+ /** project:getThumbnail — absolute project path. */
132
+ export const ProjectGetThumbnailSchema = z.tuple([AbsolutePath]);
128
133
  //# sourceMappingURL=ipc-schemas.js.map
@@ -88,6 +88,43 @@ export interface WorkbenchHostInstance {
88
88
  mainWindow: import('electron').BrowserWindow;
89
89
  context: import('../main/services/workbench-context.js').WorkbenchContext;
90
90
  }
91
+ /**
92
+ * Pluggable backend for the project-list panel. Hosts may supply this to
93
+ * take over project storage from the default `<userData>/dimina-projects.json`.
94
+ *
95
+ * Detailed contract lives in
96
+ * `@dimina-kit/devtools/projects-provider` (the runtime exports it).
97
+ * Repeated here as a structural type so `WorkbenchAppConfig` can reference
98
+ * it without a circular import from the main-process tree.
99
+ */
100
+ export interface ProjectsProvider {
101
+ listProjects(): unknown[] | Promise<unknown[]>;
102
+ validateProjectDir?(dirPath: string): string | null;
103
+ addProject(dirPath: string): unknown;
104
+ removeProject(dirPath: string): void | Promise<void>;
105
+ updateLastOpened?(dirPath: string): void | Promise<void>;
106
+ getCompileConfig?(dirPath: string): unknown;
107
+ saveCompileConfig?(dirPath: string, cfg: unknown): void | Promise<void>;
108
+ }
109
+ export interface ProjectTemplate {
110
+ id: string;
111
+ name: string;
112
+ description?: string;
113
+ icon?: string;
114
+ source?: {
115
+ type: 'directory';
116
+ path: string;
117
+ };
118
+ generate?: (target: string, opts: {
119
+ name: string;
120
+ }) => Promise<void>;
121
+ }
122
+ export interface CreateProjectInput {
123
+ name: string;
124
+ path: string;
125
+ templateId?: string;
126
+ extra?: Record<string, unknown>;
127
+ }
91
128
  export interface WorkbenchAppConfig extends WorkbenchConfig {
92
129
  /** Absolute path to the renderer dist directory. Defaults to dimina-devtools' built-in renderer. */
93
130
  rendererDir?: string;
@@ -114,5 +151,48 @@ export interface WorkbenchAppConfig extends WorkbenchConfig {
114
151
  /** Override the version string passed to the checker. Default: app.getVersion() */
115
152
  getCurrentVersion?: () => string;
116
153
  };
154
+ /** Override the default `<userData>/dimina-projects.json` backend. */
155
+ projectsProvider?: ProjectsProvider;
156
+ /** Templates injected at the head of the list; same-id overrides a built-in. */
157
+ projectTemplates?: ProjectTemplate[];
158
+ /** Built-in policy: 'all' (default), 'none', or an allowlist of ids. */
159
+ builtinTemplates?: 'all' | 'none' | string[];
160
+ /**
161
+ * Host-supplied "新建项目" dialog. When provided, the renderer routes the
162
+ * "+" card click through IPC into this main-process hook instead of
163
+ * showing the built-in dialog. Receives the parent window for native
164
+ * dialog parenting and the merged + sanitized template list (no
165
+ * `generate` functions cross the IPC boundary).
166
+ *
167
+ * Return either:
168
+ * - `null` — user cancelled.
169
+ * - a `CreateProjectInput` — devtools runs its built-in scaffold
170
+ * (copy template → write project.config.json → provider.addProject)
171
+ * on the host's behalf.
172
+ * - `{ ready: Project }` — the host has ALREADY created the project
173
+ * (typically via its own backend). devtools skips the scaffold and
174
+ * just refreshes the list. Use this when materialization is remote
175
+ * or already done.
176
+ */
177
+ customCreateProjectDialog?: (ctx: {
178
+ parentWindow: import('electron').BrowserWindow;
179
+ templates: ProjectTemplate[];
180
+ }) => Promise<CustomCreateProjectDialogResult>;
117
181
  }
182
+ /**
183
+ * Discriminated return of `customCreateProjectDialog`. `null` = cancelled.
184
+ * `{ ready }` = host created the project itself; devtools just refreshes.
185
+ * Otherwise treated as `CreateProjectInput` and devtools materializes the
186
+ * template locally.
187
+ *
188
+ * The `ready.Project` shape is the structural minimum devtools needs to
189
+ * render the card (mirrors `Project` in `./projects-provider`).
190
+ */
191
+ export type CustomCreateProjectDialogResult = null | {
192
+ ready: {
193
+ name: string;
194
+ path: string;
195
+ lastOpened?: string | null;
196
+ };
197
+ } | CreateProjectInput;
118
198
  //# sourceMappingURL=types.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dimina-kit/devtools",
3
- "version": "0.3.1-dev.20260517100756",
3
+ "version": "0.3.1-dev.20260518114324",
4
4
  "description": "Dimina DevTools - modular developer tools for mini app debugging",
5
5
  "keywords": [
6
6
  "dimina",
@@ -27,6 +27,7 @@
27
27
  "dist",
28
28
  "!dist/**/*.js.map",
29
29
  "!dist/**/*.d.ts.map",
30
+ "templates",
30
31
  "README.md",
31
32
  "LICENSE"
32
33
  ],
@@ -38,6 +39,7 @@
38
39
  "./launch": "./dist/main/app/launch.js",
39
40
  "./types": "./dist/shared/types.js",
40
41
  "./context": "./dist/main/services/workbench-context.js",
42
+ "./projects-provider": "./dist/main/services/projects/index.js",
41
43
  "./create-window": "./dist/main/windows/main-window/index.js",
42
44
  "./ipc-simulator": "./dist/main/ipc/simulator.js",
43
45
  "./ipc-panels": "./dist/main/ipc/panels.js",
@@ -104,6 +106,9 @@
104
106
  ],
105
107
  "simulator-apis": [
106
108
  "dist/main/simulator-apis.d.ts"
109
+ ],
110
+ "projects-provider": [
111
+ "dist/main/services/projects/index.d.ts"
107
112
  ]
108
113
  }
109
114
  },
@@ -116,7 +121,7 @@
116
121
  "chrome-remote-interface": "^0.34.0",
117
122
  "ws": "^8.20.0",
118
123
  "zod": "^4.3.6",
119
- "@dimina-kit/devkit": "0.1.1-dev.20260517100756"
124
+ "@dimina-kit/devkit": "0.1.1-dev.20260518114324"
120
125
  },
121
126
  "devDependencies": {
122
127
  "@playwright/test": "^1.59.1",
@@ -159,8 +164,8 @@
159
164
  "typescript": "5.9.2",
160
165
  "vite": "^8.0.8",
161
166
  "vitest": "^4.1.4",
162
- "@dimina-kit/eslint-config": "0.1.0",
163
- "@dimina-kit/typescript-config": "0.1.0"
167
+ "@dimina-kit/typescript-config": "0.1.0",
168
+ "@dimina-kit/eslint-config": "0.1.0"
164
169
  },
165
170
  "peerDependencies": {
166
171
  "electron": ">=36"
@@ -0,0 +1,6 @@
1
+ App({
2
+ onLaunch() {},
3
+ onShow() {},
4
+ onHide() {},
5
+ globalData: {}
6
+ })
@@ -0,0 +1,11 @@
1
+ {
2
+ "pages": [
3
+ "pages/index/index"
4
+ ],
5
+ "window": {
6
+ "backgroundTextStyle": "light",
7
+ "navigationBarBackgroundColor": "#fff",
8
+ "navigationBarTitleText": "Blank",
9
+ "navigationBarTextStyle": "black"
10
+ }
11
+ }
@@ -0,0 +1,5 @@
1
+ page {
2
+ background: #f7f7f7;
3
+ font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
4
+ color: #1f1f1f;
5
+ }
@@ -0,0 +1,6 @@
1
+ Page({
2
+ data: {
3
+ message: 'Hello, Dimina'
4
+ },
5
+ onLoad() {}
6
+ })
@@ -0,0 +1,3 @@
1
+ {
2
+ "usingComponents": {}
3
+ }
@@ -0,0 +1,3 @@
1
+ <view class="page">
2
+ <text class="title">{{message}}</text>
3
+ </view>
@@ -0,0 +1,11 @@
1
+ .page {
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ height: 100vh;
6
+ }
7
+
8
+ .title {
9
+ font-size: 36rpx;
10
+ color: #1f1f1f;
11
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "miniprogramRoot": "",
3
+ "projectname": "Blank",
4
+ "description": "Dimina blank mini-program template",
5
+ "appid": "wxblank0000000000",
6
+ "setting": {
7
+ "es6": false,
8
+ "postcss": false,
9
+ "minified": false
10
+ },
11
+ "compileType": "miniprogram",
12
+ "libVersion": "3.8.7"
13
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/sitemap.html",
3
+ "rules": [
4
+ {
5
+ "action": "allow",
6
+ "page": "*"
7
+ }
8
+ ]
9
+ }
@@ -0,0 +1 @@
1
+ require("./runtime"),require("./common"),require("./vendors"),require("./taro"),(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[4],{47:function(e,t,r){"use strict";(function(e){var n=r(17).compose;t.__esModule=!0,t.composeWithDevTools="undefined"!==typeof e&&e.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?e.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"===typeof arguments[0]?n:n.apply(null,arguments)},t.devToolsEnhancer="undefined"!==typeof e&&e.__REDUX_DEVTOOLS_EXTENSION__?e.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}}}).call(this,r(2)["window"])},60:function(e,t,r){},71:function(e,t,r){"use strict";r.r(t);r(50);var n=r(2),o=r(42),i=r(26),c=r(5),u=r(6),a=r(8),p=r(9),d=r(1),s=r.n(d),f=r(18),l=r(17),O=r(47),b=r(3);function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach((function(t){Object(b["a"])(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var j=r(15),h=r(13),y=[{text:"Use Redux",completed:!1,id:0}];function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case h["a"]:return[].concat(Object(j["a"])(e),[{id:e.reduce((function(e,t){return Math.max(t.id,e)}),-1)+1,completed:!1,text:t.text}]);case h["e"]:return e.filter((function(e){return e.id!==t.id}));case h["f"]:return e.map((function(e){return e.id===t.id?v(v({},e),{},{text:t.text}):e}));case h["d"]:return e.map((function(e){return e.id===t.id?v(v({},e),{},{completed:!e.completed}):e}));case h["c"]:var r=e.every((function(e){return e.completed}));return e.map((function(e){return v(v({},e),{},{completed:!r})}));case h["b"]:return e.filter((function(e){return!1===e.completed}));default:return e}}var m=r(14),E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m["b"],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case h["g"]:return t.filter;default:return e}},w=E,x=Object(l["combineReducers"])({todos:g,visibilityFilter:w}),T=x,S=(r(60),r(7)),D=Object(l["createStore"])(T,Object(O["composeWithDevTools"])(Object(l["applyMiddleware"])())),P=function(e){Object(a["a"])(r,e);var t=Object(p["a"])(r);function r(){return Object(c["a"])(this,r),t.apply(this,arguments)}return Object(u["a"])(r,[{key:"render",value:function(){return Object(S["jsx"])(f["a"],{store:D,children:this.props.children})}}]),r}(s.a.Component),N=P,X=r(27),k={pages:["pages/index/index"],window:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#fff",navigationBarTitleText:"WeChat",navigationBarTextStyle:"black"}};n["window"].__taroAppConfig=k;App(Object(o["a"])(N,d,X["a"],k));Object(i["initPxTransform"])({designWidth:750,deviceRatio:{750:1}})}},[[71,0,1,2,3]]]);
@@ -0,0 +1 @@
1
+ {"pages":["pages/index/index"],"window":{"backgroundTextStyle":"light","navigationBarBackgroundColor":"#fff","navigationBarTitleText":"WeChat","navigationBarTextStyle":"black"}}
@@ -0,0 +1 @@
1
+ html{margin:0}body,button,html{padding:0}button{margin:0;border:0;vertical-align:baseline;font-family:inherit;font-weight:inherit;color:inherit}body,page{font:28rpx "Helvetica Neue",Helvetica,Arial,sans-serif;background:#f5f5f5;color:#4d4d4d;margin:0 auto;font-weight:300}:focus{outline:0}.hidden{display:none}.todoapp{background:#fff;margin:210rpx 0 40rpx;position:relative}input::-webkit-input-placeholder{font-style:italic;font-weight:300;color:#e6e6e6}input::-moz-placeholder{font-style:italic;font-weight:300;color:#e6e6e6}.info{margin:130rpx auto 0;color:#bfbfbf;text-shadow:0 2rpx 0 rgba(255,255,255,.5)}.info p{line-height:1}.info a{color:inherit;text-decoration:none;font-weight:400}.info a:hover{text-decoration:underline}.weui-cells_checkbox{margin-right:10rpx}