plannar 0.0.1

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 (347) hide show
  1. package/dist/abap-BW9c03a7.mjs +3 -0
  2. package/dist/actionscript-3-B6AeQsdr.mjs +3 -0
  3. package/dist/ada-UAfcUgld.mjs +3 -0
  4. package/dist/andromeeda-Cu62joT4.mjs +4 -0
  5. package/dist/angular-html-C-eFVAIe.mjs +33 -0
  6. package/dist/angular-ts-BD6BhTYj.mjs +27 -0
  7. package/dist/apache-DWevXWr1.mjs +3 -0
  8. package/dist/apex-TPGYj5YO.mjs +3 -0
  9. package/dist/apl-DUmaAe2b.mjs +17 -0
  10. package/dist/applescript-DOvaC_Oy.mjs +3 -0
  11. package/dist/ara-D-j-XXGW.mjs +3 -0
  12. package/dist/asciidoc-Cds5g02g.mjs +3 -0
  13. package/dist/asm-fKrNhGI-.mjs +3 -0
  14. package/dist/astro-DO4Glno9.mjs +19 -0
  15. package/dist/aurora-x-BB0J0IeM.mjs +4 -0
  16. package/dist/awk-BffybAOE.mjs +3 -0
  17. package/dist/ayu-dark-BIk2eYyl.mjs +4 -0
  18. package/dist/ayu-light-pnpopa_u.mjs +4 -0
  19. package/dist/ayu-mirage-Dq1YQdbW.mjs +4 -0
  20. package/dist/ballerina-BD5CldPU.mjs +3 -0
  21. package/dist/bat-DMbz78YR.mjs +3 -0
  22. package/dist/beancount-CaTd9Bjz.mjs +3 -0
  23. package/dist/berry-BgUsmVaH.mjs +3 -0
  24. package/dist/bibtex-BS9dLuV0.mjs +3 -0
  25. package/dist/bicep-DWRRWjGd.mjs +3 -0
  26. package/dist/bird2-BlSty-nT.mjs +3 -0
  27. package/dist/blade-CH2DZiyx.mjs +21 -0
  28. package/dist/bsl-CJ91opd0.mjs +6 -0
  29. package/dist/c-D_Rf5vw8.mjs +6 -0
  30. package/dist/c3-CC9BmleM.mjs +3 -0
  31. package/dist/cadence-DrOG_Vzs.mjs +3 -0
  32. package/dist/cairo-BP4NeRvu.mjs +6 -0
  33. package/dist/catppuccin-frappe-CSSZy2I0.mjs +4 -0
  34. package/dist/catppuccin-latte-DnTXDnsj.mjs +4 -0
  35. package/dist/catppuccin-macchiato-Ckw0Vhkh.mjs +4 -0
  36. package/dist/catppuccin-mocha-BgepuhoR.mjs +4 -0
  37. package/dist/clarity-BUDmzLZe.mjs +3 -0
  38. package/dist/cli.d.mts +1 -0
  39. package/dist/cli.mjs +23 -0
  40. package/dist/clojure-WWg3It68.mjs +3 -0
  41. package/dist/cmake-DFHdRVuU.mjs +3 -0
  42. package/dist/cobol-BAR5Vngc.mjs +11 -0
  43. package/dist/codeowners-DVDrZMQO.mjs +3 -0
  44. package/dist/codeql-CyBidtfP.mjs +3 -0
  45. package/dist/coffee-BInjHxEE.mjs +6 -0
  46. package/dist/common-lisp-QjFch7-u.mjs +3 -0
  47. package/dist/config-FJViU9hJ.mjs +59 -0
  48. package/dist/coq-BsUrCVvK.mjs +3 -0
  49. package/dist/core/index.d.mts +50 -0
  50. package/dist/core/index.mjs +313 -0
  51. package/dist/core-styles/mdx.css +337 -0
  52. package/dist/core-styles/theme.css +128 -0
  53. package/dist/cpp-CENjCKTD.mjs +25 -0
  54. package/dist/crystal-CXaN9OP7.mjs +19 -0
  55. package/dist/csharp-D-QFUFEE.mjs +3 -0
  56. package/dist/css-C2wCJA_G.mjs +6 -0
  57. package/dist/csv-Cb3ztF11.mjs +3 -0
  58. package/dist/cue-BRViwSb5.mjs +3 -0
  59. package/dist/cypher-DsZ0r_SN.mjs +3 -0
  60. package/dist/d-DeVAByS9.mjs +3 -0
  61. package/dist/dark-plus-DnPTOHJQ.mjs +4 -0
  62. package/dist/dart-DWVGvPVl.mjs +3 -0
  63. package/dist/dax-CCVgOCrm.mjs +3 -0
  64. package/dist/desktop-BLG2KUib.mjs +3 -0
  65. package/dist/diff-CR6iDLhj.mjs +3 -0
  66. package/dist/docker-ByH34NvG.mjs +3 -0
  67. package/dist/dotenv-el5rplMn.mjs +3 -0
  68. package/dist/dracula-CpEdEQts.mjs +4 -0
  69. package/dist/dracula-soft-CZr0C0df.mjs +4 -0
  70. package/dist/dream-maker-DDljGJt4.mjs +3 -0
  71. package/dist/edge-no12TFHE.mjs +13 -0
  72. package/dist/editor/components.json +25 -0
  73. package/dist/editor/dist/assets/index-B0kdJwfN.js +11 -0
  74. package/dist/editor/dist/assets/index-CZwLh2NU.css +2 -0
  75. package/dist/editor/dist/index.html +25 -0
  76. package/dist/editor/index.html +24 -0
  77. package/dist/editor/package.json +35 -0
  78. package/dist/editor/src/app.tsx +82 -0
  79. package/dist/editor/src/comment-box.tsx +113 -0
  80. package/dist/editor/src/comment-list.tsx +118 -0
  81. package/dist/editor/src/comment-overlay.tsx +122 -0
  82. package/dist/editor/src/comment-state.tsx +120 -0
  83. package/dist/editor/src/comment-toggle.tsx +28 -0
  84. package/dist/editor/src/components/ui/button.tsx +58 -0
  85. package/dist/editor/src/components/ui/dialog.tsx +136 -0
  86. package/dist/editor/src/components/ui/popover.tsx +75 -0
  87. package/dist/editor/src/components/ui/sonner.tsx +21 -0
  88. package/dist/editor/src/components/ui/textarea.tsx +18 -0
  89. package/dist/editor/src/components/ui/tooltip.tsx +54 -0
  90. package/dist/editor/src/grep-source.ts +95 -0
  91. package/dist/editor/src/index.css +36 -0
  92. package/dist/editor/src/lib/utils.ts +6 -0
  93. package/dist/editor/src/main.tsx +10 -0
  94. package/dist/editor/src/mdx.d.ts +4 -0
  95. package/dist/editor/src/plan-list.tsx +42 -0
  96. package/dist/editor/src/plan-view.tsx +107 -0
  97. package/dist/editor/src/plannar.d.ts +6 -0
  98. package/dist/editor/src/prompt-dialog.tsx +61 -0
  99. package/dist/editor/src/sample.mdx +69 -0
  100. package/dist/editor/tsconfig.json +23 -0
  101. package/dist/editor/vite.config.ts +14 -0
  102. package/dist/editor/vite.shared.d.ts +12 -0
  103. package/dist/editor/vite.shared.ts +265 -0
  104. package/dist/editor-Bv5RTgcT.mjs +59 -0
  105. package/dist/elixir-SbOgBhDM.mjs +6 -0
  106. package/dist/elm-BRsMBjKT.mjs +6 -0
  107. package/dist/emacs-lisp-C8HQcRPk.mjs +3 -0
  108. package/dist/erb-C1_C5jep.mjs +11 -0
  109. package/dist/erlang-C5gFQJZg.mjs +6 -0
  110. package/dist/everforest-dark-BAMXVMpE.mjs +4 -0
  111. package/dist/everforest-light-C_EkXd7H.mjs +4 -0
  112. package/dist/export-BPZixWW4.mjs +59476 -0
  113. package/dist/fennel-BBDzQpxJ.mjs +3 -0
  114. package/dist/fish-BVKcOoo3.mjs +3 -0
  115. package/dist/fluent-CiEY0tx7.mjs +3 -0
  116. package/dist/fortran-fixed-form-DPiyERAR.mjs +6 -0
  117. package/dist/fortran-free-form-Dy4Ia3xC.mjs +3 -0
  118. package/dist/fsharp-BXAgfpA4.mjs +6 -0
  119. package/dist/gdresource-CRXhH7lA.mjs +11 -0
  120. package/dist/gdscript-DUk6d3qS.mjs +3 -0
  121. package/dist/gdshader-DJwZO-zm.mjs +3 -0
  122. package/dist/genie-B2jvDwB3.mjs +3 -0
  123. package/dist/gherkin-CFYsr5Em.mjs +3 -0
  124. package/dist/git-commit-Bb8y57z7.mjs +6 -0
  125. package/dist/git-rebase-BECFh1Cx.mjs +6 -0
  126. package/dist/github-dark-DvHYl2p7.mjs +4 -0
  127. package/dist/github-dark-default-MALL2Q4C.mjs +4 -0
  128. package/dist/github-dark-dimmed-CFzqRqSr.mjs +4 -0
  129. package/dist/github-dark-high-contrast-Be0PQ9D9.mjs +4 -0
  130. package/dist/github-light-B84bxdHo.mjs +4 -0
  131. package/dist/github-light-default-B49MFeR5.mjs +4 -0
  132. package/dist/github-light-high-contrast-B9ThWYcN.mjs +4 -0
  133. package/dist/gleam-B7e4lIXe.mjs +3 -0
  134. package/dist/glimmer-js-BxRSm1Iz.mjs +15 -0
  135. package/dist/glimmer-ts-B-PXhnA-.mjs +15 -0
  136. package/dist/glsl-DCpEHOoJ.mjs +8 -0
  137. package/dist/gn-oCpvJfaB.mjs +3 -0
  138. package/dist/gnuplot-DGkrsXyD.mjs +3 -0
  139. package/dist/go-DOBPmz4q.mjs +3 -0
  140. package/dist/graphql-KsWq5dbl.mjs +17 -0
  141. package/dist/groovy-JRvXAe6e.mjs +3 -0
  142. package/dist/gruvbox-dark-hard-DZtjD3-K.mjs +4 -0
  143. package/dist/gruvbox-dark-medium-CnvJvh1e.mjs +4 -0
  144. package/dist/gruvbox-dark-soft-DT7fdnlk.mjs +4 -0
  145. package/dist/gruvbox-light-hard-Z0yBUPTq.mjs +4 -0
  146. package/dist/gruvbox-light-medium-VcFR0ZPw.mjs +4 -0
  147. package/dist/gruvbox-light-soft-BjpMTObq.mjs +4 -0
  148. package/dist/hack-Dl36VvRT.mjs +11 -0
  149. package/dist/haml-CybNLmKL.mjs +13 -0
  150. package/dist/handlebars-CjcvRR6G.mjs +15 -0
  151. package/dist/haskell-9GVaCDAy.mjs +3 -0
  152. package/dist/haxe-BjwmQP6x.mjs +3 -0
  153. package/dist/hcl-CGDoStcp.mjs +3 -0
  154. package/dist/hjson-CH_gnwQd.mjs +3 -0
  155. package/dist/hlsl-ivzEgiy0.mjs +3 -0
  156. package/dist/horizon-BAPJOej1.mjs +4 -0
  157. package/dist/horizon-bright-CBbQxVuj.mjs +4 -0
  158. package/dist/houston-Bsel4WXn.mjs +4 -0
  159. package/dist/html-DfZ5CvWO.mjs +13 -0
  160. package/dist/html-derivative-Bl2uHcRG.mjs +6 -0
  161. package/dist/http-2GSJ1Ota.mjs +15 -0
  162. package/dist/hurl-BuTA3a1U.mjs +13 -0
  163. package/dist/hxml-CIJx3GAL.mjs +6 -0
  164. package/dist/hy-CFVRK0Nt.mjs +3 -0
  165. package/dist/imba-CpUXJ8TV.mjs +3 -0
  166. package/dist/ini-CdpG8IPX.mjs +3 -0
  167. package/dist/init-CK5HMoQf.mjs +228 -0
  168. package/dist/java-Dd2Sr4ei.mjs +6 -0
  169. package/dist/javascript-CZ7QJWaI.mjs +6 -0
  170. package/dist/jinja-rGuAaq8y.mjs +10 -0
  171. package/dist/jison-f_1eFoen.mjs +6 -0
  172. package/dist/json-ufdHUD6V.mjs +6 -0
  173. package/dist/json5-7RecBf2_.mjs +3 -0
  174. package/dist/jsonc-CBGnPf32.mjs +3 -0
  175. package/dist/jsonl-CmLQaM5O.mjs +3 -0
  176. package/dist/jsonnet-tXOQdkDx.mjs +3 -0
  177. package/dist/jssm-CtDTf-es.mjs +3 -0
  178. package/dist/jsx-BY17L1TJ.mjs +6 -0
  179. package/dist/julia-jv62bi7k.mjs +17 -0
  180. package/dist/just-C6qr4mXt.mjs +19 -0
  181. package/dist/kanagawa-dragon-BDtUi23j.mjs +4 -0
  182. package/dist/kanagawa-lotus-BBtsE-9U.mjs +4 -0
  183. package/dist/kanagawa-wave-DehP6Jw_.mjs +4 -0
  184. package/dist/kdl-DGaDNPP2.mjs +3 -0
  185. package/dist/kotlin-B10KLoOh.mjs +3 -0
  186. package/dist/kusto-iwa79TLz.mjs +3 -0
  187. package/dist/laserwave-oGyAE_TK.mjs +4 -0
  188. package/dist/latex-bq3Inh3R.mjs +6 -0
  189. package/dist/lean-CIMS95nW.mjs +3 -0
  190. package/dist/less-BmQG9s2A.mjs +3 -0
  191. package/dist/light-plus-BKYJg4pO.mjs +4 -0
  192. package/dist/liquid-BGg1u_N2.mjs +15 -0
  193. package/dist/llvm-D_R1tubu.mjs +3 -0
  194. package/dist/log-A1ddhKk2.mjs +3 -0
  195. package/dist/logo-CAINsCxc.mjs +3 -0
  196. package/dist/lua-Ctym3rMV.mjs +8 -0
  197. package/dist/luau-CAYz1b8d.mjs +3 -0
  198. package/dist/make-BoMd6Eg0.mjs +3 -0
  199. package/dist/markdown-q2UTVhPv.mjs +3 -0
  200. package/dist/marko-3VCDTT2m.mjs +15 -0
  201. package/dist/material-theme-B5VoDPKV.mjs +4 -0
  202. package/dist/material-theme-darker-B1HCXk1e.mjs +4 -0
  203. package/dist/material-theme-lighter-Cj_YmAmc.mjs +4 -0
  204. package/dist/material-theme-ocean-BaeR8VhB.mjs +4 -0
  205. package/dist/material-theme-palenight-DieYMRIR.mjs +4 -0
  206. package/dist/matlab-BmW78Ua4.mjs +3 -0
  207. package/dist/mdc-n4CFO8GD.mjs +13 -0
  208. package/dist/mdx-IgTZ_PsQ.mjs +3 -0
  209. package/dist/mermaid-D1WKgk1u.mjs +3 -0
  210. package/dist/min-dark-Da4XHK1C.mjs +4 -0
  211. package/dist/min-light-B1G-gK7R.mjs +4 -0
  212. package/dist/mipsasm-D__MkRT6.mjs +3 -0
  213. package/dist/mojo-CMCD6kSt.mjs +3 -0
  214. package/dist/monokai-Dja8c9XW.mjs +4 -0
  215. package/dist/moonbit-BmzABvgk.mjs +3 -0
  216. package/dist/move-CtOzYpc7.mjs +3 -0
  217. package/dist/narrat-C8ZM2zHi.mjs +3 -0
  218. package/dist/nextflow-BuXhAF6g.mjs +6 -0
  219. package/dist/nextflow-groovy-BucdoGBt.mjs +3 -0
  220. package/dist/nginx-DCav9fr2.mjs +6 -0
  221. package/dist/night-owl-CFEDim2c.mjs +4 -0
  222. package/dist/night-owl-light-BABXmJim.mjs +4 -0
  223. package/dist/nim-D9QPp5kW.mjs +21 -0
  224. package/dist/nix-_kfSRp5x.mjs +7 -0
  225. package/dist/nord-BEvLRKJz.mjs +4 -0
  226. package/dist/nushell-CG6WVreI.mjs +3 -0
  227. package/dist/objective-c-DOVmNqC4.mjs +3 -0
  228. package/dist/objective-cpp-BWlpWva0.mjs +3 -0
  229. package/dist/ocaml-Wwmuez2Q.mjs +3 -0
  230. package/dist/odin-ByfuPSu8.mjs +3 -0
  231. package/dist/one-dark-pro-CXLLrmxx.mjs +4 -0
  232. package/dist/one-light-1TrAkc9b.mjs +4 -0
  233. package/dist/openscad-CYYW-Lvy.mjs +3 -0
  234. package/dist/pascal-DlWtMFUC.mjs +3 -0
  235. package/dist/perl-F1w6BTW4.mjs +17 -0
  236. package/dist/php-D5RNc8cb.mjs +19 -0
  237. package/dist/pkl-BJSLmUc7.mjs +3 -0
  238. package/dist/plastic-BOdHQ7hi.mjs +4 -0
  239. package/dist/plsql-CtnOltln.mjs +3 -0
  240. package/dist/po-ChBiJtw3.mjs +3 -0
  241. package/dist/poimandres-sZlsXmSW.mjs +4 -0
  242. package/dist/polar-BRgTqojJ.mjs +3 -0
  243. package/dist/postcss-DAhKZdRf.mjs +3 -0
  244. package/dist/powerquery-BKTL9xfg.mjs +3 -0
  245. package/dist/powershell-BmCCV9e7.mjs +3 -0
  246. package/dist/prisma-C-mW5eQ1.mjs +3 -0
  247. package/dist/prolog-BG0_G0sz.mjs +3 -0
  248. package/dist/proto-Cjvlr4bQ.mjs +3 -0
  249. package/dist/pug-BoqONK6L.mjs +13 -0
  250. package/dist/puppet-CjFnVLMe.mjs +3 -0
  251. package/dist/purescript-Vb2OcJR8.mjs +3 -0
  252. package/dist/python-ARgqtcr9.mjs +3 -0
  253. package/dist/qml-CN98xHYu.mjs +6 -0
  254. package/dist/qmldir-BR3wWyS0.mjs +3 -0
  255. package/dist/qss-Baln5J4y.mjs +3 -0
  256. package/dist/r-CgkRbgWa.mjs +6 -0
  257. package/dist/racket-HuXCA8Np.mjs +3 -0
  258. package/dist/raku--XBLzYuF.mjs +3 -0
  259. package/dist/razor-D9GoeIvC.mjs +11 -0
  260. package/dist/red-DieXtVH2.mjs +4 -0
  261. package/dist/reg-N3tN4G1s.mjs +3 -0
  262. package/dist/regexp-Cmzs-b17.mjs +6 -0
  263. package/dist/registry-metadata/index.d.mts +40 -0
  264. package/dist/registry-metadata/index.mjs +163 -0
  265. package/dist/rel-BWA2fVVw.mjs +3 -0
  266. package/dist/riscv-CNsUL9F1.mjs +3 -0
  267. package/dist/ron-C_zPdle-.mjs +3 -0
  268. package/dist/rose-pine-NQGQN_Py.mjs +4 -0
  269. package/dist/rose-pine-dawn-CDEuRC-V.mjs +4 -0
  270. package/dist/rose-pine-moon-DN6_RPeE.mjs +4 -0
  271. package/dist/rosmsg-yiq-v07k.mjs +3 -0
  272. package/dist/rst-BMhVqyG1.mjs +23 -0
  273. package/dist/ruby-C7SejiSM.mjs +31 -0
  274. package/dist/rust-DYp2JQv-.mjs +3 -0
  275. package/dist/sas-CGU-Ko3q.mjs +6 -0
  276. package/dist/sass-DVKushYG.mjs +3 -0
  277. package/dist/scala-lpjTPFHX.mjs +3 -0
  278. package/dist/scheme-wOQJFUig.mjs +3 -0
  279. package/dist/scss-zkWWQrdN.mjs +8 -0
  280. package/dist/sdbl--PnDxzGT.mjs +3 -0
  281. package/dist/shaderlab-i7KCgReF.mjs +6 -0
  282. package/dist/shellscript-CaJ5viEZ.mjs +6 -0
  283. package/dist/shellsession-DuB7oTvQ.mjs +6 -0
  284. package/dist/slack-dark-6rIBdtCf.mjs +4 -0
  285. package/dist/slack-ochin-nUh4VZSG.mjs +4 -0
  286. package/dist/smalltalk-n_YRhdTv.mjs +3 -0
  287. package/dist/snazzy-light-DkuQw6Z-.mjs +4 -0
  288. package/dist/solarized-dark-DG_xfWAC.mjs +4 -0
  289. package/dist/solarized-light-CIcPm0uy.mjs +4 -0
  290. package/dist/solidity-BpTVGGR3.mjs +3 -0
  291. package/dist/soy-lf7Er5NU.mjs +6 -0
  292. package/dist/sparql-Bk-JyIQk.mjs +6 -0
  293. package/dist/splunk-D1Az7tvn.mjs +3 -0
  294. package/dist/sql-D1uCIb-4.mjs +6 -0
  295. package/dist/ssh-config-DAsGgEig.mjs +3 -0
  296. package/dist/stata-DenNw7ri.mjs +6 -0
  297. package/dist/status-gCBxoymh.mjs +97 -0
  298. package/dist/stylus-CNLem3u-.mjs +3 -0
  299. package/dist/surrealql-CCYzU3tm.mjs +6 -0
  300. package/dist/svelte-C36RW4eY.mjs +15 -0
  301. package/dist/swift-DAcVMcFy.mjs +3 -0
  302. package/dist/synthwave-84-gkUURId2.mjs +4 -0
  303. package/dist/system-verilog-CL1nVinO.mjs +3 -0
  304. package/dist/systemd-C7P5y8lI.mjs +3 -0
  305. package/dist/talonscript-BE-x9pgh.mjs +3 -0
  306. package/dist/tasl-C7s9745E.mjs +3 -0
  307. package/dist/tcl-BLsPJ7iC.mjs +3 -0
  308. package/dist/templ-Dte43-Eo.mjs +13 -0
  309. package/dist/terraform-v0Ek_rks.mjs +3 -0
  310. package/dist/tex-CRJxStv9.mjs +6 -0
  311. package/dist/tokyo-night-Oja5OrLi.mjs +4 -0
  312. package/dist/toml-wLAVRnMH.mjs +3 -0
  313. package/dist/ts-tags-Cs6jrN-1.mjs +59 -0
  314. package/dist/tsv-Qo5b4XGG.mjs +3 -0
  315. package/dist/tsx-CZnUd1jF.mjs +6 -0
  316. package/dist/turtle-Bo7XW2KG.mjs +3 -0
  317. package/dist/twig-A2qf0tKU.mjs +19 -0
  318. package/dist/typescript-DgW8lbMR.mjs +6 -0
  319. package/dist/typespec-DvXBeCkw.mjs +3 -0
  320. package/dist/typst-D73qYMMw.mjs +3 -0
  321. package/dist/v-CpO787mz.mjs +3 -0
  322. package/dist/vala-BqFlVoH_.mjs +3 -0
  323. package/dist/vb-Bo7BiOwD.mjs +3 -0
  324. package/dist/verilog-DABjKKO6.mjs +3 -0
  325. package/dist/vesper-tVhzEr-k.mjs +4 -0
  326. package/dist/vhdl-CB8TvDTZ.mjs +3 -0
  327. package/dist/viml-CuM98KEF.mjs +3 -0
  328. package/dist/vitesse-black-P6rRX5YD.mjs +4 -0
  329. package/dist/vitesse-dark-Di9MWjvq.mjs +4 -0
  330. package/dist/vitesse-light-ChosFYw8.mjs +4 -0
  331. package/dist/vue-BtFfPSdA.mjs +31 -0
  332. package/dist/vue-html-BIVhvoTt.mjs +6 -0
  333. package/dist/vue-vine-BRJbnPV0.mjs +19 -0
  334. package/dist/vyper-DYoGCYmu.mjs +3 -0
  335. package/dist/wasm-DhFUmAQm.mjs +7 -0
  336. package/dist/wasm-NKC9-wJ8.mjs +3 -0
  337. package/dist/wenyan-CCNBOs6Y.mjs +3 -0
  338. package/dist/wgsl-n1IZMc_u.mjs +3 -0
  339. package/dist/wikitext-5isXOJoG.mjs +3 -0
  340. package/dist/wit-BP1frIMq.mjs +3 -0
  341. package/dist/wolfram-e8E-o4Bx.mjs +3 -0
  342. package/dist/xml-czz4UX4-.mjs +8 -0
  343. package/dist/xsl-BL1DqGMX.mjs +6 -0
  344. package/dist/yaml-B2yUh7a5.mjs +6 -0
  345. package/dist/zenscript-kGsI2Rqh.mjs +3 -0
  346. package/dist/zig-C5f0bk_4.mjs +3 -0
  347. package/package.json +48 -0
@@ -0,0 +1,42 @@
1
+ import { plans, plansDir } from "virtual:plannar-plans";
2
+
3
+ interface PlanListProps {
4
+ navigate: (to: string) => void;
5
+ }
6
+
7
+ export function PlanList({ navigate }: PlanListProps) {
8
+ const planList = plans.map((f) => f.replace(/\.mdx$/, ""));
9
+
10
+ if (planList.length === 0) {
11
+ return (
12
+ <div>
13
+ <h1>Plannar Editor</h1>
14
+ <p>No plans found in {plansDir}.</p>
15
+ <p>
16
+ Run <code>plannar init</code> to create your first plan.
17
+ </p>
18
+ </div>
19
+ );
20
+ }
21
+
22
+ return (
23
+ <div>
24
+ <h1>Plans</h1>
25
+ <ul>
26
+ {planList.map((name) => (
27
+ <li key={name}>
28
+ <a
29
+ href={`/${name}`}
30
+ onClick={(e) => {
31
+ e.preventDefault();
32
+ navigate(`/${name}`);
33
+ }}
34
+ >
35
+ {name}
36
+ </a>
37
+ </li>
38
+ ))}
39
+ </ul>
40
+ </div>
41
+ );
42
+ }
@@ -0,0 +1,107 @@
1
+ import { Suspense, lazy, useMemo, useEffect, useRef } from "react";
2
+ import { useCommentState } from "./comment-state.js";
3
+ import { CommentOverlay } from "./comment-overlay.js";
4
+
5
+ interface PlanViewProps {
6
+ slug: string;
7
+ navigate: (to: string) => void;
8
+ }
9
+
10
+ function PlanNotFound({ slug, navigate }: { slug: string; navigate: (to: string) => void }) {
11
+ return (
12
+ <div>
13
+ <h1>Plan not found</h1>
14
+ <p>
15
+ No plan named <code>{slug}</code> found.
16
+ </p>
17
+ <p>
18
+ <a
19
+ href="/"
20
+ onClick={(e) => {
21
+ e.preventDefault();
22
+ navigate("/");
23
+ }}
24
+ >
25
+ &larr; Back
26
+ </a>
27
+ </p>
28
+ </div>
29
+ );
30
+ }
31
+
32
+ function Loading() {
33
+ return <p>Loading plan...</p>;
34
+ }
35
+
36
+ function createPlanComponent(slug: string, navigate: (to: string) => void) {
37
+ return lazy(() =>
38
+ import(/* @vite-ignore */ `/__plannar/plan/${slug}.js`).catch(() => ({
39
+ default: () => <PlanNotFound slug={slug} navigate={navigate} />,
40
+ })),
41
+ );
42
+ }
43
+
44
+ function clearCommentable(root: HTMLElement) {
45
+ for (const el of root.querySelectorAll("[data-commentable]")) {
46
+ delete (el as HTMLElement).dataset.commentable;
47
+ delete (el as HTMLElement).dataset.commentableText;
48
+ }
49
+ }
50
+
51
+ function MarkCommentable({ children }: { children: React.ReactNode }) {
52
+ const ref = useRef<HTMLDivElement>(null);
53
+ const { mode } = useCommentState();
54
+
55
+ useEffect(() => {
56
+ if (!ref.current) return;
57
+ clearCommentable(ref.current);
58
+ if (!mode) return;
59
+ const headings = ref.current.querySelectorAll("h1, h2, h3, h4, h5, h6");
60
+ for (const el of headings) {
61
+ (el as HTMLElement).dataset.commentable = "heading";
62
+ (el as HTMLElement).dataset.commentableText = el.textContent?.slice(0, 120) || "";
63
+ }
64
+ const codeBlocks = ref.current.querySelectorAll("figure[data-rehype-pretty-code-figure], pre");
65
+ for (const el of codeBlocks) {
66
+ (el as HTMLElement).dataset.commentable = "code";
67
+ (el as HTMLElement).dataset.commentableText = el.textContent?.slice(0, 120) || "";
68
+ }
69
+ const allChildren = ref.current.querySelectorAll(
70
+ "p, ul, ol, blockquote, table, input, textarea, button, select, label",
71
+ );
72
+ for (const el of allChildren) {
73
+ if ((el as HTMLElement).dataset.commentable) continue;
74
+ (el as HTMLElement).dataset.commentable = "block";
75
+ (el as HTMLElement).dataset.commentableText = el.textContent?.slice(0, 120) || "";
76
+ }
77
+ }, [mode, children]);
78
+
79
+ return <div ref={ref}>{children}</div>;
80
+ }
81
+
82
+ export function PlanView({ slug, navigate }: PlanViewProps) {
83
+ const PlanComponent = useMemo(() => createPlanComponent(slug, navigate), [slug, navigate]);
84
+
85
+ return (
86
+ <div>
87
+ <p>
88
+ <a
89
+ href="/"
90
+ onClick={(e) => {
91
+ e.preventDefault();
92
+ navigate("/");
93
+ }}
94
+ >
95
+ &larr; All plans
96
+ </a>
97
+ </p>
98
+ <CommentOverlay planFile={`${slug}.mdx`}>
99
+ <MarkCommentable>
100
+ <Suspense fallback={<Loading />}>
101
+ <PlanComponent />
102
+ </Suspense>
103
+ </MarkCommentable>
104
+ </CommentOverlay>
105
+ </div>
106
+ );
107
+ }
@@ -0,0 +1,6 @@
1
+ declare module "virtual:plannar-global-css" {}
2
+
3
+ declare module "virtual:plannar-plans" {
4
+ export const plans: string[];
5
+ export const plansDir: string;
6
+ }
@@ -0,0 +1,61 @@
1
+ import { useState, useCallback } from "react";
2
+ import { Copy, Check } from "lucide-react";
3
+ import {
4
+ Dialog,
5
+ DialogContent,
6
+ DialogHeader,
7
+ DialogTitle,
8
+ DialogDescription,
9
+ } from "./components/ui/dialog.js";
10
+ import { useCommentState } from "./comment-state.js";
11
+ import { generatePrompt } from "./grep-source.js";
12
+
13
+ type PromptDialogProps = {
14
+ open: boolean;
15
+ onOpenChange: (open: boolean) => void;
16
+ };
17
+
18
+ export function PromptDialog({ open, onOpenChange }: PromptDialogProps) {
19
+ const { comments } = useCommentState();
20
+ const [copied, setCopied] = useState(false);
21
+
22
+ const prompt = generatePrompt(comments);
23
+
24
+ const handleCopy = useCallback(() => {
25
+ void navigator.clipboard.writeText(prompt).then(() => {
26
+ setCopied(true);
27
+ setTimeout(() => setCopied(false), 2000);
28
+ });
29
+ }, [prompt]);
30
+
31
+ return (
32
+ <Dialog open={open} onOpenChange={onOpenChange}>
33
+ <DialogContent className="sm:max-w-lg">
34
+ <DialogHeader>
35
+ <DialogTitle>Generated Prompt</DialogTitle>
36
+ <DialogDescription>Ready to paste into any LLM</DialogDescription>
37
+ </DialogHeader>
38
+
39
+ <div className="bg-zinc-950 rounded-lg p-4 overflow-auto max-h-80">
40
+ <pre className="whitespace-pre-wrap text-[12px] leading-relaxed text-zinc-300 font-mono">
41
+ <code>{prompt || "No comments to generate."}</code>
42
+ </pre>
43
+ </div>
44
+
45
+ <div className="flex items-center justify-between text-[10px] text-muted-foreground">
46
+ <span>
47
+ {comments.length} comment{comments.length !== 1 ? "s" : ""}
48
+ </span>
49
+ <button
50
+ onClick={handleCopy}
51
+ disabled={!prompt}
52
+ className="inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1 text-xs text-foreground hover:bg-muted disabled:opacity-50"
53
+ >
54
+ {copied ? <Check className="size-3 text-green-500" /> : <Copy className="size-3" />}
55
+ {copied ? "Copied" : "Copy"}
56
+ </button>
57
+ </div>
58
+ </DialogContent>
59
+ </Dialog>
60
+ );
61
+ }
@@ -0,0 +1,69 @@
1
+ import { Button } from "@/components/ui/button";
2
+ import { Checkbox } from "@/components/ui/checkbox";
3
+
4
+ # Plannar Editor
5
+
6
+ A comprehensive MDX renderer with state binding playgrounds.
7
+
8
+ ## Features
9
+
10
+ - **GitHub Flavored Markdown** via `remark-gfm`
11
+ - **Syntax highlighting** via `rehype-pretty-code`
12
+ - **Auto-linked headings** via `rehype-autolink-headings`
13
+ - **shadcn/ui** components in playgrounds
14
+
15
+ ### Code Example
16
+
17
+ ```ts
18
+ function hello(name: string): string {
19
+ return `Hello, ${name}!`;
20
+ }
21
+ ```
22
+
23
+ ### GFM Table
24
+
25
+ | Feature | Status |
26
+ | ------- | ------ |
27
+ | GFM | ✓ |
28
+ | Code | ✓ |
29
+ | State | ✓ |
30
+
31
+ ## Playground
32
+
33
+ Native `<input>` with `bind="text:'Hello world'"` auto-wires `value` + `onChange`:
34
+
35
+ <Playground>
36
+ <input
37
+ bind="text:'Hello world'"
38
+ placeholder="Type something..."
39
+ className="h-8 w-full rounded-lg border border-input bg-transparent px-2.5 py-1 text-sm"
40
+ />
41
+ <p>You typed: {text}</p>
42
+ </Playground>
43
+
44
+ `<Button>` with `bind="count:0"` creates state only — you wire `onClick` manually:
45
+
46
+ <Playground>
47
+ <Button bind="count:0" onClick={() => setCount(count + 1)} variant="outline">
48
+ Clicked {count} times
49
+ </Button>
50
+ </Playground>
51
+
52
+ `<Checkbox>` with `bind="checked:true"` auto-wires `checked` + `onCheckedChange`:
53
+
54
+ <Playground>
55
+ <label>
56
+ <Checkbox bind="checked:true" /> Toggle me ({String(checked)})
57
+ </label>
58
+ </Playground>
59
+
60
+ Number `<input>` with `bind="amount:10"` auto-wires `value` + `onChange`:
61
+
62
+ <Playground>
63
+ <input
64
+ type="number"
65
+ bind="amount:10"
66
+ className="h-8 w-full rounded-lg border border-input bg-transparent px-2.5 py-1 text-sm"
67
+ />
68
+ <p>Amount: {amount}</p>
69
+ </Playground>
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2023",
4
+ "module": "esnext",
5
+ "lib": ["ES2023", "DOM"],
6
+ "types": ["vite-plus/client"],
7
+ "skipLibCheck": true,
8
+ "moduleResolution": "bundler",
9
+ "allowImportingTsExtensions": true,
10
+ "verbatimModuleSyntax": true,
11
+ "moduleDetection": "force",
12
+ "noEmit": true,
13
+ "noUnusedLocals": true,
14
+ "noUnusedParameters": true,
15
+ "erasableSyntaxOnly": true,
16
+ "noFallthroughCasesInSwitch": true,
17
+ "jsx": "react-jsx",
18
+ "paths": {
19
+ "@/*": ["./src/*"]
20
+ }
21
+ },
22
+ "include": ["src"]
23
+ }
@@ -0,0 +1,14 @@
1
+ import { defineConfig } from "vite";
2
+ import { fileURLToPath } from "node:url";
3
+ import { resolve } from "node:path";
4
+ import { createEditorViteConfig } from "./vite.shared.ts";
5
+
6
+ const __dirname = fileURLToPath(new URL(".", import.meta.url));
7
+ const workspaceRoot = process.env.PLANNAR_CWD ?? resolve(__dirname, "../..");
8
+
9
+ export default defineConfig(
10
+ createEditorViteConfig({
11
+ appDir: __dirname,
12
+ workspaceRoot,
13
+ }),
14
+ );
@@ -0,0 +1,12 @@
1
+ import type { BindingMeta } from "../core/index.mjs";
2
+ import type { UserConfig } from "vite";
3
+ export declare const shadcnBindings: Record<string, BindingMeta>;
4
+ export declare function isSafePlanSlug(slug: string): boolean;
5
+ export declare function resolvePlanPath(plansDir: string, slug: string): string | null;
6
+ export declare function injectTailwindSource(css: string, plannarRoot: string): string;
7
+ type CreateEditorViteConfigOptions = {
8
+ appDir: string;
9
+ workspaceRoot: string;
10
+ };
11
+ export declare function createEditorViteConfig({ appDir, workspaceRoot, }: CreateEditorViteConfigOptions): UserConfig;
12
+ export {};
@@ -0,0 +1,265 @@
1
+ import react from "@vitejs/plugin-react";
2
+ import tailwindcss from "@tailwindcss/vite";
3
+ import { mdxPlugin, generateMdx } from "../core/index.mjs";
4
+ import type { BindingMeta } from "../core/index.mjs";
5
+ import { existsSync, readFileSync, readdirSync } from "node:fs";
6
+ import { join, resolve } from "node:path";
7
+ import type { Plugin, UserConfig } from "vite";
8
+
9
+ export const shadcnBindings: Record<string, BindingMeta> = {
10
+ input: {
11
+ valueProp: "value",
12
+ changeProp: "onChange",
13
+ extract: "e.target.value",
14
+ },
15
+ checkbox: {
16
+ valueProp: "checked",
17
+ changeProp: "onCheckedChange",
18
+ extract: "e",
19
+ },
20
+ };
21
+
22
+ function resolveUserMeta(): Record<string, BindingMeta> {
23
+ const raw = process.env.PLANNAR_META;
24
+ if (!raw) return {};
25
+ let parsed: unknown;
26
+ try {
27
+ parsed = JSON.parse(raw);
28
+ } catch (err) {
29
+ console.warn("[plannar] Failed to parse PLANNAR_META as JSON; ignoring.", err);
30
+ return {};
31
+ }
32
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
33
+ console.warn("[plannar] PLANNAR_META must be a JSON object; ignoring.");
34
+ return {};
35
+ }
36
+ return parsed as Record<string, BindingMeta>;
37
+ }
38
+
39
+ const SAFE_PLAN_SEGMENT = /^[a-z0-9][a-z0-9_-]*$/;
40
+
41
+ export function isSafePlanSlug(slug: string): boolean {
42
+ if (!slug || slug.includes("\\") || slug.startsWith("/") || slug.endsWith("/")) {
43
+ return false;
44
+ }
45
+
46
+ return slug.split("/").every((segment) => SAFE_PLAN_SEGMENT.test(segment));
47
+ }
48
+
49
+ export function resolvePlanPath(plansDir: string, slug: string): string | null {
50
+ if (!isSafePlanSlug(slug)) {
51
+ return null;
52
+ }
53
+
54
+ const plansRoot = resolve(plansDir);
55
+ const planPath = resolve(plansRoot, `${slug}.mdx`);
56
+ const plansPrefix = `${plansRoot}${process.platform === "win32" ? "\\" : "/"}`;
57
+
58
+ return planPath.startsWith(plansPrefix) ? planPath : null;
59
+ }
60
+
61
+ function hoistImports(code: string): string {
62
+ const imports: string[] = [];
63
+ const rest: string[] = [];
64
+
65
+ for (const line of code.split("\n")) {
66
+ if (line.startsWith("import ")) {
67
+ imports.push(line);
68
+ } else {
69
+ rest.push(line);
70
+ }
71
+ }
72
+
73
+ return [...imports, ...rest].join("\n");
74
+ }
75
+
76
+ function createPlannarPlansPlugin(plansDir: string, bindings: Record<string, BindingMeta>): Plugin {
77
+ return {
78
+ name: "plannar-plans",
79
+ resolveId(id: string) {
80
+ if (id === "virtual:plannar-plans") return "\0plannar-plans";
81
+
82
+ const planMatch = id.match(/^virtual:plannar-plan\/(.+)$/);
83
+ if (planMatch && isSafePlanSlug(planMatch[1])) {
84
+ return `\0plannar-plan/${planMatch[1]}`;
85
+ }
86
+
87
+ const sourceMatch = id.match(/^virtual:plannar-plan-source\/(.+)$/);
88
+ if (sourceMatch && isSafePlanSlug(sourceMatch[1])) {
89
+ return `\0plannar-plan-source/${sourceMatch[1]}`;
90
+ }
91
+
92
+ const sourceHttpMatch = id.match(/^\/__plannar\/plan-source\/(.+)\.js$/);
93
+ if (sourceHttpMatch && isSafePlanSlug(sourceHttpMatch[1])) {
94
+ return `\0plannar-plan-source/${sourceHttpMatch[1]}`;
95
+ }
96
+
97
+ const httpMatch = id.match(/^\/__plannar\/plan\/(.+)\.js$/);
98
+ if (httpMatch && isSafePlanSlug(httpMatch[1])) {
99
+ return `\0plannar-plan/${httpMatch[1]}`;
100
+ }
101
+ },
102
+ async load(id: string) {
103
+ if (id === "\0plannar-plans") {
104
+ let files: string[] = [];
105
+
106
+ try {
107
+ files = readdirSync(plansDir).filter((file) => file.endsWith(".mdx"));
108
+ } catch {
109
+ // Plans directory does not exist yet.
110
+ }
111
+
112
+ return [
113
+ `export const plans = ${JSON.stringify(files)};`,
114
+ `export const plansDir = ${JSON.stringify(plansDir)};`,
115
+ ].join("\n");
116
+ }
117
+
118
+ if (id.startsWith("\0plannar-plan-source/")) {
119
+ const planName = id.slice("\0plannar-plan-source/".length);
120
+ const planPath = resolvePlanPath(plansDir, planName);
121
+
122
+ if (!planPath || !existsSync(planPath)) {
123
+ return 'export const source = "";\nexport const lines = [];\nexport default source;';
124
+ }
125
+
126
+ const raw = readFileSync(planPath, "utf-8");
127
+ const lines = raw.split("\n");
128
+ return `export const source = ${JSON.stringify(raw)};\nexport const lines = ${JSON.stringify(lines)};\nexport default source;`;
129
+ }
130
+
131
+ if (!id.startsWith("\0plannar-plan/")) {
132
+ return;
133
+ }
134
+
135
+ const planName = id.slice("\0plannar-plan/".length);
136
+ const planPath = resolvePlanPath(plansDir, planName);
137
+
138
+ if (!planPath || !existsSync(planPath)) {
139
+ return "export default function() { return null; }";
140
+ }
141
+
142
+ const raw = readFileSync(planPath, "utf-8");
143
+ return hoistImports(
144
+ await generateMdx(planPath, {
145
+ content: raw,
146
+ bindings,
147
+ development: true,
148
+ }),
149
+ );
150
+ },
151
+ handleHotUpdate(ctx) {
152
+ const plansListMod = ctx.server.moduleGraph.getModuleById("\0plannar-plans");
153
+
154
+ const plansPrefix = resolve(plansDir);
155
+ const pathSep = process.platform === "win32" ? "\\" : "/";
156
+ const prefix = `${plansPrefix}${pathSep}`;
157
+
158
+ if (ctx.file.startsWith(prefix) && ctx.file.endsWith(".mdx")) {
159
+ const slug = ctx.file.slice(prefix.length, -".mdx".length).replaceAll("\\", "/");
160
+ const planMod = ctx.server.moduleGraph.getModuleById(`\0plannar-plan/${slug}`);
161
+ const sourceMod = ctx.server.moduleGraph.getModuleById(`\0plannar-plan-source/${slug}`);
162
+
163
+ if (plansListMod) void ctx.server.reloadModule(plansListMod);
164
+ if (planMod) void ctx.server.reloadModule(planMod);
165
+ if (sourceMod) void ctx.server.reloadModule(sourceMod);
166
+ } else if (plansListMod) {
167
+ void ctx.server.reloadModule(plansListMod);
168
+ }
169
+ },
170
+ };
171
+ }
172
+
173
+ function createGlobalCssPlugin(): Plugin {
174
+ return {
175
+ name: "plannar-global-css",
176
+ resolveId(id: string) {
177
+ if (id === "virtual:plannar-global-css") return "\0plannar-global-css";
178
+ },
179
+ load(id: string) {
180
+ if (id !== "\0plannar-global-css") {
181
+ return;
182
+ }
183
+
184
+ const globalCss = process.env.PLANNAR_GLOBAL_CSS;
185
+ const cssFilePath = process.env.PLANNAR_CSS_FILE_PATH;
186
+ const imports: string[] = [];
187
+
188
+ if (globalCss && existsSync(globalCss)) {
189
+ imports.push(globalCss);
190
+ }
191
+
192
+ if (cssFilePath && existsSync(cssFilePath)) {
193
+ imports.push(cssFilePath);
194
+ }
195
+
196
+ return imports.map((filePath) => `import '${filePath}';`).join("\n") || "";
197
+ },
198
+ };
199
+ }
200
+
201
+ export function injectTailwindSource(css: string, plannarRoot: string): string {
202
+ const tailwindImport = '@import "tailwindcss";';
203
+ const sourceDirective = `@source ${JSON.stringify(plannarRoot.replaceAll("\\", "/"))};`;
204
+
205
+ if (!css.includes(tailwindImport) || css.includes(sourceDirective)) {
206
+ return css;
207
+ }
208
+
209
+ return css.replace(tailwindImport, `${tailwindImport}\n${sourceDirective}`);
210
+ }
211
+
212
+ function createTailwindSourcePlugin(plannarRoot: string): Plugin {
213
+ return {
214
+ name: "plannar-tailwind-source",
215
+ enforce: "pre",
216
+ load(id: string) {
217
+ if (!id.endsWith("/src/index.css")) {
218
+ return;
219
+ }
220
+
221
+ return injectTailwindSource(readFileSync(id, "utf-8"), plannarRoot);
222
+ },
223
+ };
224
+ }
225
+
226
+ type CreateEditorViteConfigOptions = {
227
+ appDir: string;
228
+ workspaceRoot: string;
229
+ };
230
+
231
+ export function createEditorViteConfig({
232
+ appDir,
233
+ workspaceRoot,
234
+ }: CreateEditorViteConfigOptions): UserConfig {
235
+ const plannarFolder = process.env.PLANNAR_FOLDER || ".plannar";
236
+ const plannarRoot = join(workspaceRoot, plannarFolder);
237
+ const plansDir = join(plannarRoot, "plans");
238
+
239
+ const bindings = { ...shadcnBindings, ...resolveUserMeta() };
240
+
241
+ return {
242
+ plugins: [
243
+ tailwindcss(),
244
+ react(),
245
+ mdxPlugin({ bindings, development: true }),
246
+ createPlannarPlansPlugin(plansDir, bindings),
247
+ createGlobalCssPlugin(),
248
+ createTailwindSourcePlugin(plannarRoot),
249
+ ],
250
+ server: {
251
+ fs: {
252
+ allow: [appDir, workspaceRoot],
253
+ },
254
+ },
255
+ resolve: {
256
+ dedupe: ["react", "react-dom"],
257
+ alias: [
258
+ {
259
+ find: /^@\//,
260
+ replacement: `${plannarRoot}/`,
261
+ },
262
+ ],
263
+ },
264
+ };
265
+ }
@@ -0,0 +1,59 @@
1
+ import { n as resolveConfig, t as merge } from "./config-FJViU9hJ.mjs";
2
+ import { defineCommand } from "citty";
3
+ import { existsSync } from "node:fs";
4
+ import { resolve } from "node:path";
5
+ import { createServer } from "vite";
6
+ import { fileURLToPath } from "node:url";
7
+ //#region src/commands/editor.ts
8
+ function findEditorRoot(startDir) {
9
+ if (existsSync(resolve(startDir, "editor", "index.html"))) return resolve(startDir, "editor");
10
+ let dir = startDir;
11
+ for (let i = 0; i < 10; i++) {
12
+ if (existsSync(resolve(dir, "apps/editor/index.html"))) return resolve(dir, "apps/editor");
13
+ dir = resolve(dir, "..");
14
+ }
15
+ throw new Error("Could not find apps/editor relative to CLI package");
16
+ }
17
+ var editor_default = defineCommand({
18
+ meta: {
19
+ name: "editor",
20
+ description: "Start the plan editor in dev mode with HMR"
21
+ },
22
+ args: {
23
+ port: {
24
+ type: "string",
25
+ description: "Port to listen on",
26
+ default: "5173"
27
+ },
28
+ host: {
29
+ type: "string",
30
+ description: "Host to listen on",
31
+ default: "localhost"
32
+ }
33
+ },
34
+ async run({ args }) {
35
+ const cwd = process.cwd();
36
+ const config = await resolveConfig(cwd);
37
+ process.env.PLANNAR_CWD = cwd;
38
+ process.env.PLANNAR_FOLDER = config.plannarFolder;
39
+ process.env.PLANNAR_EXPORTS_FOLDER = config.exportsFolder;
40
+ if (config.globalCss) process.env.PLANNAR_GLOBAL_CSS = resolve(cwd, config.globalCss);
41
+ if (config.cssFilePath) process.env.PLANNAR_CSS_FILE_PATH = resolve(cwd, config.cssFilePath);
42
+ if (config.meta) process.env.PLANNAR_META = JSON.stringify(config.meta);
43
+ const editorRoot = findEditorRoot(fileURLToPath(new URL("..", import.meta.url)));
44
+ const baseServerConfig = {
45
+ configFile: resolve(editorRoot, "vite.config.ts"),
46
+ root: editorRoot,
47
+ server: {
48
+ fs: { allow: [editorRoot, cwd] },
49
+ port: Number(args.port),
50
+ host: args.host
51
+ }
52
+ };
53
+ const server = await createServer(config.viteConfig?.editor ? merge(baseServerConfig, config.viteConfig.editor) : baseServerConfig);
54
+ await server.listen();
55
+ server.printUrls();
56
+ }
57
+ });
58
+ //#endregion
59
+ export { editor_default as default };