@qnroa/qtype 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -3
- package/CHANGELOG.zh.md +1 -2
- package/README.md +88 -56
- package/README.zh.md +82 -62
- package/dist/cli/bootstrap.js +4 -115
- package/dist/cli/commands/check/index.js +11 -10
- package/dist/cli/commands/config/action.js +5 -9
- package/dist/cli/commands/content/lint/action.js +38 -44
- package/dist/cli/commands/content/search/action.js +44 -34
- package/dist/cli/commands/content/search/i18n.js +6 -0
- package/dist/cli/commands/content/search/index.js +19 -1
- package/dist/cli/commands/content/validate/action.js +28 -27
- package/dist/cli/commands/index.js +1 -3
- package/dist/cli/commands/pack/index.js +2 -1
- package/dist/cli/commands/publish/build/action.js +39 -11
- package/dist/cli/commands/repo/new/action.js +23 -4
- package/dist/cli/commands/repo/new/i18n.js +2 -2
- package/dist/cli/commands/repo/sync/action.js +24 -4
- package/dist/cli/commands/repo/templates.js +2 -1
- package/dist/cli/utils/material.js +49 -0
- package/dist/core/encrypt.js +24 -1
- package/dist/core/index.js +1 -0
- package/dist/core/parser/frontmatter.js +39 -34
- package/dist/core/parser/parseMaterial.js +174 -24
- package/dist/core/romanization/index.js +152 -0
- package/dist/core/schemas/both.js +52 -0
- package/dist/core/schemas/index.js +3 -0
- package/dist/core/schemas/repo.js +55 -0
- package/dist/core/schemas/user.js +19 -0
- package/dist/core/typing/engine/TypingInput.js +243 -0
- package/dist/core/typing/engine/chars.js +30 -0
- package/dist/core/typing/engine/feedback.js +15 -0
- package/dist/core/typing/engine/index.js +5 -0
- package/dist/core/typing/engine/settings.js +8 -0
- package/dist/core/typing/engine/stats.js +45 -0
- package/dist/core/typing/index.js +9 -1
- package/dist/view/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/view/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/view/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/view/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/view/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/view/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/view/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/view/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/view/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/view/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/view/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/view/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/view/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/view/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/view/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/view/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/view/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/view/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/view/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/view/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/view/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/view/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/view/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/view/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/view/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/view/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/view/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/view/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/view/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/view/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/view/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/view/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/view/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/view/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/view/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/view/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/view/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/view/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/view/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/view/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/view/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/view/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/view/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/view/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/view/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/view/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/view/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/view/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/view/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/view/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/view/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/view/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/view/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/view/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/view/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/view/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/view/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/view/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/view/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/view/assets/abap-BdImnpbu.js +1 -0
- package/dist/view/assets/actionscript-3-B3316cI-.js +1 -0
- package/dist/view/assets/ada-bCR0ucgS.js +1 -0
- package/dist/view/assets/ahk-CsyLZFj1.js +1 -0
- package/dist/view/assets/ahk2-8Zs4aa1G.js +1 -0
- package/dist/view/assets/andromeeda-C4gqWexZ.js +1 -0
- package/dist/view/assets/angular-html-DA-rfuFy.js +1 -0
- package/dist/view/assets/angular-ts-BrjP3tb8.js +1 -0
- package/dist/view/assets/apache-Pmp26Uib.js +1 -0
- package/dist/view/assets/apex-DhZFqWV2.js +1 -0
- package/dist/view/assets/apl-CORt7UWP.js +1 -0
- package/dist/view/assets/applescript-Co6uUVPk.js +1 -0
- package/dist/view/assets/ara-BRHolxvo.js +1 -0
- package/dist/view/assets/asciidoc-CSVQ5wI8.js +1 -0
- package/dist/view/assets/asm-D_Q5rh1f.js +1 -0
- package/dist/view/assets/astro-HNnZUWAn.js +1 -0
- package/dist/view/assets/aurora-x-D-2ljcwZ.js +1 -0
- package/dist/view/assets/awk-DMzUqQB5.js +1 -0
- package/dist/view/assets/ayu-dark-DYE7WIF3.js +1 -0
- package/dist/view/assets/ayu-light-BA47KaF1.js +1 -0
- package/dist/view/assets/ayu-mirage-32ctXXKs.js +1 -0
- package/dist/view/assets/ballerina-BFfxhgS-.js +1 -0
- package/dist/view/assets/bat-CickPsom.js +1 -0
- package/dist/view/assets/beancount-k_qm7-4y.js +1 -0
- package/dist/view/assets/berry-uYugtg8r.js +1 -0
- package/dist/view/assets/bibtex-CHM0blh-.js +1 -0
- package/dist/view/assets/bicep-Bmn6On1c.js +1 -0
- package/dist/view/assets/bird2-Bx8U0n9b.js +1 -0
- package/dist/view/assets/blade-2xfisSek.js +1 -0
- package/dist/view/assets/bsl-DlhNcFeZ.js +1 -0
- package/dist/view/assets/c-BIGW1oBm.js +1 -0
- package/dist/view/assets/c3-Dp5svz6Z.js +1 -0
- package/dist/view/assets/cadence-Bv_4Rxtq.js +1 -0
- package/dist/view/assets/cairo-KRGpt6FW.js +1 -0
- package/dist/view/assets/catppuccin-frappe-CZL1YF0i.js +1 -0
- package/dist/view/assets/catppuccin-latte-DH-8KZSZ.js +1 -0
- package/dist/view/assets/catppuccin-macchiato-B7yYVSCf.js +1 -0
- package/dist/view/assets/catppuccin-mocha-Ct7hS0mc.js +1 -0
- package/dist/view/assets/chapel-DTp_pixX.js +1 -0
- package/dist/view/assets/clarity-Dn5IMItf.js +1 -0
- package/dist/view/assets/clojure-P80f7IUj.js +1 -0
- package/dist/view/assets/cmake-D1j8_8rp.js +1 -0
- package/dist/view/assets/cobol-nBiQ_Alo.js +1 -0
- package/dist/view/assets/codeowners-Bp6g37R7.js +1 -0
- package/dist/view/assets/codeql-DsOJ9woJ.js +1 -0
- package/dist/view/assets/coffee-Ch7k5sss.js +1 -0
- package/dist/view/assets/common-lisp-Cg-RD9OK.js +1 -0
- package/dist/view/assets/coq-C7JzOVbR.js +1 -0
- package/dist/view/assets/cpp-BMRokrvK.js +1 -0
- package/dist/view/assets/crystal-DGywbUpC.js +1 -0
- package/dist/view/assets/csharp-DSvCPggb.js +1 -0
- package/dist/view/assets/css-CLj8gQPS.js +1 -0
- package/dist/view/assets/csv-fuZLfV_i.js +1 -0
- package/dist/view/assets/cue-D82EKSYY.js +1 -0
- package/dist/view/assets/cypher-COkxafJQ.js +1 -0
- package/dist/view/assets/d-85-TOEBH.js +1 -0
- package/dist/view/assets/dark-plus-C3mMm8J8.js +1 -0
- package/dist/view/assets/dart-bE4Kk8sk.js +1 -0
- package/dist/view/assets/dax-CEL-wOlO.js +1 -0
- package/dist/view/assets/desktop-BmXAJ9_W.js +1 -0
- package/dist/view/assets/diff-D97Zzqfu.js +1 -0
- package/dist/view/assets/docker-BcOcwvcX.js +1 -0
- package/dist/view/assets/dotenv-Da5cRb03.js +1 -0
- package/dist/view/assets/dracula-BzJJZx-M.js +1 -0
- package/dist/view/assets/dracula-soft-BXkSAIEj.js +1 -0
- package/dist/view/assets/dream-maker-BtqSS_iP.js +1 -0
- package/dist/view/assets/edge-FbVlp4U3.js +1 -0
- package/dist/view/assets/elixir-CkH2-t6x.js +1 -0
- package/dist/view/assets/elm-DbKCFpqz.js +1 -0
- package/dist/view/assets/emacs-lisp-C_m_b--Z.js +1 -0
- package/dist/view/assets/erb-DXfck5VN.js +1 -0
- package/dist/view/assets/erlang-DsQrWhSR.js +1 -0
- package/dist/view/assets/everforest-dark-BgDCqdQA.js +1 -0
- package/dist/view/assets/everforest-light-C8M2exoo.js +1 -0
- package/dist/view/assets/fennel-BYunw83y.js +1 -0
- package/dist/view/assets/fish-BvzEVeQv.js +1 -0
- package/dist/view/assets/fluent-C4IJs8-o.js +1 -0
- package/dist/view/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
- package/dist/view/assets/fortran-free-form-BxgE0vQu.js +1 -0
- package/dist/view/assets/fsharp-CXgrBDvD.js +1 -0
- package/dist/view/assets/gdresource-TyuKm33G.js +1 -0
- package/dist/view/assets/gdscript-DqcFQ5yU.js +1 -0
- package/dist/view/assets/gdshader-DkwncUOv.js +1 -0
- package/dist/view/assets/genie-D0YGMca9.js +1 -0
- package/dist/view/assets/gherkin-DyxjwDmM.js +1 -0
- package/dist/view/assets/git-commit-F4YmCXRG.js +1 -0
- package/dist/view/assets/git-rebase-r7XF79zn.js +1 -0
- package/dist/view/assets/github-dark-DHJKELXO.js +1 -0
- package/dist/view/assets/github-dark-default-Cuk6v7N8.js +1 -0
- package/dist/view/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- package/dist/view/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- package/dist/view/assets/github-light-DAi9KRSo.js +1 -0
- package/dist/view/assets/github-light-default-D7oLnXFd.js +1 -0
- package/dist/view/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- package/dist/view/assets/gleam-BspZqrRM.js +1 -0
- package/dist/view/assets/glimmer-js-ByusRIyA.js +1 -0
- package/dist/view/assets/glimmer-ts-BfAWNZQY.js +1 -0
- package/dist/view/assets/glsl-DplSGwfg.js +1 -0
- package/dist/view/assets/gn-n2N0HUVH.js +1 -0
- package/dist/view/assets/gnuplot-DdkO51Og.js +1 -0
- package/dist/view/assets/go-C27-OAKa.js +1 -0
- package/dist/view/assets/graphql-ChdNCCLP.js +1 -0
- package/dist/view/assets/groovy-gcz8RCvz.js +1 -0
- package/dist/view/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
- package/dist/view/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
- package/dist/view/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
- package/dist/view/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
- package/dist/view/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
- package/dist/view/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
- package/dist/view/assets/hack-BWmVpMyf.js +1 -0
- package/dist/view/assets/haml-D5jkg6IW.js +1 -0
- package/dist/view/assets/handlebars-BpdQsYii.js +1 -0
- package/dist/view/assets/haskell-Df6bDoY_.js +1 -0
- package/dist/view/assets/haxe-CfZj7gIn.js +1 -0
- package/dist/view/assets/hcl-BWvSN4gD.js +1 -0
- package/dist/view/assets/hjson-D5-asLiD.js +1 -0
- package/dist/view/assets/hlsl-D3lLCCz7.js +1 -0
- package/dist/view/assets/horizon-BUw7H-hv.js +1 -0
- package/dist/view/assets/horizon-bright-CUuTKBJd.js +1 -0
- package/dist/view/assets/houston-DnULxvSX.js +1 -0
- package/dist/view/assets/html-derivative-DlHx6ybY.js +1 -0
- package/dist/view/assets/html-pp8916En.js +1 -0
- package/dist/view/assets/http-jrhK8wxY.js +1 -0
- package/dist/view/assets/hurl-irOxFIW8.js +1 -0
- package/dist/view/assets/hxml-2-FPmUDs.js +1 -0
- package/dist/view/assets/hy-DFXneXwc.js +1 -0
- package/dist/view/assets/imba-DGztddWO.js +1 -0
- package/dist/view/assets/index-BLryk3W4.css +1 -0
- package/dist/view/assets/index-ByMJp0a5.js +3 -0
- package/dist/view/assets/index-CRh4USfC.js +189 -0
- package/dist/view/assets/index-JNx7Ohoj.js +153 -0
- package/dist/view/assets/ini-BEwlwnbL.js +1 -0
- package/dist/view/assets/java-CylS5w8V.js +1 -0
- package/dist/view/assets/javascript-wDzz0qaB.js +1 -0
- package/dist/view/assets/jinja-f2NsQr07.js +1 -0
- package/dist/view/assets/jison-wvAkD_A8.js +1 -0
- package/dist/view/assets/json-Cp-IABpG.js +1 -0
- package/dist/view/assets/json5-C9tS-k6U.js +1 -0
- package/dist/view/assets/jsonc-Des-eS-w.js +1 -0
- package/dist/view/assets/jsonl-DcaNXYhu.js +1 -0
- package/dist/view/assets/jsonnet-DFQXde-d.js +1 -0
- package/dist/view/assets/jssm-C2t-YnRu.js +1 -0
- package/dist/view/assets/jsx-g9-lgVsj.js +1 -0
- package/dist/view/assets/julia-5Bft2YPA.js +1 -0
- package/dist/view/assets/just-Cwhn7H3k.js +1 -0
- package/dist/view/assets/kanagawa-dragon-BuwD2xS4.js +1 -0
- package/dist/view/assets/kanagawa-lotus-C3DzagqV.js +1 -0
- package/dist/view/assets/kanagawa-wave-DFGoQZhC.js +1 -0
- package/dist/view/assets/katex-BYZTj3zW.css +1 -0
- package/dist/view/assets/katex-C5jXJg4s.js +257 -0
- package/dist/view/assets/kdl-DV7GczEv.js +1 -0
- package/dist/view/assets/kotlin-BdnUsdx6.js +1 -0
- package/dist/view/assets/kusto-wEQ09or8.js +1 -0
- package/dist/view/assets/laserwave-DUszq2jm.js +1 -0
- package/dist/view/assets/latex-D5pSuvFb.js +1 -0
- package/dist/view/assets/lean-BZvkOJ9d.js +1 -0
- package/dist/view/assets/less-B1dDrJ26.js +1 -0
- package/dist/view/assets/light-plus-B7mTdjB0.js +1 -0
- package/dist/view/assets/liquid-C0sCDyMI.js +1 -0
- package/dist/view/assets/llvm-BZoOZj88.js +1 -0
- package/dist/view/assets/log-2UxHyX5q.js +1 -0
- package/dist/view/assets/logo-BtOb2qkB.js +1 -0
- package/dist/view/assets/lua-BaeVxFsk.js +1 -0
- package/dist/view/assets/luau-BnpPk5vE.js +1 -0
- package/dist/view/assets/make-CHLpvVh8.js +1 -0
- package/dist/view/assets/markdown-Cvjx9yec.js +1 -0
- package/dist/view/assets/marko-DjSrsDqO.js +1 -0
- package/dist/view/assets/material-theme-D5KoaKCx.js +1 -0
- package/dist/view/assets/material-theme-darker-BfHTSMKl.js +1 -0
- package/dist/view/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- package/dist/view/assets/material-theme-ocean-CyktbL80.js +1 -0
- package/dist/view/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- package/dist/view/assets/matlab-D7o27uSR.js +1 -0
- package/dist/view/assets/mdc-D1_yUvq7.js +1 -0
- package/dist/view/assets/mdx-Cmh6b_Ma.js +1 -0
- package/dist/view/assets/mermaid-CQcHuHx7.js +1 -0
- package/dist/view/assets/min-dark-CafNBF8u.js +1 -0
- package/dist/view/assets/min-light-CTRr51gU.js +1 -0
- package/dist/view/assets/mipsasm-CKIfxQSi.js +1 -0
- package/dist/view/assets/mojo-DJz3ZmWd.js +1 -0
- package/dist/view/assets/monokai-BRVnQi9A.js +1 -0
- package/dist/view/assets/moonbit-CHtswR0a.js +1 -0
- package/dist/view/assets/move-el3G9tDJ.js +1 -0
- package/dist/view/assets/narrat-DRg8JJMk.js +1 -0
- package/dist/view/assets/nextflow-C-mBbutL.js +1 -0
- package/dist/view/assets/nextflow-groovy-vE_lwT2v.js +1 -0
- package/dist/view/assets/nginx-BpAMiNFr.js +1 -0
- package/dist/view/assets/night-owl-C39BiMTA.js +1 -0
- package/dist/view/assets/night-owl-light-CMTm3GFP.js +1 -0
- package/dist/view/assets/nim-BIad80T-.js +1 -0
- package/dist/view/assets/nix-CwoSXNpI.js +1 -0
- package/dist/view/assets/nord-Ddv68eIx.js +1 -0
- package/dist/view/assets/nsis-BlV79W_Q.js +1 -0
- package/dist/view/assets/nushell-D3jzshHO.js +1 -0
- package/dist/view/assets/objective-c-DXmwc3jG.js +1 -0
- package/dist/view/assets/objective-cpp-CLxacb5B.js +1 -0
- package/dist/view/assets/ocaml-C0hk2d4L.js +1 -0
- package/dist/view/assets/odin-BBf5iR-q.js +1 -0
- package/dist/view/assets/one-dark-pro-DVMEJ2y_.js +1 -0
- package/dist/view/assets/one-light-C3Wv6jpd.js +1 -0
- package/dist/view/assets/openscad-C4EeE6gA.js +1 -0
- package/dist/view/assets/org-DM6o9KBp.js +1 -0
- package/dist/view/assets/pascal-D93ZcfNL.js +1 -0
- package/dist/view/assets/perl-B9cMNwum.js +1 -0
- package/dist/view/assets/php-Csjmro_R.js +1 -0
- package/dist/view/assets/pkl-u5AG7uiY.js +1 -0
- package/dist/view/assets/plastic-3e1v2bzS.js +1 -0
- package/dist/view/assets/plsql-ChMvpjG-.js +1 -0
- package/dist/view/assets/po-BTJTHyun.js +1 -0
- package/dist/view/assets/poimandres-CS3Unz2-.js +1 -0
- package/dist/view/assets/polar-C0HS_06l.js +1 -0
- package/dist/view/assets/postcss-CXtECtnM.js +1 -0
- package/dist/view/assets/powerquery-CEu0bR-o.js +1 -0
- package/dist/view/assets/powershell-BmBUJMz7.js +1 -0
- package/dist/view/assets/prisma-Vru482bI.js +1 -0
- package/dist/view/assets/prolog-CbFg5uaA.js +1 -0
- package/dist/view/assets/proto-C7zT0LnQ.js +1 -0
- package/dist/view/assets/pug-DKIMFp6K.js +1 -0
- package/dist/view/assets/puppet-BMWR74SV.js +1 -0
- package/dist/view/assets/purescript-CklMAg4u.js +1 -0
- package/dist/view/assets/python-B6aJPvgy.js +1 -0
- package/dist/view/assets/qml-3beO22l8.js +1 -0
- package/dist/view/assets/qmldir-C8lEn-DE.js +1 -0
- package/dist/view/assets/qss-IeuSbFQv.js +1 -0
- package/dist/view/assets/r-Cf5RLm7j.js +1 -0
- package/dist/view/assets/racket-BqYA7rlc.js +1 -0
- package/dist/view/assets/raku-DXvB9xmW.js +1 -0
- package/dist/view/assets/razor-BjBPvh-w.js +1 -0
- package/dist/view/assets/rbs-CpoqiR4B.js +1 -0
- package/dist/view/assets/red-hvxz__6c.js +1 -0
- package/dist/view/assets/reg-C-SQnVFl.js +1 -0
- package/dist/view/assets/regexp-CDVJQ6XC.js +1 -0
- package/dist/view/assets/rel-C3B-1QV4.js +1 -0
- package/dist/view/assets/riscv-BM1_JUlF.js +1 -0
- package/dist/view/assets/ron-D8l8udqQ.js +1 -0
- package/dist/view/assets/rose-pine-5qJOZa0Y.js +1 -0
- package/dist/view/assets/rose-pine-dawn-zx0QlTCp.js +1 -0
- package/dist/view/assets/rose-pine-moon-C9pEdX9L.js +1 -0
- package/dist/view/assets/rosmsg-BJDFO7_C.js +1 -0
- package/dist/view/assets/rst-bs7f0vWN.js +1 -0
- package/dist/view/assets/ruby-C0TQ7zu5.js +1 -0
- package/dist/view/assets/rust-B1yitclQ.js +1 -0
- package/dist/view/assets/sas-DEy46yEz.js +1 -0
- package/dist/view/assets/sass-Cj5Yp3dK.js +1 -0
- package/dist/view/assets/scala-CqE71os6.js +1 -0
- package/dist/view/assets/scheme-C98Dy4si.js +1 -0
- package/dist/view/assets/scss-D5BDwBP9.js +1 -0
- package/dist/view/assets/sdbl-DVxCFoDh.js +1 -0
- package/dist/view/assets/shaderlab-Dg9Lc6iA.js +1 -0
- package/dist/view/assets/shellscript-Yzrsuije.js +1 -0
- package/dist/view/assets/shellsession-BADoaaVG.js +1 -0
- package/dist/view/assets/slack-dark-BthQWCQV.js +1 -0
- package/dist/view/assets/slack-ochin-DqwNpetd.js +1 -0
- package/dist/view/assets/smalltalk-BOQMe2GC.js +1 -0
- package/dist/view/assets/smithy-cds9vsN8.js +1 -0
- package/dist/view/assets/snazzy-light-Bw305WKR.js +1 -0
- package/dist/view/assets/solarized-dark-CpvCGNkr.js +1 -0
- package/dist/view/assets/solarized-light-Dlz6yCKv.js +1 -0
- package/dist/view/assets/solidity-DijEV5ha.js +1 -0
- package/dist/view/assets/soy-8wufbnw4.js +1 -0
- package/dist/view/assets/sparql-rVzFXLq3.js +1 -0
- package/dist/view/assets/splunk-BtCnVYZw.js +1 -0
- package/dist/view/assets/sql-CRqJ_cUM.js +1 -0
- package/dist/view/assets/ssh-config-_ykCGR6B.js +1 -0
- package/dist/view/assets/stata-DI20mbqo.js +1 -0
- package/dist/view/assets/stylus-BEDo0Tqx.js +1 -0
- package/dist/view/assets/surrealql-Cjom0U5J.js +1 -0
- package/dist/view/assets/svelte-Cy7k_4gC.js +1 -0
- package/dist/view/assets/swift-C2oV4EkX.js +1 -0
- package/dist/view/assets/synthwave-84-CbfX1IO0.js +1 -0
- package/dist/view/assets/system-verilog-0hqHdDBg.js +1 -0
- package/dist/view/assets/systemd-4A_iFExJ.js +1 -0
- package/dist/view/assets/talonscript-CkByrt1z.js +1 -0
- package/dist/view/assets/tasl-QIJgUcNo.js +1 -0
- package/dist/view/assets/tcl-dwOrl1Do.js +1 -0
- package/dist/view/assets/templ-DhtptRzy.js +1 -0
- package/dist/view/assets/terraform-BETggiCN.js +1 -0
- package/dist/view/assets/tex-D96PA37w.js +1 -0
- package/dist/view/assets/tokyo-night-hegEt444.js +1 -0
- package/dist/view/assets/toml-vGWfd6FD.js +1 -0
- package/dist/view/assets/ts-tags-D351s5mN.js +1 -0
- package/dist/view/assets/tsv-B_m7g4N7.js +1 -0
- package/dist/view/assets/tsx-COt5Ahok.js +1 -0
- package/dist/view/assets/turtle-BsS91CYL.js +1 -0
- package/dist/view/assets/twig-27uCiNez.js +1 -0
- package/dist/view/assets/typescript-BPQ3VLAy.js +1 -0
- package/dist/view/assets/typespec-CAFt9gP4.js +1 -0
- package/dist/view/assets/typst-BUadGCkm.js +1 -0
- package/dist/view/assets/v-BGw2Nkan.js +1 -0
- package/dist/view/assets/vala-CsfeWuGM.js +1 -0
- package/dist/view/assets/vb-Cu-pLBUe.js +1 -0
- package/dist/view/assets/verilog-nZwndyjY.js +1 -0
- package/dist/view/assets/vesper-DRje8inN.js +1 -0
- package/dist/view/assets/vhdl-CeAyd5Ju.js +1 -0
- package/dist/view/assets/viml-CJc9bBzg.js +1 -0
- package/dist/view/assets/vitesse-black-Bkuqu6BP.js +1 -0
- package/dist/view/assets/vitesse-dark-D0r3Knsf.js +1 -0
- package/dist/view/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/dist/view/assets/vue-BqiEGhQt.js +1 -0
- package/dist/view/assets/vue-html-AaS7Mt5G.js +1 -0
- package/dist/view/assets/vue-vine-BoDAl6tE.js +1 -0
- package/dist/view/assets/vyper-CDx5xZoG.js +1 -0
- package/dist/view/assets/wasm-CG6Dc4jp.js +1 -0
- package/dist/view/assets/wasm-MzD3tlZU.js +1 -0
- package/dist/view/assets/wenyan-BV7otONQ.js +1 -0
- package/dist/view/assets/wgsl-Dx-B1_4e.js +1 -0
- package/dist/view/assets/wikitext-BhOHFoWU.js +1 -0
- package/dist/view/assets/wit-5i3qLPDT.js +1 -0
- package/dist/view/assets/wolfram-lXgVvXCa.js +1 -0
- package/dist/view/assets/xml-sdJ4AIDG.js +1 -0
- package/dist/view/assets/xsl-CtQFsRM5.js +1 -0
- package/dist/view/assets/yaml-Buea-lGh.js +1 -0
- package/dist/view/assets/zenscript-DVFEvuxE.js +1 -0
- package/dist/view/assets/zig-VOosw3JB.js +1 -0
- package/dist/view/index.html +10 -2
- package/docs/README.md +21 -15
- package/docs/README.zh.md +15 -9
- package/docs/en/authoring.md +85 -80
- package/docs/en/cli-reference.md +110 -72
- package/docs/en/deployment.md +183 -0
- package/docs/en/getting-started.md +112 -0
- package/docs/en/material-types.md +241 -0
- package/docs/en/settings.md +133 -0
- package/docs/en/shortcuts.md +89 -0
- package/docs/en/typing-rules.md +208 -0
- package/docs/zh/authoring.md +74 -69
- package/docs/zh/cli-reference.md +92 -58
- package/docs/zh/deployment.md +179 -0
- package/docs/zh/getting-started.md +104 -0
- package/docs/zh/material-types.md +769 -0
- package/docs/zh/settings.md +120 -0
- package/docs/zh/shortcuts.md +83 -0
- package/docs/zh/typing-rules.md +191 -0
- package/package.json +13 -11
- package/templates/en/QTYPE.md +155 -495
- package/templates/en/README.md +11 -11
- package/templates/en/TODO.md +1 -1
- package/templates/en/material/article.md +20 -0
- package/templates/en/material/assets/article/sunrise.svg +12 -0
- package/templates/en/material/assets/code/tree.svg +19 -0
- package/templates/en/material/assets/qa/login-flow.svg +17 -0
- package/templates/en/material/assets/sentence/pangram.svg +6 -0
- package/templates/en/material/assets/snippet/moon.svg +8 -0
- package/templates/en/material/assets/word/apple.svg +5 -0
- package/templates/en/material/code.md +55 -0
- package/templates/en/material/qa.md +33 -0
- package/templates/en/material/sentence.md +18 -0
- package/templates/en/material/snippet.md +17 -0
- package/templates/en/material/word.md +20 -0
- package/templates/zh/QTYPE.md +191 -473
- package/templates/zh/README.md +6 -6
- package/templates/zh/index.md +1 -1
- package/templates/zh/material/article.md +18 -0
- package/templates/zh/material/assets/article/sunrise.svg +12 -0
- package/templates/zh/material/assets/code/tree.svg +19 -0
- package/templates/zh/material/assets/qa/login-flow.svg +17 -0
- package/templates/zh/material/assets/sentence/pangram.svg +6 -0
- package/templates/zh/material/assets/snippet/moon.svg +8 -0
- package/templates/zh/material/assets/word/apple.svg +5 -0
- package/templates/zh/material/code.md +55 -0
- package/templates/zh/material/qa.md +33 -0
- package/templates/zh/material/sentence.md +19 -0
- package/templates/zh/material/snippet.md +20 -0
- package/templates/zh/material/word.md +20 -0
- package/dist/cli/commands/check/action.js +0 -56
- package/dist/cli/commands/check/i18n.js +0 -26
- package/dist/cli/commands/plugin/i18n.js +0 -28
- package/dist/cli/commands/plugin/index.js +0 -41
- package/dist/core/typing/engine.js +0 -112
- package/dist/view/assets/index-DBABH3dG.js +0 -111
- package/dist/view/assets/index-RTLZ-zOC.css +0 -1
- package/templates/en/material/example.md +0 -47
- package/templates/zh/material/example.md +0 -47
package/docs/en/cli-reference.md
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
# qtype CLI reference
|
|
2
2
|
|
|
3
|
-
Chinese: [cli-reference.md](
|
|
3
|
+
Chinese: [cli-reference.md](https://www.npmjs.com/package/@qnroa/qtype?activeTab=code&filepath=docs/zh/cli-reference.md)
|
|
4
4
|
|
|
5
|
-
Brief
|
|
6
|
-
for full options.
|
|
5
|
+
Brief per-command overview. Run `qtype <cmd> --help` for the full option list.
|
|
7
6
|
|
|
8
|
-
## Global
|
|
7
|
+
## Global flags
|
|
9
8
|
|
|
10
|
-
|
|
|
9
|
+
| Flag | Notes |
|
|
11
10
|
|---|---|
|
|
12
11
|
| `-h, --help` | Show help |
|
|
13
12
|
| `-v, --version` | Show version |
|
|
@@ -18,70 +17,109 @@ Language precedence: `--lang` > `$QTYPE_LANG` > `cli.lang` in
|
|
|
18
17
|
|
|
19
18
|
---
|
|
20
19
|
|
|
21
|
-
## `qtype init [
|
|
20
|
+
## `qtype init [path]`
|
|
22
21
|
|
|
23
|
-
Scaffold a material repo
|
|
24
|
-
`qtype repo sync
|
|
22
|
+
Scaffold a material repo into an existing directory. Top-level alias for
|
|
23
|
+
`qtype repo sync`.
|
|
25
24
|
|
|
26
25
|
```bash
|
|
27
|
-
qtype init
|
|
28
|
-
qtype init
|
|
26
|
+
mkdir my-deck && qtype init my-deck --lang en
|
|
27
|
+
qtype init # current directory
|
|
28
|
+
qtype init my-deck --force # overwrite qtype-managed spec files
|
|
29
|
+
qtype init my-deck --dry-run # print the plan, no writes
|
|
29
30
|
```
|
|
30
31
|
|
|
31
32
|
Creates: `QTYPE.md` (authoring spec), `AGENTS.md` / `CLAUDE.md` /
|
|
32
33
|
`GEMINI.md` (symlinks to `QTYPE.md`), `README.md`, `TODO.md`,
|
|
33
|
-
`index.md`, `log.md`,
|
|
34
|
-
|
|
34
|
+
`index.md`, `log.md`, one starter per material type at
|
|
35
|
+
`material/{word,sentence,article,snippet,qa,code}.md` + accompanying
|
|
36
|
+
SVG images under `material/assets/<type>/`, and a `.qtype/` skeleton.
|
|
35
37
|
|
|
36
|
-
Idempotent —
|
|
37
|
-
|
|
38
|
+
Idempotent — user content is left alone; only `--force` overwrites
|
|
39
|
+
qtype-managed spec files.
|
|
38
40
|
|
|
39
41
|
---
|
|
40
42
|
|
|
41
43
|
## `qtype repo new <name>`
|
|
42
44
|
|
|
43
|
-
Create a fresh material
|
|
45
|
+
Create a fresh material-repo directory under the parent.
|
|
44
46
|
|
|
45
47
|
```bash
|
|
46
|
-
qtype repo new my-deck --lang
|
|
47
|
-
|
|
48
|
+
qtype repo new my-deck --lang en
|
|
49
|
+
qtype repo new my-deck --description "GRE vocab" --git
|
|
48
50
|
```
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
| Flag | Notes |
|
|
53
|
+
|---|---|
|
|
54
|
+
| `--lang <zh\|en>` | Template language |
|
|
55
|
+
| `--description <text>` | One-liner for README |
|
|
56
|
+
| `--dir <path>` | Parent directory (default: cwd) |
|
|
57
|
+
| `--git` | Also `git init` |
|
|
58
|
+
|
|
59
|
+
## `qtype repo sync [path]`
|
|
60
|
+
|
|
61
|
+
Bring an existing repo up to spec. Same as `qtype init`.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## `qtype check [path]`
|
|
51
66
|
|
|
52
|
-
|
|
67
|
+
Top-level alias for `qtype content lint`. Reports cards containing
|
|
68
|
+
characters the typing engine can't handle. Non-zero exit code for CI.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
qtype check # cwd
|
|
72
|
+
qtype check --json # JSON output for tooling
|
|
73
|
+
```
|
|
53
74
|
|
|
54
75
|
---
|
|
55
76
|
|
|
56
|
-
## `qtype
|
|
77
|
+
## `qtype content lint | validate | search`
|
|
78
|
+
|
|
79
|
+
- `lint` — text-level card validation (untypable chars → error)
|
|
80
|
+
- `validate` — schema-level validation (frontmatter field types)
|
|
81
|
+
- `search <query>` — full-text substring search across cards
|
|
57
82
|
|
|
58
|
-
|
|
59
|
-
characters the typing engine can't handle (returns non-zero exit).
|
|
60
|
-
Read-only; drop it into CI before `publish build`.
|
|
83
|
+
`search` supports filters + structured output:
|
|
61
84
|
|
|
62
85
|
```bash
|
|
63
|
-
qtype
|
|
86
|
+
qtype content search "closure"
|
|
87
|
+
qtype content search "apple" --tag GRE --type word --limit 5
|
|
88
|
+
qtype content search "*" --tag math --json # scriptable
|
|
64
89
|
```
|
|
65
90
|
|
|
91
|
+
| `search` flag | Notes |
|
|
92
|
+
|---|---|
|
|
93
|
+
| `--limit <n>` | Max results (default 20) |
|
|
94
|
+
| `--tag <tag...>` | Filter by tag (repeatable; AND semantics) |
|
|
95
|
+
| `--type <type...>` | Filter by material type (repeatable) |
|
|
96
|
+
| `--json` | Emit JSON results |
|
|
97
|
+
|
|
66
98
|
---
|
|
67
99
|
|
|
68
|
-
## `qtype publish build [
|
|
100
|
+
## `qtype publish build [path]`
|
|
69
101
|
|
|
70
|
-
Assemble
|
|
102
|
+
Assemble a static site under `<repo>/dist/`. Steps:
|
|
71
103
|
|
|
72
104
|
1. Parse every `material/*.md`
|
|
73
|
-
2. Pre-render Mermaid diagrams (unless `publish.mermaid=off`)
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
105
|
+
2. Pre-render Mermaid diagrams (unless `publish.mermaid=off`); emits
|
|
106
|
+
`dist/material/mermaid.json` + `mermaid.css` (dark + light SVGs)
|
|
107
|
+
3. Encrypt material (if `publish.password.enabled=true`) — argon2id
|
|
108
|
+
derives an AES-256 key, AES-GCM encrypts each material, output
|
|
109
|
+
`<file>.enc.json`
|
|
110
|
+
4. Emit `dist/material/index.json` manifest (browser lazy-loads from it)
|
|
111
|
+
5. Copy the pre-built view bundle into `dist/` root — the whole dir is
|
|
112
|
+
deployable to any static host
|
|
77
113
|
|
|
78
114
|
```bash
|
|
79
115
|
qtype publish build
|
|
116
|
+
QTYPE_PUBLISH_PASSWORD=demo qtype publish build # non-interactive
|
|
117
|
+
qtype publish build --out ./build # custom output dir
|
|
80
118
|
```
|
|
81
119
|
|
|
82
|
-
## `qtype publish serve [
|
|
120
|
+
## `qtype publish serve [path]`
|
|
83
121
|
|
|
84
|
-
Local HTTP preview of `dist/`.
|
|
122
|
+
Local HTTP preview of `dist/`. Default port 4000.
|
|
85
123
|
|
|
86
124
|
```bash
|
|
87
125
|
qtype publish serve
|
|
@@ -90,26 +128,40 @@ qtype publish serve --port 8080
|
|
|
90
128
|
|
|
91
129
|
## `qtype publish init`
|
|
92
130
|
|
|
93
|
-
Write
|
|
94
|
-
|
|
131
|
+
Write deployment helpers. **By default only writes `.gitignore`**;
|
|
132
|
+
`--ci github` also drops `.github/workflows/pages.yml` so pushing to
|
|
133
|
+
`main` triggers build + deploy.
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
qtype publish init # gitignore only
|
|
137
|
+
qtype publish init --ci github # with GitHub Pages deploy
|
|
138
|
+
```
|
|
95
139
|
|
|
96
140
|
## `qtype publish password set / clear / status`
|
|
97
141
|
|
|
98
|
-
Password
|
|
99
|
-
|
|
100
|
-
`.qtype/config.json`.
|
|
142
|
+
Password protection lifecycle. `set` prompts, then uses Argon2id
|
|
143
|
+
(64 MiB / t=3 / p=1) to derive a transient AES key and stores the
|
|
144
|
+
hash + salt in `.qtype/config.json`. The **password itself is never
|
|
145
|
+
stored**; every `publish build` re-derives the AES key from the
|
|
146
|
+
supplied password.
|
|
101
147
|
|
|
102
148
|
```bash
|
|
103
|
-
qtype publish password set
|
|
149
|
+
qtype publish password set # interactive
|
|
150
|
+
echo "hunter2" | qtype publish password set # stdin, scriptable
|
|
104
151
|
qtype publish password status
|
|
152
|
+
qtype publish password clear
|
|
105
153
|
```
|
|
106
154
|
|
|
155
|
+
Browser side: the reader's `PasswordGate` runs the same argon2id
|
|
156
|
+
derivation and caches the resulting AES key in `sessionStorage` — a
|
|
157
|
+
reload in the same tab doesn't re-prompt.
|
|
158
|
+
|
|
107
159
|
---
|
|
108
160
|
|
|
109
161
|
## `qtype pack [-o file]`
|
|
110
162
|
|
|
111
|
-
Bundle the current material repo into a `.tar.gz`.
|
|
112
|
-
`node_modules/`, `.git/`, and any pre-existing
|
|
163
|
+
Bundle the current material repo into a `.tar.gz`. Skips `dist/`,
|
|
164
|
+
`node_modules/`, `.git/`, and any pre-existing tarballs.
|
|
113
165
|
|
|
114
166
|
```bash
|
|
115
167
|
qtype pack -o my-deck.tar.gz
|
|
@@ -117,51 +169,37 @@ qtype pack -o my-deck.tar.gz
|
|
|
117
169
|
|
|
118
170
|
---
|
|
119
171
|
|
|
120
|
-
## `qtype content lint | validate | search`
|
|
121
|
-
|
|
122
|
-
- `lint` — style-level pass over material files
|
|
123
|
-
- `validate` — schema-level pass; complements `qtype check`
|
|
124
|
-
- `search <query>` — plain substring search across cards
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
|
-
qtype content search "closure"
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
---
|
|
131
|
-
|
|
132
172
|
## `qtype config get / set / unset / list`
|
|
133
173
|
|
|
134
|
-
|
|
135
|
-
`~/.config/qtype/config.json`, repo layer
|
|
174
|
+
Two-layer, git-style config (user layer at
|
|
175
|
+
`~/.config/qtype/config.json`, repo layer at
|
|
176
|
+
`<repo>/.qtype/config.json`).
|
|
136
177
|
|
|
137
|
-
Read precedence: repo > user > schema default
|
|
138
|
-
|
|
139
|
-
prefer repo when
|
|
178
|
+
Read precedence: **CLI flag > repo > user > schema default**. Write
|
|
179
|
+
defaults route repo-only keys to repo, user-only to user, dual-scope
|
|
180
|
+
keys prefer repo when available.
|
|
140
181
|
|
|
141
182
|
```bash
|
|
142
|
-
qtype config set cli.lang
|
|
183
|
+
qtype config set cli.lang en --global
|
|
143
184
|
qtype config set typing.theme mocha
|
|
144
185
|
qtype config get typing.theme --show-origin
|
|
145
186
|
qtype config list
|
|
146
187
|
qtype config unset typing.targetWpm
|
|
147
188
|
```
|
|
148
189
|
|
|
149
|
-
Known keys
|
|
150
|
-
|
|
151
|
-
- `cli.lang`, `cli.color` (user-only)
|
|
152
|
-
- `repo.name`, `publish.password.*` (repo-only)
|
|
153
|
-
- `repo.lang`, `typing.theme`, `typing.targetWpm`, `typing.tabBehavior`,
|
|
154
|
-
`typing.hint`, `typing.showKeyboard`, `typing.showHands`,
|
|
155
|
-
`publish.mermaid` (both scopes)
|
|
156
|
-
|
|
157
|
-
Strict mode: unknown keys are rejected.
|
|
158
|
-
|
|
159
|
-
---
|
|
190
|
+
**Known keys**:
|
|
160
191
|
|
|
161
|
-
|
|
192
|
+
- **User-only**: `cli.lang`, `cli.color`
|
|
193
|
+
- **Repo-only**: `repo.name`, `publish.password.enabled`,
|
|
194
|
+
`publish.password.hash`, `publish.password.aesSalt`,
|
|
195
|
+
`publish.password.scope`, `publish.password.selected`
|
|
196
|
+
- **Dual-scope**: `repo.lang`, `typing.theme`, `typing.targetWpm`,
|
|
197
|
+
`typing.tabBehavior`, `typing.hint`, `typing.showKeyboard`,
|
|
198
|
+
`typing.showHands`, `publish.mermaid`
|
|
162
199
|
|
|
163
|
-
|
|
164
|
-
|
|
200
|
+
Strict mode: unknown keys are rejected. View-side UI settings
|
|
201
|
+
(auto-speak / math renderer / AFK threshold / …) live in a
|
|
202
|
+
**browser-side kv store**, not this config.
|
|
165
203
|
|
|
166
204
|
---
|
|
167
205
|
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Deployment
|
|
2
|
+
|
|
3
|
+
Chinese: [deployment.md](https://www.npmjs.com/package/@qnroa/qtype?activeTab=code&filepath=docs/zh/deployment.md)
|
|
4
|
+
|
|
5
|
+
`qtype publish build` emits a plain static `dist/`: HTML + JS + CSS +
|
|
6
|
+
`material/*.md` (or encrypted `.enc.json`) + assets. **No server side**
|
|
7
|
+
— it drops onto any CDN / static host.
|
|
8
|
+
|
|
9
|
+
## Pre-flight checklist
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
qtype check # lints clean?
|
|
13
|
+
qtype publish build # emits dist/
|
|
14
|
+
ls dist/ # index.html + assets/ + material/ expected
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Key detail**: your output is `dist/`, not `dist/view/`. The former is
|
|
18
|
+
your user repo's build output; the latter is the dev-time view bundle
|
|
19
|
+
cache — `publish build` copies `dist/view/*` into your `dist/`.
|
|
20
|
+
|
|
21
|
+
## GitHub Pages
|
|
22
|
+
|
|
23
|
+
qtype ships a one-liner workflow:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
qtype publish init --ci github
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Writes `.github/workflows/pages.yml`. Pushing to `main`:
|
|
30
|
+
1. `npm install -g @qnroa/qtype`
|
|
31
|
+
2. `qtype publish build`
|
|
32
|
+
3. Uploads `dist/` to GitHub Pages
|
|
33
|
+
|
|
34
|
+
**In your GitHub repo settings**:
|
|
35
|
+
- Settings → Pages → Source: **GitHub Actions**
|
|
36
|
+
|
|
37
|
+
**If password-protected**, inject the password as a secret:
|
|
38
|
+
|
|
39
|
+
```yaml
|
|
40
|
+
- run: qtype publish build
|
|
41
|
+
env:
|
|
42
|
+
QTYPE_PUBLISH_PASSWORD: ${{ secrets.QTYPE_PASSWORD }}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Add a secret named `QTYPE_PASSWORD` under Settings → Secrets and
|
|
46
|
+
variables → Actions.
|
|
47
|
+
|
|
48
|
+
## Cloudflare Pages
|
|
49
|
+
|
|
50
|
+
1. Cloudflare Dashboard → Pages → Create → Connect Git
|
|
51
|
+
2. Build config:
|
|
52
|
+
- **Framework preset**: `None`
|
|
53
|
+
- **Build command**: `npx @qnroa/qtype publish build`
|
|
54
|
+
- **Build output directory**: `dist`
|
|
55
|
+
- **Node version**: `20` (env `NODE_VERSION=20`)
|
|
56
|
+
3. Password: Settings → Environment variables → add
|
|
57
|
+
`QTYPE_PUBLISH_PASSWORD` (Production scope, Encrypted).
|
|
58
|
+
|
|
59
|
+
## Vercel
|
|
60
|
+
|
|
61
|
+
`vercel.json` at repo root:
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"buildCommand": "npx @qnroa/qtype publish build",
|
|
66
|
+
"outputDirectory": "dist",
|
|
67
|
+
"framework": null
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Add the password via `vercel env add QTYPE_PUBLISH_PASSWORD`.
|
|
72
|
+
|
|
73
|
+
## Netlify
|
|
74
|
+
|
|
75
|
+
`netlify.toml` at repo root:
|
|
76
|
+
|
|
77
|
+
```toml
|
|
78
|
+
[build]
|
|
79
|
+
command = "npx @qnroa/qtype publish build"
|
|
80
|
+
publish = "dist"
|
|
81
|
+
|
|
82
|
+
[build.environment]
|
|
83
|
+
NODE_VERSION = "20"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Password: Site settings → Environment variables.
|
|
87
|
+
|
|
88
|
+
## Self-hosted nginx
|
|
89
|
+
|
|
90
|
+
After `qtype publish build`:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
scp -r dist/* user@yourhost:/var/www/your-site/
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
nginx config:
|
|
97
|
+
|
|
98
|
+
```nginx
|
|
99
|
+
server {
|
|
100
|
+
listen 80;
|
|
101
|
+
server_name your-site.example;
|
|
102
|
+
root /var/www/your-site;
|
|
103
|
+
index index.html;
|
|
104
|
+
|
|
105
|
+
# SPA fallback: any route that isn't a real file goes to
|
|
106
|
+
# index.html, so client-side routing (/typing/xxx.md etc.) works.
|
|
107
|
+
location / {
|
|
108
|
+
try_files $uri $uri/ /index.html;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
# Static assets are content-hashed, safe to cache aggressively.
|
|
112
|
+
location /assets/ {
|
|
113
|
+
expires 1y;
|
|
114
|
+
add_header Cache-Control "public, immutable";
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
# Materials might be re-published — keep the cache short.
|
|
118
|
+
location /material/ {
|
|
119
|
+
expires 5m;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Enable gzip:
|
|
125
|
+
|
|
126
|
+
```nginx
|
|
127
|
+
gzip on;
|
|
128
|
+
gzip_types text/plain text/css application/javascript application/json image/svg+xml;
|
|
129
|
+
gzip_min_length 1024;
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Docker
|
|
133
|
+
|
|
134
|
+
Minimal Dockerfile — build + serve:
|
|
135
|
+
|
|
136
|
+
```dockerfile
|
|
137
|
+
FROM node:20-alpine AS build
|
|
138
|
+
WORKDIR /app
|
|
139
|
+
COPY . .
|
|
140
|
+
RUN npm install -g @qnroa/qtype && qtype publish build
|
|
141
|
+
|
|
142
|
+
FROM nginx:alpine
|
|
143
|
+
COPY --from=build /app/dist /usr/share/nginx/html
|
|
144
|
+
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
`nginx.conf` is the SPA-fallback config from the previous section.
|
|
148
|
+
|
|
149
|
+
## Password-protected deploys
|
|
150
|
+
|
|
151
|
+
Password protection is **client-side decryption** — the server only
|
|
152
|
+
serves encrypted `.enc.json`; the browser decrypts locally after the
|
|
153
|
+
user types the password. So:
|
|
154
|
+
|
|
155
|
+
- ✅ **Server needs no auth** — the encrypted content itself is the
|
|
156
|
+
protection.
|
|
157
|
+
- ✅ Public GitHub Pages / Cloudflare Pages are fine.
|
|
158
|
+
- ⚠️ **Attackers can download the whole dist** and brute-force the KDF
|
|
159
|
+
offline. argon2id at 64 MiB / t=3 / p=1 pins each guess at ~700ms,
|
|
160
|
+
but that isn't infinite strength. **Don't use weak passwords** (any
|
|
161
|
+
short dictionary word/phrase).
|
|
162
|
+
- ⚠️ Bad passwords can't be detected server-side — no server-side
|
|
163
|
+
rate limiting exists. The view has a *local* limiter (2 / 5 / 15s
|
|
164
|
+
cooldown after 3 fails) that protects against typos, not attacks.
|
|
165
|
+
|
|
166
|
+
## Sub-path deploys
|
|
167
|
+
|
|
168
|
+
If your site lives at `https://example.com/mydeck/` rather than the
|
|
169
|
+
root, that's **not supported today** — the client hardcodes fetches
|
|
170
|
+
against `/material/*`. Either deploy at the root, or use a reverse
|
|
171
|
+
proxy to rewrite `/mydeck/*` → `/*`.
|
|
172
|
+
|
|
173
|
+
## Verifying the deploy
|
|
174
|
+
|
|
175
|
+
Open:
|
|
176
|
+
- `/` → material list (password prompt first if encrypted)
|
|
177
|
+
- `/material/index.json` → JSON manifest
|
|
178
|
+
- DevTools → Network should show:
|
|
179
|
+
- one `/material/index.json`
|
|
180
|
+
- one `/material/<file>.md` (or `.enc.json`) per card you open
|
|
181
|
+
- images from `/material/assets/**/*.svg`
|
|
182
|
+
|
|
183
|
+
**Any 404** = missing SPA fallback or wrong path prefix.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Getting started
|
|
2
|
+
|
|
3
|
+
Chinese: [getting-started.md](https://www.npmjs.com/package/@qnroa/qtype?activeTab=code&filepath=docs/zh/getting-started.md)
|
|
4
|
+
|
|
5
|
+
## 0. Prereqs
|
|
6
|
+
|
|
7
|
+
- Node ≥ 20
|
|
8
|
+
- A terminal
|
|
9
|
+
|
|
10
|
+
## 1. Create a repo
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
mkdir my-deck
|
|
14
|
+
npx @qnroa/qtype init my-deck --lang en
|
|
15
|
+
cd my-deck
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
`qtype init` drops into `my-deck/`:
|
|
19
|
+
|
|
20
|
+
- `QTYPE.md` — authoring spec (for you and for LLM agents)
|
|
21
|
+
- `material/word.md`, `sentence.md`, `article.md`, `snippet.md`, `qa.md`, `code.md` — one starter per material type, each a working demo
|
|
22
|
+
- `material/assets/<type>/*.svg` — the SVGs the starters reference
|
|
23
|
+
- `README.md`, `TODO.md`, `index.md`, `log.md` — empty scaffolds
|
|
24
|
+
- `.qtype/config.json` — repo-level config
|
|
25
|
+
|
|
26
|
+
**Key idea**: one `.md` file = one deck; the whole file has a single
|
|
27
|
+
`type`.
|
|
28
|
+
|
|
29
|
+
## 2. Peek at a starter
|
|
30
|
+
|
|
31
|
+
`material/sentence.md`:
|
|
32
|
+
|
|
33
|
+
```markdown
|
|
34
|
+
---
|
|
35
|
+
title: Sentence example
|
|
36
|
+
type: sentence
|
|
37
|
+
tags: [example, sentence]
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
# The quick brown fox jumps over the lazy dog.
|
|
41
|
+
## /ðə kwɪk braʊn fɑks/
|
|
42
|
+
### The classic English pangram — every letter A–Z appears once.
|
|
43
|
+
#### 
|
|
44
|
+
|
|
45
|
+
# Practice makes perfect.
|
|
46
|
+
### With enough practice, anything becomes easy.
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
- **H1 (`#`) = typing target** (what you type)
|
|
50
|
+
- H2 phonetic / H3 gloss / H4 image are optional annotation slots
|
|
51
|
+
|
|
52
|
+
Each type has its own shape — full reference in
|
|
53
|
+
[material-types.md](https://www.npmjs.com/package/@qnroa/qtype?activeTab=code&filepath=docs/en/material-types.md); a shorter overview lives in
|
|
54
|
+
[authoring.md](https://www.npmjs.com/package/@qnroa/qtype?activeTab=code&filepath=docs/en/authoring.md).
|
|
55
|
+
|
|
56
|
+
## 3. Validate
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npx @qnroa/qtype check
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Read-only lint: flags characters the typing engine can't handle
|
|
63
|
+
(emoji / zero-width / etc.). **Exit code 0 = clean.**
|
|
64
|
+
|
|
65
|
+
## 4. Build + preview
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npx @qnroa/qtype publish build # emits dist/
|
|
69
|
+
npx @qnroa/qtype publish serve # http://localhost:4000
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Open the URL — you'll see the 6 materials on the home page; click any
|
|
73
|
+
to start typing.
|
|
74
|
+
|
|
75
|
+
## 5. Deploy
|
|
76
|
+
|
|
77
|
+
Fastest route is GitHub Pages:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npx @qnroa/qtype publish init --ci github
|
|
81
|
+
git init && git add . && git commit -m "init"
|
|
82
|
+
git remote add origin https://github.com/YOUR_NAME/my-deck.git
|
|
83
|
+
git push -u origin main
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
In your repo Settings → Pages → set Source to **GitHub Actions**.
|
|
87
|
+
The workflow will publish on push.
|
|
88
|
+
|
|
89
|
+
Other targets (Cloudflare / Vercel / Netlify / nginx) →
|
|
90
|
+
[deployment.md](https://www.npmjs.com/package/@qnroa/qtype?activeTab=code&filepath=docs/en/deployment.md).
|
|
91
|
+
|
|
92
|
+
## 6. Optional: encrypt the site
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
npx @qnroa/qtype publish password set
|
|
96
|
+
# type a password interactively
|
|
97
|
+
|
|
98
|
+
npx @qnroa/qtype publish build
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Visitors now see a password gate; content is AES-256-GCM encrypted
|
|
102
|
+
client-side.
|
|
103
|
+
|
|
104
|
+
## Next steps
|
|
105
|
+
|
|
106
|
+
- Add more decks → copy any starter, rename, edit
|
|
107
|
+
- Ask an LLM to author for you → point Claude / Copilot at `QTYPE.md`
|
|
108
|
+
and say "author a GRE vocab deck following this spec"
|
|
109
|
+
- Tune the reader UX → gear icon (bottom right) or [settings.md](https://www.npmjs.com/package/@qnroa/qtype?activeTab=code&filepath=docs/en/settings.md)
|
|
110
|
+
- Tune typing rules (strict / lenient / case-insensitive) →
|
|
111
|
+
[typing-rules.md](https://www.npmjs.com/package/@qnroa/qtype?activeTab=code&filepath=docs/en/typing-rules.md)
|
|
112
|
+
- Keyboard shortcuts → [shortcuts.md](https://www.npmjs.com/package/@qnroa/qtype?activeTab=code&filepath=docs/en/shortcuts.md)
|