create-lupine 1.0.31 → 1.2.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 (126) hide show
  1. package/README.md +25 -0
  2. package/index.js +11 -9
  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 +98 -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 +100 -0
  8. package/templates/common/.agents/skills/lupine-framework/references/native-apps.md +167 -0
  9. package/templates/common/.agents/skills/lupine-framework/references/navigation-and-routing.md +54 -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 +119 -0
  12. package/templates/common/_env +2 -0
  13. package/templates/lupine-template-cv-starter/README.md +5 -0
  14. package/templates/lupine-template-cv-starter/web/src/index.tsx +1 -10
  15. package/templates/lupine-template-cv-starter/web/src/lupine-template-cv-starter/index.tsx +1 -10
  16. package/templates/lupine-template-doc-starter/README.md +5 -0
  17. package/templates/lupine-template-doc-starter/web/src/index.tsx +1 -10
  18. package/templates/lupine-template-doc-starter/web/src/lupine-template-doc-starter/index.tsx +1 -10
  19. package/templates/lupine-template-fullstack-starter/README.md +21 -0
  20. package/templates/lupine-template-fullstack-starter/api/package.json +10 -0
  21. package/templates/lupine-template-fullstack-starter/api/resources/install.mysql.sql +107 -0
  22. package/templates/lupine-template-fullstack-starter/api/resources/install.sqlite.sql +75 -0
  23. package/templates/lupine-template-fullstack-starter/api/src/lang/api-lang-en.ts +39 -0
  24. package/templates/lupine-template-fullstack-starter/api/src/lang/api-lang-zh-cn.ts +37 -0
  25. package/templates/lupine-template-fullstack-starter/api/src/service/admin-api.ts +139 -0
  26. package/templates/lupine-template-fullstack-starter/api/src/service/api.ts +111 -0
  27. package/templates/lupine-template-fullstack-starter/api/src/service/contact-api.ts +50 -0
  28. package/templates/lupine-template-fullstack-starter/api/src/service/file-api-base.ts +30 -0
  29. package/templates/lupine-template-fullstack-starter/api/src/service/root-api.ts +28 -0
  30. package/templates/lupine-template-fullstack-starter/api/src/service/send-email.ts +47 -0
  31. package/templates/lupine-template-fullstack-starter/api/src/service/setting-api.ts +60 -0
  32. package/templates/lupine-template-fullstack-starter/api/src/service/user-api.ts +1041 -0
  33. package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/lupine.json +10 -1
  34. package/templates/lupine-template-fullstack-starter/web/assets/android-chrome-192x192.png +0 -0
  35. package/templates/lupine-template-fullstack-starter/web/assets/apple-touch-icon.png +0 -0
  36. package/templates/lupine-template-fullstack-starter/web/assets/favicon-16x16.png +0 -0
  37. package/templates/lupine-template-fullstack-starter/web/assets/favicon-32x32.png +0 -0
  38. package/templates/lupine-template-fullstack-starter/web/assets/icons-font/License-carbon-icons.txt +71 -0
  39. package/templates/lupine-template-fullstack-starter/web/assets/icons-font/License-material-design.txt +20 -0
  40. package/templates/lupine-template-fullstack-starter/web/assets/icons-font/i-font.woff2 +0 -0
  41. package/templates/lupine-template-fullstack-starter/web/assets/icons-font/sample.html +124 -0
  42. package/templates/lupine-template-fullstack-starter/web/assets/icons-font/style.css +103 -0
  43. package/templates/lupine-template-fullstack-starter/web/assets/images/sample.png +0 -0
  44. package/templates/lupine-template-fullstack-starter/web/assets/lupine-flower.png +0 -0
  45. package/templates/lupine-template-fullstack-starter/web/assets/lupine.svg +71 -0
  46. package/templates/lupine-template-fullstack-starter/web/assets/site.webmanifest +14 -0
  47. package/templates/lupine-template-fullstack-starter/web/icons-font.config.js +129 -0
  48. package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/web/package.json +1 -1
  49. package/templates/lupine-template-fullstack-starter/web/src/admin_dev/admin-about.tsx +16 -0
  50. package/templates/lupine-template-fullstack-starter/web/src/admin_dev/admin-patch.ts +22 -0
  51. package/templates/lupine-template-fullstack-starter/web/src/admin_dev/index.html +22 -0
  52. package/templates/lupine-template-fullstack-starter/web/src/admin_dev/index.tsx +64 -0
  53. package/templates/lupine-template-fullstack-starter/web/src/components/footer-menu.tsx +52 -0
  54. package/templates/lupine-template-fullstack-starter/web/src/components/footer.tsx +15 -0
  55. package/templates/lupine-template-fullstack-starter/web/src/components/header.tsx +75 -0
  56. package/templates/lupine-template-fullstack-starter/web/src/components/home-search-component.tsx +132 -0
  57. package/templates/lupine-template-fullstack-starter/web/src/components/login-code-zh.tsx +162 -0
  58. package/templates/lupine-template-fullstack-starter/web/src/components/login-code.tsx +165 -0
  59. package/templates/lupine-template-fullstack-starter/web/src/components/login-zh.tsx +118 -0
  60. package/templates/lupine-template-fullstack-starter/web/src/components/login.tsx +122 -0
  61. package/templates/lupine-template-fullstack-starter/web/src/components/not-found-page.tsx +12 -0
  62. package/templates/lupine-template-fullstack-starter/web/src/components/register-zh.tsx +161 -0
  63. package/templates/lupine-template-fullstack-starter/web/src/components/register.tsx +163 -0
  64. package/templates/lupine-template-fullstack-starter/web/src/components/reset-password-zh.tsx +166 -0
  65. package/templates/lupine-template-fullstack-starter/web/src/components/reset-password.tsx +177 -0
  66. package/templates/lupine-template-fullstack-starter/web/src/components/story-card.tsx +96 -0
  67. package/templates/lupine-template-fullstack-starter/web/src/components/story-list.tsx +106 -0
  68. package/templates/lupine-template-fullstack-starter/web/src/components/story-props.ts +34 -0
  69. package/templates/lupine-template-fullstack-starter/web/src/components/user-info.tsx +84 -0
  70. package/templates/lupine-template-fullstack-starter/web/src/frames/admin-page-frame.tsx +48 -0
  71. package/templates/lupine-template-fullstack-starter/web/src/frames/frame1-page-frame.tsx +61 -0
  72. package/templates/lupine-template-fullstack-starter/web/src/frames/frame2-page-frame.tsx +61 -0
  73. package/templates/lupine-template-fullstack-starter/web/src/frames/top-frame.tsx +23 -0
  74. package/templates/lupine-template-fullstack-starter/web/src/frames/user-page-frame.tsx +90 -0
  75. package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/web/src/index.html +6 -0
  76. package/templates/lupine-template-fullstack-starter/web/src/index.tsx +155 -0
  77. package/templates/lupine-template-fullstack-starter/web/src/models/client-env-keys.ts +5 -0
  78. package/templates/lupine-template-fullstack-starter/web/src/models/index.ts +15 -0
  79. package/templates/lupine-template-fullstack-starter/web/src/pages/admin-cfg.tsx +140 -0
  80. package/templates/lupine-template-fullstack-starter/web/src/pages/admin-item-edit.tsx +21 -0
  81. package/templates/lupine-template-fullstack-starter/web/src/pages/admin-item-list.tsx +24 -0
  82. package/templates/lupine-template-fullstack-starter/web/src/pages/admin-user.tsx +150 -0
  83. package/templates/lupine-template-fullstack-starter/web/src/pages/contact.tsx +105 -0
  84. package/templates/lupine-template-fullstack-starter/web/src/pages/page1-page.tsx +38 -0
  85. package/templates/lupine-template-fullstack-starter/web/src/pages/page2-page.tsx +38 -0
  86. package/templates/lupine-template-fullstack-starter/web/src/pages/user-favorite-page.tsx +58 -0
  87. package/templates/lupine-template-fullstack-starter/web/src/pages/user-home-page.tsx +27 -0
  88. package/templates/lupine-template-fullstack-starter/web/src/pages/user-mine-page.tsx +54 -0
  89. package/templates/lupine-template-fullstack-starter/web/src/pages/user-profile-page-zh.tsx +112 -0
  90. package/templates/lupine-template-fullstack-starter/web/src/pages/user-profile-page.tsx +112 -0
  91. package/templates/lupine-template-fullstack-starter/web/src/pages/user1-page.tsx +57 -0
  92. package/templates/lupine-template-fullstack-starter/web/src/services/fetch-data.ts +55 -0
  93. package/templates/lupine-template-fullstack-starter/web/src/services/shared-data.ts +19 -0
  94. package/templates/lupine-template-fullstack-starter/web/src/styles/base-css.ts +17 -0
  95. package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/web/src/styles/global.css +10 -57
  96. package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/web/src/styles/theme.ts +3 -1
  97. package/templates/lupine-template-responsive-starter/README.md +7 -0
  98. package/templates/lupine-template-responsive-starter/web/src/components/input-history-component.tsx +1 -1
  99. package/templates/lupine-template-responsive-starter/web/src/components/mine-about-page.tsx +2 -1
  100. package/templates/lupine-template-responsive-starter/web/src/components/mine-premium-page.tsx +2 -1
  101. package/templates/lupine-template-responsive-starter/web/src/components/mine-settings-page.tsx +8 -17
  102. package/templates/lupine-template-responsive-starter/web/src/components/mobile-top-search-menu.tsx +15 -27
  103. package/templates/lupine-template-responsive-starter/web/src/components/note-detail.tsx +2 -8
  104. package/templates/lupine-template-responsive-starter/web/src/components/note-edit.tsx +26 -36
  105. package/templates/lupine-template-responsive-starter/web/src/components/note-search-page.tsx +16 -21
  106. package/templates/lupine-template-responsive-starter/web/src/components/search-input.tsx +9 -9
  107. package/templates/lupine-template-responsive-starter/web/src/components/side-menu-content.tsx +3 -16
  108. package/templates/lupine-template-responsive-starter/web/src/frames/app-responsive-frame.tsx +3 -2
  109. package/templates/lupine-template-responsive-starter/web/src/index.tsx +2 -11
  110. package/templates/lupine-template-responsive-starter/web/src/lupine-template-responsive-starter/index.tsx +1 -10
  111. package/templates/lupine-template-responsive-starter/web/src/pages/about-page.tsx +3 -14
  112. package/templates/lupine-template-responsive-starter/web/src/pages/finance-page.tsx +3 -14
  113. package/templates/lupine-template-responsive-starter/web/src/pages/home-page.tsx +7 -15
  114. package/templates/lupine-template-responsive-starter/web/src/pages/mine-page.tsx +7 -14
  115. package/templates/lupine-template-responsive-starter/web/src/pages/tools-page.tsx +3 -14
  116. package/templates/lupine-template-responsive-starter/web/src/styles/theme.ts +2 -1
  117. package/templates/common/AI_CONTEXT.md +0 -1002
  118. package/templates/lupine-template-hello-world/api/package.json +0 -6
  119. package/templates/lupine-template-hello-world/api/resources/install.sqlite.sql +0 -4
  120. package/templates/lupine-template-hello-world/api/src/service/root-api.ts +0 -18
  121. package/templates/lupine-template-hello-world/web/src/index.tsx +0 -73
  122. package/templates/lupine-template-hello-world/web/src/styles/base-css.ts +0 -1
  123. /package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/api/resources/config_default.json +0 -0
  124. /package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/api/src/index.ts +0 -0
  125. /package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/web/assets/favicon.ico +0 -0
  126. /package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/web/src/styles/app.css +0 -0
@@ -1,6 +0,0 @@
1
- {
2
- "name": "hello-world-api",
3
- "version": "1.0.0",
4
- "dependencies": {},
5
- "devDependencies": {}
6
- }
@@ -1,4 +0,0 @@
1
- #-- sql queries to create tables
2
- #-- Never name a table with plural (such as "users")
3
- #-- Never name a table using a reserved keyword (such as "user")
4
- #-- Never prefix your table name with "tbl" or some other object type prefix
@@ -1,18 +0,0 @@
1
- import { IApiBase, StaticServer, ApiRouter } from 'lupine.api';
2
-
3
- export class RootApi implements IApiBase {
4
- protected router = new ApiRouter();
5
-
6
- constructor() {
7
- this.mountDashboard();
8
- }
9
-
10
- public getRouter(): ApiRouter {
11
- return this.router;
12
- }
13
-
14
- protected mountDashboard() {
15
- const staticServer = new StaticServer();
16
- this.router.use('*', staticServer.processRequest.bind(staticServer));
17
- }
18
- }
@@ -1,73 +0,0 @@
1
- // css order is important
2
- import './styles/global.css';
3
- import './styles/app.css';
4
-
5
- import { bindRouter, CssProps, isFrontEnd, PageRouter, webEnv, debugWatch, useState } from 'lupine.components';
6
-
7
- // ── useState demo component ─────────────────────────────────────
8
- const Counter = () => {
9
- const [count, setCount] = useState(0);
10
- const [name, setName] = useState('World');
11
- const [show, setShow] = useState(true);
12
-
13
- const css: CssProps = {
14
- display: 'inline-block',
15
- padding: '24px',
16
- border: '2px solid #4f8ef7',
17
- borderRadius: '12px',
18
- margin: '20px',
19
- minWidth: '280px',
20
- fontFamily: 'monospace',
21
- };
22
-
23
- return (
24
- <div css={css}>
25
- {/* number state */}
26
- <p>
27
- count = <strong>{count}</strong>
28
- </p>
29
- <button onClick={() => setCount(count - 1)}>−</button> <button onClick={() => setCount(count + 1)}>+</button>{' '}
30
- {/* functional update test */}
31
- <button onClick={() => setCount((n) => n * 2)}>×2</button>
32
- {/* string state */}
33
- <p style={{ marginTop: '12px' }}>
34
- Hello, <strong>{name}</strong>!
35
- </p>
36
- <button onClick={() => setName(name === 'World' ? 'Lupine' : 'World')}>Toggle name</button>
37
- {/* boolean state + multiple setState calls should batch into one rerender */}
38
- <p style={{ marginTop: '12px' }}>
39
- <button
40
- onClick={() => {
41
- // 3 consecutive setState calls — should batch into 1 rerender
42
- setCount(count + 10);
43
- setName('Batch!');
44
- setShow(!show);
45
- }}
46
- >
47
- Batch
48
- </button>
49
- </p>
50
- {show && <p>✅ true</p>}
51
- {!show && <p>❌ false</p>}
52
- </div>
53
- );
54
- };
55
-
56
- const HelloPage = () => (
57
- <div css={{ textAlign: 'center', padding: '20px' }}>
58
- <h1>Demo</h1>
59
- <Counter />
60
- <Counter /> {/* two independent instances — state is isolated */}
61
- </div>
62
- );
63
- // ────────────────────────────────────────────────────────────────
64
-
65
- // #if DEV==='1'
66
- if (isFrontEnd() && webEnv('NODE_ENV', '') === 'development') {
67
- debugWatch(webEnv('API_PORT', 0));
68
- }
69
- // #endif
70
-
71
- const pageRouter = new PageRouter();
72
- pageRouter.use('/', HelloPage);
73
- bindRouter(pageRouter);
@@ -1 +0,0 @@
1
- export const baseCss = {};