create-lupine 1.0.31 → 1.3.0

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 (269) hide show
  1. package/README.md +31 -0
  2. package/index.js +238 -112
  3. package/package.json +1 -1
  4. package/templates/common/.agents/skills/lupine-framework/SKILL.md +63 -0
  5. package/templates/common/.agents/skills/lupine-framework/references/backend-api.md +113 -0
  6. package/templates/common/.agents/skills/lupine-framework/references/icon-handling.md +71 -0
  7. package/templates/common/.agents/skills/lupine-framework/references/mobile-interactions.md +29 -0
  8. package/templates/common/.agents/skills/lupine-framework/references/native-apps.md +190 -0
  9. package/templates/common/.agents/skills/lupine-framework/references/navigation-and-routing.md +55 -0
  10. package/templates/common/.agents/skills/lupine-framework/references/reactivity-and-state.md +108 -0
  11. package/templates/common/.agents/skills/lupine-framework/references/styling-and-themes.md +121 -0
  12. package/templates/common/.env.mobile +4 -3
  13. package/templates/common/_env +10 -4
  14. package/templates/common/apps/server/README.md +10 -0
  15. package/templates/common/dev/cp-folder.js +9 -4
  16. package/templates/lupine-template-cv-starter/README.md +37 -0
  17. package/templates/lupine-template-cv-starter/app/package.json +20 -0
  18. package/templates/lupine-template-cv-starter/app/src/app.tsx +6 -0
  19. package/templates/lupine-template-cv-starter/app/src/index.native.tsx +4 -0
  20. package/templates/lupine-template-cv-starter/app/src/index.test.tsx +71 -0
  21. package/templates/lupine-template-cv-starter/app/src/index.web.tsx +28 -0
  22. package/templates/lupine-template-cv-starter/app/tsconfig.json +17 -0
  23. package/templates/lupine-template-cv-starter/lupine.json +8 -7
  24. package/templates/lupine-template-cv-starter/web/src/index.html +9 -2
  25. package/templates/lupine-template-cv-starter/web/src/index.tsx +9 -23
  26. package/templates/lupine-template-cv-starter/web/src/lupine-template-cv-starter/index.html +9 -2
  27. package/templates/lupine-template-cv-starter/web/src/lupine-template-cv-starter/index.tsx +4 -29
  28. package/templates/lupine-template-doc-starter/README.md +37 -0
  29. package/templates/lupine-template-doc-starter/app/package.json +20 -0
  30. package/templates/lupine-template-doc-starter/app/src/app.tsx +6 -0
  31. package/templates/lupine-template-doc-starter/app/src/index.native.tsx +4 -0
  32. package/templates/lupine-template-doc-starter/app/src/index.test.tsx +78 -0
  33. package/templates/lupine-template-doc-starter/app/src/index.web.tsx +28 -0
  34. package/templates/lupine-template-doc-starter/app/tsconfig.json +17 -0
  35. package/templates/lupine-template-doc-starter/lupine.json +8 -7
  36. package/templates/lupine-template-doc-starter/web/src/index.html +9 -2
  37. package/templates/lupine-template-doc-starter/web/src/index.tsx +9 -23
  38. package/templates/lupine-template-doc-starter/web/src/lupine-template-doc-starter/index.html +9 -2
  39. package/templates/lupine-template-doc-starter/web/src/lupine-template-doc-starter/index.tsx +4 -29
  40. package/templates/lupine-template-fullstack-note/README.md +83 -0
  41. package/templates/{lupine-template-hello-world → lupine-template-fullstack-note}/api/package.json +1 -1
  42. package/templates/lupine-template-fullstack-note/api/resources/install.mysql.sql +32 -0
  43. package/templates/lupine-template-fullstack-note/api/resources/install.sqlite.sql +27 -0
  44. package/templates/lupine-template-fullstack-note/api/src/service/answer.ts +39 -0
  45. package/templates/lupine-template-fullstack-note/api/src/service/api.ts +52 -0
  46. package/templates/lupine-template-fullstack-note/api/src/service/db.ts +78 -0
  47. package/templates/lupine-template-fullstack-note/api/src/service/notes-api.ts +86 -0
  48. package/templates/lupine-template-fullstack-note/api/src/service/root-api.ts +19 -0
  49. package/templates/lupine-template-fullstack-note/api/src/service/user-api.ts +182 -0
  50. package/templates/lupine-template-fullstack-note/app/package.json +19 -0
  51. package/templates/lupine-template-fullstack-note/app/src/app.tsx +75 -0
  52. package/templates/lupine-template-fullstack-note/app/src/index.native.tsx +4 -0
  53. package/templates/lupine-template-fullstack-note/app/src/index.test.tsx +373 -0
  54. package/templates/lupine-template-fullstack-note/app/src/index.web.tsx +20 -0
  55. package/templates/lupine-template-fullstack-note/app/src/pages/components.tsx +65 -0
  56. package/templates/lupine-template-fullstack-note/app/src/pages/details.tsx +38 -0
  57. package/templates/lupine-template-fullstack-note/app/src/pages/discover.tsx +25 -0
  58. package/templates/lupine-template-fullstack-note/app/src/pages/home.tsx +76 -0
  59. package/templates/lupine-template-fullstack-note/app/src/pages/inbox.tsx +49 -0
  60. package/templates/lupine-template-fullstack-note/app/src/pages/login.tsx +54 -0
  61. package/templates/lupine-template-fullstack-note/app/src/pages/me.tsx +32 -0
  62. package/templates/lupine-template-fullstack-note/app/src/pages/notes.tsx +128 -0
  63. package/templates/lupine-template-fullstack-note/app/src/pages/settings.tsx +45 -0
  64. package/templates/lupine-template-fullstack-note/app/src/shell/AppMenu.tsx +44 -0
  65. package/templates/lupine-template-fullstack-note/app/src/shell/api.ts +159 -0
  66. package/templates/lupine-template-fullstack-note/app/src/shell/data.ts +20 -0
  67. package/templates/lupine-template-fullstack-note/app/src/shell/locales/ja.ts +80 -0
  68. package/templates/lupine-template-fullstack-note/app/src/shell/locales/zh-CN.ts +80 -0
  69. package/templates/lupine-template-fullstack-note/app/src/shell/texts.ts +14 -0
  70. package/templates/lupine-template-fullstack-note/app/tsconfig.json +17 -0
  71. package/templates/{lupine-template-hello-world → lupine-template-fullstack-note}/lupine.json +4 -2
  72. package/templates/{lupine-template-hello-world → lupine-template-fullstack-note}/web/package.json +1 -1
  73. package/templates/{lupine-template-hello-world → lupine-template-fullstack-note}/web/src/index.html +10 -3
  74. package/templates/lupine-template-fullstack-note/web/src/index.tsx +15 -0
  75. package/templates/lupine-template-fullstack-starter/README.md +70 -0
  76. package/templates/lupine-template-fullstack-starter/api/package.json +10 -0
  77. package/templates/lupine-template-fullstack-starter/api/resources/install.mysql.sql +107 -0
  78. package/templates/lupine-template-fullstack-starter/api/resources/install.sqlite.sql +75 -0
  79. package/templates/lupine-template-fullstack-starter/api/src/lang/api-lang-en.ts +39 -0
  80. package/templates/lupine-template-fullstack-starter/api/src/lang/api-lang-zh-cn.ts +37 -0
  81. package/templates/lupine-template-fullstack-starter/api/src/service/admin-api.ts +139 -0
  82. package/templates/lupine-template-fullstack-starter/api/src/service/api.ts +111 -0
  83. package/templates/lupine-template-fullstack-starter/api/src/service/contact-api.ts +50 -0
  84. package/templates/lupine-template-fullstack-starter/api/src/service/file-api-base.ts +30 -0
  85. package/templates/lupine-template-fullstack-starter/api/src/service/root-api.ts +28 -0
  86. package/templates/lupine-template-fullstack-starter/api/src/service/send-email.ts +47 -0
  87. package/templates/lupine-template-fullstack-starter/api/src/service/setting-api.ts +60 -0
  88. package/templates/lupine-template-fullstack-starter/api/src/service/user-api.ts +1046 -0
  89. package/templates/lupine-template-fullstack-starter/app/assets/sample.png +0 -0
  90. package/templates/lupine-template-fullstack-starter/app/package.json +20 -0
  91. package/templates/lupine-template-fullstack-starter/app/src/app.tsx +76 -0
  92. package/templates/lupine-template-fullstack-starter/app/src/index.native.tsx +4 -0
  93. package/templates/lupine-template-fullstack-starter/app/src/index.test.tsx +276 -0
  94. package/templates/lupine-template-fullstack-starter/app/src/index.web.tsx +28 -0
  95. package/templates/lupine-template-fullstack-starter/app/src/pages/about.tsx +27 -0
  96. package/templates/lupine-template-fullstack-starter/app/src/pages/contact.tsx +41 -0
  97. package/templates/lupine-template-fullstack-starter/app/src/pages/favorite.tsx +27 -0
  98. package/templates/lupine-template-fullstack-starter/app/src/pages/home.tsx +63 -0
  99. package/templates/lupine-template-fullstack-starter/app/src/pages/login.tsx +63 -0
  100. package/templates/lupine-template-fullstack-starter/app/src/pages/mine.tsx +44 -0
  101. package/templates/lupine-template-fullstack-starter/app/src/pages/profile.tsx +58 -0
  102. package/templates/lupine-template-fullstack-starter/app/src/pages/register.tsx +48 -0
  103. package/templates/lupine-template-fullstack-starter/app/src/pages/reset-password.tsx +41 -0
  104. package/templates/lupine-template-fullstack-starter/app/src/pages/settings.tsx +33 -0
  105. package/templates/lupine-template-fullstack-starter/app/src/pages/story.tsx +46 -0
  106. package/templates/lupine-template-fullstack-starter/app/src/shell/api.ts +127 -0
  107. package/templates/lupine-template-fullstack-starter/app/src/shell/parts.tsx +100 -0
  108. package/templates/lupine-template-fullstack-starter/app/src/shell/stories.ts +65 -0
  109. package/templates/lupine-template-fullstack-starter/app/src/shell/texts.ts +79 -0
  110. package/templates/lupine-template-fullstack-starter/app/tsconfig.json +17 -0
  111. package/templates/lupine-template-fullstack-starter/lupine.json +31 -0
  112. package/templates/lupine-template-fullstack-starter/web/assets/android-chrome-192x192.png +0 -0
  113. package/templates/lupine-template-fullstack-starter/web/assets/apple-touch-icon.png +0 -0
  114. package/templates/lupine-template-fullstack-starter/web/assets/favicon-16x16.png +0 -0
  115. package/templates/lupine-template-fullstack-starter/web/assets/favicon-32x32.png +0 -0
  116. package/templates/lupine-template-fullstack-starter/web/assets/favicon.ico +0 -0
  117. package/templates/lupine-template-fullstack-starter/web/assets/icons-font/License-carbon-icons.txt +71 -0
  118. package/templates/lupine-template-fullstack-starter/web/assets/icons-font/License-material-design.txt +20 -0
  119. package/templates/lupine-template-fullstack-starter/web/assets/icons-font/i-font.woff2 +0 -0
  120. package/templates/lupine-template-fullstack-starter/web/assets/icons-font/sample.html +124 -0
  121. package/templates/lupine-template-fullstack-starter/web/assets/icons-font/style.css +103 -0
  122. package/templates/lupine-template-fullstack-starter/web/assets/lupine-flower.png +0 -0
  123. package/templates/lupine-template-fullstack-starter/web/assets/lupine.svg +71 -0
  124. package/templates/lupine-template-fullstack-starter/web/assets/site.webmanifest +14 -0
  125. package/templates/lupine-template-fullstack-starter/web/icons-font.config.js +129 -0
  126. package/templates/{lupine-template-responsive-starter/api → lupine-template-fullstack-starter/web}/package.json +1 -1
  127. package/templates/lupine-template-fullstack-starter/web/src/admin/admin-patch.tsx +34 -0
  128. package/templates/lupine-template-fullstack-starter/web/src/admin/components/home-search-component.tsx +125 -0
  129. package/templates/lupine-template-fullstack-starter/web/src/admin/components/story-card.tsx +105 -0
  130. package/templates/lupine-template-fullstack-starter/web/src/admin/components/story-list.tsx +105 -0
  131. package/templates/lupine-template-fullstack-starter/web/src/admin/components/story-props.ts +34 -0
  132. package/templates/lupine-template-fullstack-starter/web/src/admin/index.html +23 -0
  133. package/templates/lupine-template-fullstack-starter/web/src/admin/index.tsx +49 -0
  134. package/templates/lupine-template-fullstack-starter/web/src/admin/pages/admin-cfg.tsx +144 -0
  135. package/templates/lupine-template-fullstack-starter/web/src/admin/pages/admin-item-edit.tsx +20 -0
  136. package/templates/lupine-template-fullstack-starter/web/src/admin/pages/admin-item-list.tsx +23 -0
  137. package/templates/lupine-template-fullstack-starter/web/src/admin/pages/admin-user.tsx +145 -0
  138. package/templates/lupine-template-fullstack-starter/web/src/index.html +28 -0
  139. package/templates/lupine-template-fullstack-starter/web/src/index.tsx +16 -0
  140. package/templates/lupine-template-fullstack-starter/web/src/services/fetch-data.ts +37 -0
  141. package/templates/lupine-template-fullstack-starter/web/src/styles/base-css.ts +14 -0
  142. package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/web/src/styles/global.css +10 -57
  143. package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/web/src/styles/theme.ts +2 -1
  144. package/templates/lupine-template-responsive-starter/README.md +51 -0
  145. package/templates/lupine-template-responsive-starter/app/package.json +19 -0
  146. package/templates/lupine-template-responsive-starter/app/src/app.tsx +80 -0
  147. package/templates/lupine-template-responsive-starter/app/src/index.native.tsx +4 -0
  148. package/templates/lupine-template-responsive-starter/app/src/index.test.tsx +283 -0
  149. package/templates/lupine-template-responsive-starter/app/src/index.web.tsx +31 -0
  150. package/templates/lupine-template-responsive-starter/app/src/pages/about.tsx +23 -0
  151. package/templates/lupine-template-responsive-starter/app/src/pages/finance.tsx +48 -0
  152. package/templates/lupine-template-responsive-starter/app/src/pages/mine.tsx +60 -0
  153. package/templates/lupine-template-responsive-starter/app/src/pages/not-found.tsx +9 -0
  154. package/templates/lupine-template-responsive-starter/app/src/pages/note-detail.tsx +43 -0
  155. package/templates/lupine-template-responsive-starter/app/src/pages/note-edit.tsx +45 -0
  156. package/templates/lupine-template-responsive-starter/app/src/pages/note-search.tsx +62 -0
  157. package/templates/lupine-template-responsive-starter/app/src/pages/notes.tsx +71 -0
  158. package/templates/lupine-template-responsive-starter/app/src/pages/settings.tsx +55 -0
  159. package/templates/lupine-template-responsive-starter/app/src/pages/tools.tsx +112 -0
  160. package/templates/lupine-template-responsive-starter/app/src/shell/icons.ts +7 -0
  161. package/templates/lupine-template-responsive-starter/app/src/shell/layout.ts +18 -0
  162. package/templates/lupine-template-responsive-starter/app/src/shell/locales/zh-CN.ts +89 -0
  163. package/templates/lupine-template-responsive-starter/app/src/shell/menu.tsx +81 -0
  164. package/templates/lupine-template-responsive-starter/app/src/shell/nav.ts +12 -0
  165. package/templates/lupine-template-responsive-starter/app/src/shell/store.ts +72 -0
  166. package/templates/lupine-template-responsive-starter/app/src/shell/texts.ts +11 -0
  167. package/templates/lupine-template-responsive-starter/app/tsconfig.json +17 -0
  168. package/templates/lupine-template-responsive-starter/lupine.json +7 -6
  169. package/templates/lupine-template-responsive-starter/web/src/index.html +9 -2
  170. package/templates/lupine-template-responsive-starter/web/src/index.tsx +9 -34
  171. package/templates/lupine-template-responsive-starter/web/src/lupine-template-responsive-starter/index.html +12 -6
  172. package/templates/lupine-template-responsive-starter/web/src/lupine-template-responsive-starter/index.tsx +12 -31
  173. package/templates/common/AI_CONTEXT.md +0 -1002
  174. package/templates/common/apps/server/src/app-loader.ts +0 -4
  175. package/templates/lupine-template-cv-starter/api/package.json +0 -6
  176. package/templates/lupine-template-cv-starter/api/resources/install.sqlite.sql +0 -4
  177. package/templates/lupine-template-cv-starter/api/src/index.ts +0 -15
  178. package/templates/lupine-template-cv-starter/web/src/styles/base-css.ts +0 -15
  179. package/templates/lupine-template-doc-starter/api/package.json +0 -6
  180. package/templates/lupine-template-doc-starter/api/resources/config_default.json +0 -6
  181. package/templates/lupine-template-doc-starter/api/resources/install.sqlite.sql +0 -4
  182. package/templates/lupine-template-doc-starter/api/src/index.ts +0 -15
  183. package/templates/lupine-template-doc-starter/api/src/resources/config_default.json +0 -6
  184. package/templates/lupine-template-doc-starter/api/src/resources/install.sqlite.sql +0 -4
  185. package/templates/lupine-template-doc-starter/web/src/client-env-keys.ts +0 -5
  186. package/templates/lupine-template-doc-starter/web/src/styles/base-css.ts +0 -15
  187. package/templates/lupine-template-hello-world/api/resources/config_default.json +0 -6
  188. package/templates/lupine-template-hello-world/api/resources/install.sqlite.sql +0 -4
  189. package/templates/lupine-template-hello-world/api/src/service/root-api.ts +0 -18
  190. package/templates/lupine-template-hello-world/web/src/index.tsx +0 -73
  191. package/templates/lupine-template-hello-world/web/src/styles/app.css +0 -0
  192. package/templates/lupine-template-hello-world/web/src/styles/base-css.ts +0 -1
  193. package/templates/lupine-template-responsive-starter/api/resources/config_default.json +0 -6
  194. package/templates/lupine-template-responsive-starter/api/resources/install.sqlite.sql +0 -4
  195. package/templates/lupine-template-responsive-starter/api/src/service/root-api.ts +0 -18
  196. package/templates/lupine-template-responsive-starter/web/src/app-icons.ts +0 -76
  197. package/templates/lupine-template-responsive-starter/web/src/components/input-history-component.tsx +0 -93
  198. package/templates/lupine-template-responsive-starter/web/src/components/mine-about-page.tsx +0 -86
  199. package/templates/lupine-template-responsive-starter/web/src/components/mine-premium-page.tsx +0 -80
  200. package/templates/lupine-template-responsive-starter/web/src/components/mine-settings-page.tsx +0 -220
  201. package/templates/lupine-template-responsive-starter/web/src/components/mobile-top-search-menu.tsx +0 -119
  202. package/templates/lupine-template-responsive-starter/web/src/components/note-detail.tsx +0 -116
  203. package/templates/lupine-template-responsive-starter/web/src/components/note-edit.tsx +0 -154
  204. package/templates/lupine-template-responsive-starter/web/src/components/note-search-page.tsx +0 -193
  205. package/templates/lupine-template-responsive-starter/web/src/components/search-input.tsx +0 -95
  206. package/templates/lupine-template-responsive-starter/web/src/components/side-menu-content.tsx +0 -182
  207. package/templates/lupine-template-responsive-starter/web/src/frames/app-responsive-frame.tsx +0 -52
  208. package/templates/lupine-template-responsive-starter/web/src/pages/about-page.tsx +0 -43
  209. package/templates/lupine-template-responsive-starter/web/src/pages/finance-page.tsx +0 -46
  210. package/templates/lupine-template-responsive-starter/web/src/pages/home-page.tsx +0 -452
  211. package/templates/lupine-template-responsive-starter/web/src/pages/mine-page.tsx +0 -325
  212. package/templates/lupine-template-responsive-starter/web/src/pages/tools-page.tsx +0 -46
  213. package/templates/lupine-template-responsive-starter/web/src/services/local-notes-service.ts +0 -87
  214. package/templates/lupine-template-responsive-starter/web/src/services/mine-service.ts +0 -45
  215. package/templates/lupine-template-responsive-starter/web/src/styles/app.css +0 -0
  216. package/templates/lupine-template-responsive-starter/web/src/styles/base-css.ts +0 -65
  217. package/templates/lupine-template-responsive-starter/web/src/styles/global.css +0 -2130
  218. package/templates/lupine-template-responsive-starter/web/src/styles/theme.ts +0 -16
  219. /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/01-experience/index.md +0 -0
  220. /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/02-projects/index.md +0 -0
  221. /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/03-skills/index.md +0 -0
  222. /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/04-education/index.md +0 -0
  223. /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/index.md +0 -0
  224. /package/templates/lupine-template-cv-starter/{web → app}/markdown/index.md +0 -0
  225. /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/01-experience/index.md +0 -0
  226. /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/02-projects/index.md +0 -0
  227. /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/03-skills/index.md +0 -0
  228. /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/04-education/index.md +0 -0
  229. /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/index.md +0 -0
  230. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/01-experience/index.html +0 -0
  231. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/02-projects/index.html +0 -0
  232. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/03-skills/index.html +0 -0
  233. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/04-education/index.html +0 -0
  234. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/index.html +0 -0
  235. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/index.html +0 -0
  236. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/markdown-config.ts +0 -0
  237. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/01-experience/index.html +0 -0
  238. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/02-projects/index.html +0 -0
  239. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/03-skills/index.html +0 -0
  240. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/04-education/index.html +0 -0
  241. /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/index.html +0 -0
  242. /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/essentials/index.md +0 -0
  243. /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/essentials/list.md +0 -0
  244. /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/guide/install.md +0 -0
  245. /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/guide/started.md +0 -0
  246. /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/index.md +0 -0
  247. /package/templates/lupine-template-doc-starter/{web → app}/markdown/index.md +0 -0
  248. /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/essentials/index.md +0 -0
  249. /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/essentials/list.md +0 -0
  250. /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/guide/install.md +0 -0
  251. /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/guide/started.md +0 -0
  252. /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/index.md +0 -0
  253. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/essentials/index.html +0 -0
  254. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/essentials/list.html +0 -0
  255. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/guide/install.html +0 -0
  256. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/guide/started.html +0 -0
  257. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/index.html +0 -0
  258. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/index.html +0 -0
  259. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/markdown-config.ts +0 -0
  260. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/essentials/index.html +0 -0
  261. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/essentials/list.html +0 -0
  262. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/guide/install.html +0 -0
  263. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/guide/started.html +0 -0
  264. /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/index.html +0 -0
  265. /package/templates/{lupine-template-hello-world → lupine-template-fullstack-note}/api/src/index.ts +0 -0
  266. /package/templates/{lupine-template-hello-world → lupine-template-fullstack-note}/web/assets/favicon.ico +0 -0
  267. /package/templates/{lupine-template-cv-starter → lupine-template-fullstack-starter}/api/resources/config_default.json +0 -0
  268. /package/templates/{lupine-template-responsive-starter → lupine-template-fullstack-starter}/api/src/index.ts +0 -0
  269. /package/templates/{lupine-template-cv-starter/web/src → lupine-template-fullstack-starter/web/src/models}/client-env-keys.ts +0 -0
@@ -0,0 +1,144 @@
1
+ import { uploadFile } from 'lupine.core';
2
+ import { Toast } from 'lupine.native.components';
3
+ import { getRenderPageProps, CssProps, MediaQueryMaxWidth } from 'lupine.web';
4
+
5
+ /** the value of an input of the page */
6
+ const valueOf = (selector: string) => (document.querySelector(selector) as HTMLInputElement | null)?.value;
7
+
8
+ export const AdminCfgPage = async () => {
9
+ const css: CssProps = {
10
+ display: 'flex',
11
+ flexDirection: 'column',
12
+ width: '100%',
13
+ maxWidth: MediaQueryMaxWidth.DesktopMax,
14
+ margin: '0 auto',
15
+ padding: '16px',
16
+ '.label': {
17
+ width: '200px',
18
+ marginBottom: '20px',
19
+ },
20
+ '.m-menu': {
21
+ display: 'flex',
22
+ flexDirection: 'row',
23
+ padding: '10px',
24
+ border: '1px solid #aaa',
25
+ borderRadius: '8px',
26
+ margin: '10px 0',
27
+ },
28
+ '.m-label': {
29
+ width: '200px',
30
+ },
31
+ '.m-text': {
32
+ width: '400px',
33
+ marginBottom: '10px',
34
+ },
35
+ 'textarea.m-text': {
36
+ height: '80px',
37
+ },
38
+ };
39
+
40
+ const uploadImgFile = async (sector: string, fname: string) => {
41
+ const file = (document.querySelector(sector) as HTMLInputElement)!.files;
42
+ if (!file || file.length !== 1) {
43
+ return;
44
+ }
45
+ const ext = file[0].name.split('.').pop();
46
+ if (ext !== 'png' && ext !== 'jpg' && ext !== 'jpeg') {
47
+ Toast.error('Please select an image file');
48
+ return;
49
+ }
50
+ const result = await uploadFile(file[0], '/api/add-cfg-file?fn=' + fname + '.' + ext);
51
+ if (result !== true) {
52
+ Toast.error('Failed to upload file');
53
+ return;
54
+ }
55
+ };
56
+
57
+ const onSave = async () => {
58
+ const title = valueOf('.f-title');
59
+ const footer = valueOf('.f-footer');
60
+ const section1 = valueOf('.f-section1');
61
+ const section2 = valueOf('.f-section2');
62
+ const section3 = valueOf('.f-section3');
63
+ const section4 = valueOf('.f-section4');
64
+ const ourValueTitle = valueOf('.f-value-t');
65
+ const ourValue = valueOf('.f-value');
66
+ const pageLimit = valueOf('.f-pageLimit');
67
+ const sitePaypal = valueOf('.f-sitePaypal');
68
+ const siteEmail = valueOf('.f-siteEmail');
69
+ const siteUrl = valueOf('.f-siteUrl');
70
+
71
+ await uploadImgFile('.img-logo', 'logo');
72
+
73
+ const data: any = {
74
+ title,
75
+ footer,
76
+ section1,
77
+ section2,
78
+ section3,
79
+ section4,
80
+ ourValueTitle,
81
+ ourValue,
82
+ pageLimit,
83
+ sitePaypal,
84
+ siteEmail,
85
+ siteUrl,
86
+ };
87
+
88
+ const siteLogo = (document.querySelector('.img-logo') as HTMLInputElement)!.files;
89
+ if (siteLogo && siteLogo.length === 1) {
90
+ const filename = 'logo.' + siteLogo[0].name.split('.').pop();
91
+ data['siteLogo'] = filename;
92
+ }
93
+
94
+ const result = await getRenderPageProps().renderPageFunctions.fetchData(
95
+ '/api/write-settings',
96
+ JSON.stringify(data)
97
+ );
98
+ console.log(data);
99
+ setTimeout(() => {
100
+ document.location.reload();
101
+ }, 500);
102
+ };
103
+
104
+ return (
105
+ <div css={css} class='management-cfg-page-box'>
106
+ <div class='row-box'>
107
+ <button class='button-base' onClick={onSave}>
108
+ Save
109
+ </button>
110
+ </div>
111
+ {/* <div class='row-box'>
112
+ <label class='m-label'>Site Title:</label>{' '}
113
+ <input type='text' class='input-base m-text f-title' value={webSetting('siteTitle', '(not set)')} />
114
+ </div>
115
+ <div class='row-box'>
116
+ <label class='m-label'>Logo:</label>{' '}
117
+ <input type='file' class='input-base m-text img-logo mr-m' accept='.jpg, .jpeg, .png, .svg' />
118
+ {webSetting('siteLogo', '(not set)')}
119
+ </div>
120
+ <div class='row-box'>
121
+ <label class='m-label'>Page Footer:</label>{' '}
122
+ <input
123
+ type='text'
124
+ class='input-base m-text f-footer'
125
+ value={webSetting('footer', `Copyright© 2024 <a href='/'>lupine.dev</a>. All Rights Reserved.`)}
126
+ />
127
+ </div>
128
+
129
+ <br />
130
+ <div class='row-box'>
131
+ <label class='m-label'>Per Page Items:</label>{' '}
132
+ <input type='number' class='input-base m-text f-pageLimit' value={webSetting('pageLimit', 10)} />
133
+ </div>
134
+ <div class='row-box'>
135
+ <label class='m-label'>Email address:</label>{' '}
136
+ <input type='text' class='input-base m-text f-siteEmail' value={webSetting('siteEmail', '(not set)')} />
137
+ </div>
138
+ <div class='row-box'>
139
+ <label class='m-label'>Website Url:</label>{' '}
140
+ <input type='text' class='input-base m-text f-siteUrl' value={webSetting('siteUrl', '(not set)')} />
141
+ </div> */}
142
+ </div>
143
+ );
144
+ };
@@ -0,0 +1,20 @@
1
+ import { CssProps, MediaQueryRange } from 'lupine.web';
2
+
3
+ export const AdminItemEditPage = async (props: { id: string }) => {
4
+ const css: CssProps = {
5
+ display: 'flex',
6
+ flexDirection: 'column',
7
+ flex: '1',
8
+ '.management-new-page-box': {
9
+ padding: '0 32px 16px',
10
+ [MediaQueryRange.MobileBelow]: {
11
+ padding: '0 16px 16px',
12
+ },
13
+ },
14
+ };
15
+ return (
16
+ <div css={css}>
17
+ <div class='management-new-page-box'>Edit: {props.id}</div>
18
+ </div>
19
+ );
20
+ };
@@ -0,0 +1,23 @@
1
+ import { CssProps, MediaQueryRange } from 'lupine.web';
2
+ import { HomeSearchComponent } from '../components/home-search-component';
3
+
4
+ export const AdminItemListPage = async () => {
5
+ const css: CssProps = {
6
+ display: 'flex',
7
+ flexDirection: 'column',
8
+ flex: '1',
9
+ '.management-music-page-box': {
10
+ padding: '0 32px 16px',
11
+ [MediaQueryRange.MobileBelow]: {
12
+ padding: '0 16px 16px',
13
+ },
14
+ },
15
+ };
16
+ return (
17
+ <div css={css}>
18
+ <div class='management-music-page-box'>
19
+ <HomeSearchComponent management={true} />
20
+ </div>
21
+ </div>
22
+ );
23
+ };
@@ -0,0 +1,145 @@
1
+ import { ActionSheet, Toast } from 'lupine.native.components';
2
+ import { createSignal, CssProps, getRenderPageProps, onMount } from 'lupine.web';
3
+
4
+ /** the value of an input of the page */
5
+ const valueOf = (selector: string) => (document.querySelector(selector) as HTMLInputElement | null)?.value;
6
+
7
+ export const AdminUserPage = async () => {
8
+ const css: CssProps = {
9
+ display: 'flex',
10
+ flexDirection: 'column',
11
+ width: '100%',
12
+ margin: '0 auto',
13
+ padding: '16px',
14
+ '.m-menu': {
15
+ display: 'flex',
16
+ flexDirection: 'row',
17
+ padding: '10px',
18
+ border: '1px solid #aaa',
19
+ borderRadius: '8px',
20
+ margin: '10px 0',
21
+ },
22
+ '.row-top': {
23
+ paddingBottom: '16px',
24
+ marginBottom: '16px',
25
+ borderBottom: 'dotted 1px #aaa',
26
+ },
27
+ '.u-pass': {
28
+ width: '120px',
29
+ },
30
+ };
31
+
32
+ const onUpdate = async (user: any) => {
33
+ const usertype = valueOf(`.row-${user.id} .u-usertype`);
34
+ const pass = valueOf(`.row-${user.id} .u-pass`);
35
+ const updateIndex = await ActionSheet.select({ title: 'Do you want to update user: ' + user.username + '?', options: ['OK'], cancelText: 'Cancel' });
36
+ if (updateIndex !== 0) {
37
+ return;
38
+ }
39
+ const result = await getRenderPageProps().renderPageFunctions.fetchData('/api/user-update', {
40
+ id: user.id,
41
+ usertype: usertype,
42
+ password: pass,
43
+ });
44
+ if (result.json.status !== 'ok') {
45
+ Toast.error(result.json.message);
46
+ return;
47
+ } else {
48
+ Toast.success(result.json.message);
49
+ }
50
+ setTimeout(() => {
51
+ document.location.reload();
52
+ }, 1000);
53
+ };
54
+
55
+ const onBlock = async (user: any, block: string) => {
56
+ const blockText = block === '1' ? 'Block' : 'Allow';
57
+ const blockIndex = await ActionSheet.select({ title: 'Do you want to ' + blockText + ' this user login?', options: ['OK'], cancelText: 'Cancel' });
58
+ if (blockIndex !== 0) {
59
+ return;
60
+ }
61
+ const result = await getRenderPageProps().renderPageFunctions.fetchData(
62
+ '/api/user-block?id=' + encodeURIComponent(String(user.id)) + '&block=' + encodeURIComponent(block),
63
+ {}
64
+ );
65
+ if (result.json.status !== 'ok') {
66
+ Toast.error(result.json.message);
67
+ return;
68
+ } else {
69
+ Toast.success(result.json.message);
70
+ }
71
+ setTimeout(() => {
72
+ document.location.reload();
73
+ }, 1000);
74
+ };
75
+ const formatTime = (time: string) => {
76
+ if (time.length === 24) {
77
+ return time.substring(0, 19).replace('T', ' ');
78
+ }
79
+ return time;
80
+ };
81
+ const UserList = (props: any) => {
82
+ console.log('props:', props);
83
+ return (
84
+ <div>
85
+ {props.users.map((user: any, i: number) => {
86
+ return (
87
+ <div class={'row-top row-' + user.id}>
88
+ <div class='row-box'>
89
+ <label class='u-name'>
90
+ User: {user.username}, Id: {user.id}
91
+ </label>
92
+ <label class='ml-m'>{user.block === '1' ? ' (Blocked)' : ''}</label>
93
+ </div>
94
+ <div class='row-box'>
95
+ <label class='u-name mr-m'>Registered: {formatTime(user.registerdate)}, </label>
96
+ <label class='u-name mr-m'>Last login: {formatTime(user.lastvisitdate)}, </label>
97
+ <label class='u-point mr-m'>Type:</label>
98
+ <select class='u-usertype'>
99
+ <option value='admin' selected={user.usertype === 'admin'}>
100
+ Admin
101
+ </option>
102
+ <option value='user' selected={user.usertype !== 'admin'}>
103
+ User
104
+ </option>
105
+ </select>
106
+ <label class='u-point ml-m'>Password:</label>
107
+ <input type='password' value='' class='input-base u-pass' />
108
+ <button class='button-base' onClick={() => onUpdate(user)}>
109
+ Update
110
+ </button>
111
+ {user.block === '1' ? (
112
+ <button class='button-base' onClick={() => onBlock(user, '0')}>
113
+ Unblock
114
+ </button>
115
+ ) : (
116
+ <button class='button-base ml-s' onClick={() => onBlock(user, '1')}>
117
+ Block
118
+ </button>
119
+ )}
120
+ </div>
121
+ </div>
122
+ );
123
+ })}
124
+ </div>
125
+ );
126
+ };
127
+ const fetchUsers = async () => {
128
+ const data = await getRenderPageProps().renderPageFunctions.fetchData('/api/users');
129
+ return data.json;
130
+ };
131
+ onMount(async () => {
132
+ const response = await fetchUsers();
133
+ if (response.status !== 'ok') {
134
+ Toast.error(response.message);
135
+ return;
136
+ }
137
+ setUserList(<UserList users={response.results} />);
138
+ });
139
+ const [userList, setUserList] = createSignal<any>('');
140
+ return (
141
+ <div css={css} class='management-user-page-box'>
142
+ <div class='list-top'>{userList}</div>
143
+ </div>
144
+ );
145
+ };
@@ -0,0 +1,28 @@
1
+ <!DOCTYPE html>
2
+ <html data-theme="<!--META-THEME-->">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <link rel="manifest" href="{SUBDIR}/assets/site.webmanifest" />
6
+ <title><!--META-TITLE--></title>
7
+ <link rel="apple-touch-icon" sizes="180x180" href="{SUBDIR}/assets/apple-touch-icon.png" />
8
+ <link rel="icon" type="image/png" sizes="32x32" href="{SUBDIR}/assets/favicon-32x32.png" />
9
+ <link rel="icon" type="image/png" sizes="16x16" href="{SUBDIR}/assets/favicon-16x16.png" />
10
+ <link rel="icon" type="image/png" sizes="192x192" href="{SUBDIR}/assets/android-chrome-192x192.png" />
11
+ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, user-scalable=no" />
12
+ <!--META-ENV-START-->
13
+ <!--META-ENV-END-->
14
+ <link rel="shortcut icon" href="{SUBDIR}/assets/favicon.ico?t={hash}" type="image/x-icon" />
15
+ <style>
16
+ html,
17
+ body,
18
+ .lupine-root {
19
+ height: 100%;
20
+ margin: 0;
21
+ }
22
+ </style>
23
+ <script defer src="{SUBDIR}/index.js?t={hash}"></script>
24
+ </head>
25
+ <body>
26
+ <div class="lupine-root"></div>
27
+ </body>
28
+ </html>
@@ -0,0 +1,16 @@
1
+ import { bindRouter, PageRouter, setDefaultPageTitle } from 'lupine.web';
2
+ import { AppPage } from '../../app/src/index.web';
3
+ // the primitives of the app in the page that the server renders
4
+ import 'lupine.native.core/web/server';
5
+
6
+ // The page of the site is the app (app/), the web version of the same app that runs on iOS, Android, macOS and
7
+ // Windows, in the same bundle: the server renders the page of the address (search engines see the text). keep: the app
8
+ // is made once and stays; when the address changes (its own pages, the back button, a link of the site) it follows the
9
+ // address itself. Pages of the site itself go into pageRouter before it. The admin pages (/admin) are an entry of their
10
+ // own: web/src/admin (lupine.json).
11
+
12
+ setDefaultPageTitle('Lupine Full-stack Starter');
13
+
14
+ const pageRouter = new PageRouter();
15
+ pageRouter.use('*', AppPage, { keep: true });
16
+ bindRouter(pageRouter);
@@ -0,0 +1,37 @@
1
+ import { JsonObject } from 'lupine.web';
2
+
3
+ // fetchData of the admin pages (bindRenderPageFunctions). The pages come from the server of the API, so the address is
4
+ // the same (WEB.API_BASE_URL of .env is for the native apps), and the session is the httpOnly cookie _token, which the
5
+ // browser sends by itself.
6
+ export const baseUrl = (urlWithoutHost?: string) => urlWithoutHost || '';
7
+
8
+ export const fetchData = async (urlWithoutHost: string, postData?: string | JsonObject, returnRawResponse?: boolean, returnHeaders?: boolean) => {
9
+ const url = baseUrl(urlWithoutHost);
10
+ const keepData = typeof postData === 'string' || postData instanceof File || postData instanceof FormData || postData instanceof Blob;
11
+ const option = {
12
+ method: postData ? 'POST' : 'GET',
13
+ credentials: 'include' as RequestCredentials,
14
+ body: postData ? (keepData ? postData : JSON.stringify(postData)) : undefined,
15
+ };
16
+ try {
17
+ const response = await fetch(url, option);
18
+ if (returnRawResponse) {
19
+ return response;
20
+ }
21
+ const text = await response.text();
22
+ const headers: { [key: string]: string } = {};
23
+ if (returnHeaders) {
24
+ response.headers.forEach((value, key) => {
25
+ headers[key] = value;
26
+ });
27
+ }
28
+ try {
29
+ const json = JSON.parse(text);
30
+ return returnHeaders ? { json, headers } : { json };
31
+ } catch (e) {
32
+ return returnHeaders ? { text, headers } : { text };
33
+ }
34
+ } catch (e) {
35
+ return { json: { status: 'error', error: e } };
36
+ }
37
+ };
@@ -0,0 +1,14 @@
1
+ export const baseCss = {
2
+ '.header-title': {
3
+ fontSize: 'var(--page-title-font-size)',
4
+ textAlign: 'center',
5
+ padding: '20px 0',
6
+ },
7
+ '.msg-area': {
8
+ height: '100px',
9
+ },
10
+ '.video-box': {
11
+ width: '100%',
12
+ height: 'auto',
13
+ },
14
+ };