create-lupine 1.0.30 → 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.
- package/README.md +25 -0
- package/index.js +35 -13
- package/package.json +1 -1
- package/templates/common/.agents/skills/lupine-framework/SKILL.md +63 -0
- package/templates/common/.agents/skills/lupine-framework/references/backend-api.md +98 -0
- package/templates/common/.agents/skills/lupine-framework/references/icon-handling.md +71 -0
- package/templates/common/.agents/skills/lupine-framework/references/mobile-interactions.md +100 -0
- package/templates/common/.agents/skills/lupine-framework/references/native-apps.md +167 -0
- package/templates/common/.agents/skills/lupine-framework/references/navigation-and-routing.md +54 -0
- package/templates/common/.agents/skills/lupine-framework/references/reactivity-and-state.md +108 -0
- package/templates/common/.agents/skills/lupine-framework/references/styling-and-themes.md +119 -0
- package/templates/common/_env +12 -2
- package/templates/common/apps/server/src/index.ts +2 -1
- package/templates/lupine-template-cv-starter/README.md +5 -0
- package/templates/lupine-template-cv-starter/web/src/index.tsx +1 -10
- package/templates/lupine-template-cv-starter/web/src/lupine-template-cv-starter/index.tsx +1 -10
- package/templates/lupine-template-doc-starter/README.md +5 -0
- package/templates/lupine-template-doc-starter/web/src/index.tsx +1 -10
- package/templates/lupine-template-doc-starter/web/src/lupine-template-doc-starter/index.tsx +1 -10
- package/templates/lupine-template-fullstack-starter/README.md +21 -0
- package/templates/lupine-template-fullstack-starter/api/package.json +10 -0
- package/templates/lupine-template-fullstack-starter/api/resources/install.mysql.sql +107 -0
- package/templates/lupine-template-fullstack-starter/api/resources/install.sqlite.sql +75 -0
- package/templates/lupine-template-fullstack-starter/api/src/lang/api-lang-en.ts +39 -0
- package/templates/lupine-template-fullstack-starter/api/src/lang/api-lang-zh-cn.ts +37 -0
- package/templates/lupine-template-fullstack-starter/api/src/service/admin-api.ts +139 -0
- package/templates/lupine-template-fullstack-starter/api/src/service/api.ts +111 -0
- package/templates/lupine-template-fullstack-starter/api/src/service/contact-api.ts +50 -0
- package/templates/lupine-template-fullstack-starter/api/src/service/file-api-base.ts +30 -0
- package/templates/lupine-template-fullstack-starter/api/src/service/root-api.ts +28 -0
- package/templates/lupine-template-fullstack-starter/api/src/service/send-email.ts +47 -0
- package/templates/lupine-template-fullstack-starter/api/src/service/setting-api.ts +60 -0
- package/templates/lupine-template-fullstack-starter/api/src/service/user-api.ts +1041 -0
- package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/lupine.json +10 -1
- package/templates/lupine-template-fullstack-starter/web/assets/android-chrome-192x192.png +0 -0
- package/templates/lupine-template-fullstack-starter/web/assets/apple-touch-icon.png +0 -0
- package/templates/lupine-template-fullstack-starter/web/assets/favicon-16x16.png +0 -0
- package/templates/lupine-template-fullstack-starter/web/assets/favicon-32x32.png +0 -0
- package/templates/lupine-template-fullstack-starter/web/assets/icons-font/License-carbon-icons.txt +71 -0
- package/templates/lupine-template-fullstack-starter/web/assets/icons-font/License-material-design.txt +20 -0
- package/templates/lupine-template-fullstack-starter/web/assets/icons-font/i-font.woff2 +0 -0
- package/templates/lupine-template-fullstack-starter/web/assets/icons-font/sample.html +124 -0
- package/templates/lupine-template-fullstack-starter/web/assets/icons-font/style.css +103 -0
- package/templates/lupine-template-fullstack-starter/web/assets/images/sample.png +0 -0
- package/templates/lupine-template-fullstack-starter/web/assets/lupine-flower.png +0 -0
- package/templates/lupine-template-fullstack-starter/web/assets/lupine.svg +71 -0
- package/templates/lupine-template-fullstack-starter/web/assets/site.webmanifest +14 -0
- package/templates/lupine-template-fullstack-starter/web/icons-font.config.js +129 -0
- package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/web/package.json +1 -1
- package/templates/lupine-template-fullstack-starter/web/src/admin_dev/admin-about.tsx +16 -0
- package/templates/lupine-template-fullstack-starter/web/src/admin_dev/admin-patch.ts +22 -0
- package/templates/lupine-template-fullstack-starter/web/src/admin_dev/index.html +22 -0
- package/templates/lupine-template-fullstack-starter/web/src/admin_dev/index.tsx +64 -0
- package/templates/lupine-template-fullstack-starter/web/src/components/footer-menu.tsx +52 -0
- package/templates/lupine-template-fullstack-starter/web/src/components/footer.tsx +15 -0
- package/templates/lupine-template-fullstack-starter/web/src/components/header.tsx +75 -0
- package/templates/lupine-template-fullstack-starter/web/src/components/home-search-component.tsx +132 -0
- package/templates/lupine-template-fullstack-starter/web/src/components/login-code-zh.tsx +162 -0
- package/templates/lupine-template-fullstack-starter/web/src/components/login-code.tsx +165 -0
- package/templates/lupine-template-fullstack-starter/web/src/components/login-zh.tsx +118 -0
- package/templates/lupine-template-fullstack-starter/web/src/components/login.tsx +122 -0
- package/templates/lupine-template-fullstack-starter/web/src/components/not-found-page.tsx +12 -0
- package/templates/lupine-template-fullstack-starter/web/src/components/register-zh.tsx +161 -0
- package/templates/lupine-template-fullstack-starter/web/src/components/register.tsx +163 -0
- package/templates/lupine-template-fullstack-starter/web/src/components/reset-password-zh.tsx +166 -0
- package/templates/lupine-template-fullstack-starter/web/src/components/reset-password.tsx +177 -0
- package/templates/lupine-template-fullstack-starter/web/src/components/story-card.tsx +96 -0
- package/templates/lupine-template-fullstack-starter/web/src/components/story-list.tsx +106 -0
- package/templates/lupine-template-fullstack-starter/web/src/components/story-props.ts +34 -0
- package/templates/lupine-template-fullstack-starter/web/src/components/user-info.tsx +84 -0
- package/templates/lupine-template-fullstack-starter/web/src/frames/admin-page-frame.tsx +48 -0
- package/templates/lupine-template-fullstack-starter/web/src/frames/frame1-page-frame.tsx +61 -0
- package/templates/lupine-template-fullstack-starter/web/src/frames/frame2-page-frame.tsx +61 -0
- package/templates/lupine-template-fullstack-starter/web/src/frames/top-frame.tsx +23 -0
- package/templates/lupine-template-fullstack-starter/web/src/frames/user-page-frame.tsx +90 -0
- package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/web/src/index.html +6 -0
- package/templates/lupine-template-fullstack-starter/web/src/index.tsx +155 -0
- package/templates/lupine-template-fullstack-starter/web/src/models/client-env-keys.ts +5 -0
- package/templates/lupine-template-fullstack-starter/web/src/models/index.ts +15 -0
- package/templates/lupine-template-fullstack-starter/web/src/pages/admin-cfg.tsx +140 -0
- package/templates/lupine-template-fullstack-starter/web/src/pages/admin-item-edit.tsx +21 -0
- package/templates/lupine-template-fullstack-starter/web/src/pages/admin-item-list.tsx +24 -0
- package/templates/lupine-template-fullstack-starter/web/src/pages/admin-user.tsx +150 -0
- package/templates/lupine-template-fullstack-starter/web/src/pages/contact.tsx +105 -0
- package/templates/lupine-template-fullstack-starter/web/src/pages/page1-page.tsx +38 -0
- package/templates/lupine-template-fullstack-starter/web/src/pages/page2-page.tsx +38 -0
- package/templates/lupine-template-fullstack-starter/web/src/pages/user-favorite-page.tsx +58 -0
- package/templates/lupine-template-fullstack-starter/web/src/pages/user-home-page.tsx +27 -0
- package/templates/lupine-template-fullstack-starter/web/src/pages/user-mine-page.tsx +54 -0
- package/templates/lupine-template-fullstack-starter/web/src/pages/user-profile-page-zh.tsx +112 -0
- package/templates/lupine-template-fullstack-starter/web/src/pages/user-profile-page.tsx +112 -0
- package/templates/lupine-template-fullstack-starter/web/src/pages/user1-page.tsx +57 -0
- package/templates/lupine-template-fullstack-starter/web/src/services/fetch-data.ts +55 -0
- package/templates/lupine-template-fullstack-starter/web/src/services/shared-data.ts +19 -0
- package/templates/lupine-template-fullstack-starter/web/src/styles/base-css.ts +17 -0
- package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/web/src/styles/global.css +10 -57
- package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/web/src/styles/theme.ts +3 -1
- package/templates/lupine-template-responsive-starter/README.md +7 -0
- package/templates/lupine-template-responsive-starter/web/src/components/input-history-component.tsx +1 -1
- package/templates/lupine-template-responsive-starter/web/src/components/mine-about-page.tsx +2 -1
- package/templates/lupine-template-responsive-starter/web/src/components/mine-premium-page.tsx +2 -1
- package/templates/lupine-template-responsive-starter/web/src/components/mine-settings-page.tsx +8 -17
- package/templates/lupine-template-responsive-starter/web/src/components/mobile-top-search-menu.tsx +15 -27
- package/templates/lupine-template-responsive-starter/web/src/components/note-detail.tsx +2 -8
- package/templates/lupine-template-responsive-starter/web/src/components/note-edit.tsx +26 -36
- package/templates/lupine-template-responsive-starter/web/src/components/note-search-page.tsx +16 -21
- package/templates/lupine-template-responsive-starter/web/src/components/search-input.tsx +9 -9
- package/templates/lupine-template-responsive-starter/web/src/components/side-menu-content.tsx +3 -16
- package/templates/lupine-template-responsive-starter/web/src/frames/app-responsive-frame.tsx +3 -2
- package/templates/lupine-template-responsive-starter/web/src/index.tsx +2 -11
- package/templates/lupine-template-responsive-starter/web/src/lupine-template-responsive-starter/index.tsx +1 -10
- package/templates/lupine-template-responsive-starter/web/src/pages/about-page.tsx +3 -14
- package/templates/lupine-template-responsive-starter/web/src/pages/finance-page.tsx +3 -14
- package/templates/lupine-template-responsive-starter/web/src/pages/home-page.tsx +7 -15
- package/templates/lupine-template-responsive-starter/web/src/pages/mine-page.tsx +7 -14
- package/templates/lupine-template-responsive-starter/web/src/pages/tools-page.tsx +3 -14
- package/templates/lupine-template-responsive-starter/web/src/styles/theme.ts +2 -1
- package/templates/common/AI_CONTEXT.md +0 -1002
- package/templates/lupine-template-hello-world/api/package.json +0 -6
- package/templates/lupine-template-hello-world/api/resources/install.sqlite.sql +0 -4
- package/templates/lupine-template-hello-world/api/src/service/root-api.ts +0 -18
- package/templates/lupine-template-hello-world/web/src/index.tsx +0 -73
- package/templates/lupine-template-hello-world/web/src/styles/base-css.ts +0 -1
- /package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/api/resources/config_default.json +0 -0
- /package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/api/src/index.ts +0 -0
- /package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/web/assets/favicon.ico +0 -0
- /package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/web/src/styles/app.css +0 -0
|
@@ -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 = {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|