create-lupine 1.0.28 → 1.0.30

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 (113) hide show
  1. package/index.js +410 -411
  2. package/package.json +17 -17
  3. package/templates/common/.env.development +7 -7
  4. package/templates/common/.env.mobile +9 -9
  5. package/templates/common/.env.production +7 -7
  6. package/templates/common/_env +58 -58
  7. package/templates/common/_gitignore +25 -25
  8. package/templates/common/apps/server/src/index.ts +78 -76
  9. package/templates/common/apps/server/src/server-env-keys.ts +0 -9
  10. package/templates/common/dev/cp-folder.js +45 -45
  11. package/templates/common/tsconfig.json +128 -128
  12. package/templates/lupine-template-cv-starter/api/package.json +5 -5
  13. package/templates/lupine-template-cv-starter/api/resources/config_default.json +6 -6
  14. package/templates/lupine-template-cv-starter/api/resources/install.sqlite.sql +3 -3
  15. package/templates/lupine-template-cv-starter/api/src/index.ts +15 -15
  16. package/templates/lupine-template-cv-starter/lupine.json +40 -38
  17. package/templates/lupine-template-cv-starter/web/markdown/en/01-experience/index.md +32 -32
  18. package/templates/lupine-template-cv-starter/web/markdown/en/02-projects/index.md +36 -36
  19. package/templates/lupine-template-cv-starter/web/markdown/en/03-skills/index.md +28 -28
  20. package/templates/lupine-template-cv-starter/web/markdown/en/04-education/index.md +16 -16
  21. package/templates/lupine-template-cv-starter/web/markdown/en/index.md +41 -41
  22. package/templates/lupine-template-cv-starter/web/markdown/index.md +7 -7
  23. package/templates/lupine-template-cv-starter/web/markdown/zh/01-experience/index.md +32 -32
  24. package/templates/lupine-template-cv-starter/web/markdown/zh/02-projects/index.md +36 -36
  25. package/templates/lupine-template-cv-starter/web/markdown/zh/03-skills/index.md +28 -28
  26. package/templates/lupine-template-cv-starter/web/markdown/zh/04-education/index.md +17 -17
  27. package/templates/lupine-template-cv-starter/web/markdown/zh/index.md +41 -41
  28. package/templates/lupine-template-cv-starter/web/package.json +5 -5
  29. package/templates/lupine-template-cv-starter/web/src/client-env-keys.ts +5 -5
  30. package/templates/lupine-template-cv-starter/web/src/index.html +16 -16
  31. package/templates/lupine-template-cv-starter/web/src/index.tsx +28 -28
  32. package/templates/lupine-template-cv-starter/web/src/lupine-template-cv-starter/404.html +38 -38
  33. package/templates/lupine-template-cv-starter/web/src/lupine-template-cv-starter/index.html +73 -73
  34. package/templates/lupine-template-cv-starter/web/src/lupine-template-cv-starter/index.tsx +30 -30
  35. package/templates/lupine-template-cv-starter/web/src/markdown-built/en/01-experience/index.html +20 -20
  36. package/templates/lupine-template-cv-starter/web/src/markdown-built/en/02-projects/index.html +28 -28
  37. package/templates/lupine-template-cv-starter/web/src/markdown-built/en/03-skills/index.html +18 -18
  38. package/templates/lupine-template-cv-starter/web/src/markdown-built/en/04-education/index.html +10 -10
  39. package/templates/lupine-template-cv-starter/web/src/markdown-built/en/index.html +20 -20
  40. package/templates/lupine-template-cv-starter/web/src/markdown-built/zh/01-experience/index.html +20 -20
  41. package/templates/lupine-template-cv-starter/web/src/markdown-built/zh/02-projects/index.html +28 -28
  42. package/templates/lupine-template-cv-starter/web/src/markdown-built/zh/03-skills/index.html +18 -18
  43. package/templates/lupine-template-cv-starter/web/src/markdown-built/zh/04-education/index.html +11 -11
  44. package/templates/lupine-template-cv-starter/web/src/markdown-built/zh/index.html +20 -20
  45. package/templates/lupine-template-cv-starter/web/src/styles/base-css.ts +15 -15
  46. package/templates/lupine-template-doc-starter/api/package.json +5 -5
  47. package/templates/lupine-template-doc-starter/api/resources/config_default.json +6 -6
  48. package/templates/lupine-template-doc-starter/api/resources/install.sqlite.sql +3 -3
  49. package/templates/lupine-template-doc-starter/api/src/index.ts +15 -15
  50. package/templates/lupine-template-doc-starter/api/src/resources/config_default.json +6 -6
  51. package/templates/lupine-template-doc-starter/api/src/resources/install.sqlite.sql +3 -3
  52. package/templates/lupine-template-doc-starter/lupine.json +40 -38
  53. package/templates/lupine-template-doc-starter/web/markdown/en/essentials/index.md +6 -6
  54. package/templates/lupine-template-doc-starter/web/markdown/en/essentials/list.md +18 -18
  55. package/templates/lupine-template-doc-starter/web/markdown/en/guide/install.md +18 -18
  56. package/templates/lupine-template-doc-starter/web/markdown/en/guide/started.md +22 -22
  57. package/templates/lupine-template-doc-starter/web/markdown/en/index.md +42 -42
  58. package/templates/lupine-template-doc-starter/web/markdown/index.md +7 -7
  59. package/templates/lupine-template-doc-starter/web/markdown/zh/essentials/index.md +6 -6
  60. package/templates/lupine-template-doc-starter/web/markdown/zh/essentials/list.md +18 -18
  61. package/templates/lupine-template-doc-starter/web/markdown/zh/guide/install.md +18 -18
  62. package/templates/lupine-template-doc-starter/web/markdown/zh/guide/started.md +22 -22
  63. package/templates/lupine-template-doc-starter/web/markdown/zh/index.md +42 -42
  64. package/templates/lupine-template-doc-starter/web/package.json +5 -5
  65. package/templates/lupine-template-doc-starter/web/src/client-env-keys.ts +5 -5
  66. package/templates/lupine-template-doc-starter/web/src/index.html +16 -16
  67. package/templates/lupine-template-doc-starter/web/src/index.tsx +28 -28
  68. package/templates/lupine-template-doc-starter/web/src/lupine-template-doc-starter/404.html +38 -38
  69. package/templates/lupine-template-doc-starter/web/src/lupine-template-doc-starter/index.html +27 -27
  70. package/templates/lupine-template-doc-starter/web/src/lupine-template-doc-starter/index.tsx +30 -30
  71. package/templates/lupine-template-doc-starter/web/src/markdown-built/en/essentials/list.html +8 -8
  72. package/templates/lupine-template-doc-starter/web/src/markdown-built/en/guide/install.html +8 -8
  73. package/templates/lupine-template-doc-starter/web/src/markdown-built/en/guide/started.html +12 -12
  74. package/templates/lupine-template-doc-starter/web/src/markdown-built/zh/essentials/list.html +8 -8
  75. package/templates/lupine-template-doc-starter/web/src/markdown-built/zh/guide/install.html +8 -8
  76. package/templates/lupine-template-doc-starter/web/src/markdown-built/zh/guide/started.html +12 -12
  77. package/templates/lupine-template-doc-starter/web/src/styles/base-css.ts +15 -15
  78. package/templates/lupine-template-hello-world/api/resources/install.sqlite.sql +3 -3
  79. package/templates/lupine-template-hello-world/api/src/index.ts +4 -4
  80. package/templates/lupine-template-hello-world/api/src/service/root-api.ts +18 -18
  81. package/templates/lupine-template-hello-world/lupine.json +23 -23
  82. package/templates/lupine-template-hello-world/web/package.json +6 -6
  83. package/templates/lupine-template-hello-world/web/src/index.html +16 -16
  84. package/templates/lupine-template-hello-world/web/src/index.tsx +73 -73
  85. package/templates/lupine-template-responsive-starter/api/resources/install.sqlite.sql +3 -3
  86. package/templates/lupine-template-responsive-starter/api/src/index.ts +4 -4
  87. package/templates/lupine-template-responsive-starter/api/src/service/root-api.ts +18 -18
  88. package/templates/lupine-template-responsive-starter/lupine.json +7 -7
  89. package/templates/lupine-template-responsive-starter/web/src/app-icons.ts +76 -76
  90. package/templates/lupine-template-responsive-starter/web/src/components/input-history-component.tsx +93 -93
  91. package/templates/lupine-template-responsive-starter/web/src/components/mine-about-page.tsx +86 -86
  92. package/templates/lupine-template-responsive-starter/web/src/components/mine-premium-page.tsx +80 -80
  93. package/templates/lupine-template-responsive-starter/web/src/components/mine-settings-page.tsx +220 -219
  94. package/templates/lupine-template-responsive-starter/web/src/components/mobile-top-search-menu.tsx +119 -119
  95. package/templates/lupine-template-responsive-starter/web/src/components/note-detail.tsx +116 -116
  96. package/templates/lupine-template-responsive-starter/web/src/components/note-edit.tsx +154 -154
  97. package/templates/lupine-template-responsive-starter/web/src/components/note-search-page.tsx +193 -193
  98. package/templates/lupine-template-responsive-starter/web/src/components/search-input.tsx +95 -95
  99. package/templates/lupine-template-responsive-starter/web/src/components/side-menu-content.tsx +182 -182
  100. package/templates/lupine-template-responsive-starter/web/src/frames/app-responsive-frame.tsx +52 -52
  101. package/templates/lupine-template-responsive-starter/web/src/index.html +16 -16
  102. package/templates/lupine-template-responsive-starter/web/src/index.tsx +39 -39
  103. package/templates/lupine-template-responsive-starter/web/src/lupine-template-responsive-starter/404.html +35 -35
  104. package/templates/lupine-template-responsive-starter/web/src/lupine-template-responsive-starter/index.html +49 -49
  105. package/templates/lupine-template-responsive-starter/web/src/lupine-template-responsive-starter/index.tsx +32 -32
  106. package/templates/lupine-template-responsive-starter/web/src/pages/about-page.tsx +43 -43
  107. package/templates/lupine-template-responsive-starter/web/src/pages/finance-page.tsx +46 -46
  108. package/templates/lupine-template-responsive-starter/web/src/pages/home-page.tsx +452 -452
  109. package/templates/lupine-template-responsive-starter/web/src/pages/mine-page.tsx +325 -325
  110. package/templates/lupine-template-responsive-starter/web/src/pages/tools-page.tsx +46 -46
  111. package/templates/lupine-template-responsive-starter/web/src/services/local-notes-service.ts +87 -87
  112. package/templates/lupine-template-responsive-starter/web/src/services/mine-service.ts +45 -45
  113. package/templates/common/dev/dev-watch.js +0 -389
@@ -1,154 +1,154 @@
1
- import {
2
- CssProps,
3
- NotificationColor,
4
- NotificationMessage,
5
- RefProps,
6
- SliderFrameHookProps,
7
- HeaderWithBackFrame,
8
- ActionSheetColorPicker,
9
- } from 'lupine.components';
10
- // HEditor relies on complex setup in original app, fallback to simple textarea for robustness here
11
- import { LocalNoteProps, LocalNotesService } from '../services/local-notes-service';
12
-
13
- export const NoteEditComponent = (props: {
14
- note?: LocalNoteProps;
15
- sliderFrameHook: SliderFrameHookProps;
16
- onSaved: () => void;
17
- }) => {
18
- const isEdit = !!props.note;
19
- const noteId = props.note ? props.note.id : -1;
20
- const defaultTitle = props.note ? props.note.title : '';
21
- const defaultContent = props.note ? props.note.content : '';
22
-
23
- const ref: RefProps = {
24
- onLoad: async () => {
25
- // Auto-focus title if new note
26
- if (!isEdit) {
27
- const tInput = ref.$('.note-edit-title-input') as HTMLInputElement;
28
- tInput?.focus();
29
- }
30
- },
31
- };
32
-
33
- let selectedColor = props.note?.color || '';
34
-
35
- const pickColor = async () => {
36
- const res = await ActionSheetColorPicker({
37
- value: selectedColor,
38
- title: 'Select Color Tag',
39
- });
40
- if (res !== undefined) {
41
- selectedColor = res;
42
- const ind = ref.$('.note-color-preview') as HTMLDivElement;
43
- if (ind) ind.style.backgroundColor = res || 'transparent';
44
- }
45
- };
46
-
47
- const onSave = () => {
48
- const title = (ref.$('.note-edit-title-input') as HTMLInputElement).value.trim();
49
- const content = (ref.$('.note-edit-body-input') as HTMLTextAreaElement).value.trim();
50
-
51
- if (!title) {
52
- NotificationMessage.sendMessage('Please enter a note title', NotificationColor.Error);
53
- return;
54
- }
55
-
56
- LocalNotesService.saveNote({
57
- id: noteId,
58
- title,
59
- content,
60
- color: selectedColor,
61
- updatedAt: Date.now(),
62
- });
63
-
64
- NotificationMessage.sendMessage(isEdit ? 'Modified and saved' : 'Note added', NotificationColor.Success);
65
- props.onSaved();
66
- props.sliderFrameHook.close!(new MouseEvent('click'));
67
- };
68
-
69
- const css: CssProps = {
70
- display: 'flex',
71
- flexDirection: 'column',
72
- height: '100%',
73
- backgroundColor: 'var(--primary-bg-color)',
74
- padding: '16px',
75
-
76
- '.note-edit-title-input': {
77
- width: '100%',
78
- fontSize: '20px',
79
- fontWeight: 'bold',
80
- padding: '8px',
81
- backgroundColor: 'transparent',
82
- color: 'var(--primary-color)',
83
- outline: 'none',
84
- marginBottom: '16px',
85
- '&:focus': {
86
- borderBottomColor: 'var(--primary-accent-color)',
87
- },
88
- },
89
- '.note-edit-body-input': {
90
- flex: 1,
91
- padding: '12px',
92
- backgroundColor: 'transparent',
93
- color: 'var(--primary-color)',
94
- fontSize: '16px',
95
- resize: 'none',
96
- outline: 'none',
97
- lineHeight: '1.6',
98
- },
99
- '.note-edit-color-row': {
100
- display: 'flex',
101
- alignItems: 'center',
102
- padding: '12px',
103
- cursor: 'pointer',
104
- backgroundColor: 'var(--secondary-bg-color)',
105
- borderRadius: '8px',
106
- marginBottom: '16px',
107
- color: 'var(--primary-color)',
108
- fontWeight: 'bold',
109
- fontSize: '16px',
110
- },
111
- };
112
-
113
- return (
114
- <HeaderWithBackFrame
115
- title={isEdit ? 'Edit Note' : 'New Note'}
116
- onBack={(e: Event) => props.sliderFrameHook.close!(e)}
117
- right={
118
- <div
119
- onClick={onSave}
120
- style={{
121
- color: 'var(--primary-accent-color)',
122
- fontWeight: 'bold',
123
- fontSize: '16px',
124
- padding: '0 8px',
125
- cursor: 'pointer',
126
- }}
127
- >
128
- Save
129
- </div>
130
- }
131
- >
132
- <div ref={ref} css={css} class='note-edit-container flex-col h-100'>
133
- <input
134
- type='text'
135
- class='input-base note-edit-title-input'
136
- placeholder='Title...'
137
- value={defaultTitle}
138
- maxLength={50}
139
- />
140
- <div class='note-edit-color-row' onClick={pickColor}>
141
- <div class='flex-1'>Color Tag</div>
142
- <div
143
- class='note-color-preview color-preview-box'
144
- style={{ backgroundColor: selectedColor || 'transparent' }}
145
- ></div>
146
- <i class='ifc-icon ma-pencil-outline icon-btn-secondary' />
147
- </div>
148
- <textarea class='input-base note-edit-body-input' placeholder='Write your note...'>
149
- {defaultContent}
150
- </textarea>
151
- </div>
152
- </HeaderWithBackFrame>
153
- );
154
- };
1
+ import {
2
+ CssProps,
3
+ NotificationColor,
4
+ NotificationMessage,
5
+ RefProps,
6
+ SliderFrameHookProps,
7
+ HeaderWithBackFrame,
8
+ ActionSheetColorPicker,
9
+ } from 'lupine.components';
10
+ // HEditor relies on complex setup in original app, fallback to simple textarea for robustness here
11
+ import { LocalNoteProps, LocalNotesService } from '../services/local-notes-service';
12
+
13
+ export const NoteEditComponent = (props: {
14
+ note?: LocalNoteProps;
15
+ sliderFrameHook: SliderFrameHookProps;
16
+ onSaved: () => void;
17
+ }) => {
18
+ const isEdit = !!props.note;
19
+ const noteId = props.note ? props.note.id : -1;
20
+ const defaultTitle = props.note ? props.note.title : '';
21
+ const defaultContent = props.note ? props.note.content : '';
22
+
23
+ const ref: RefProps = {
24
+ onLoad: async () => {
25
+ // Auto-focus title if new note
26
+ if (!isEdit) {
27
+ const tInput = ref.$('.note-edit-title-input') as HTMLInputElement;
28
+ tInput?.focus();
29
+ }
30
+ },
31
+ };
32
+
33
+ let selectedColor = props.note?.color || '';
34
+
35
+ const pickColor = async () => {
36
+ const res = await ActionSheetColorPicker({
37
+ value: selectedColor,
38
+ title: 'Select Color Tag',
39
+ });
40
+ if (res !== undefined) {
41
+ selectedColor = res;
42
+ const ind = ref.$('.note-color-preview') as HTMLDivElement;
43
+ if (ind) ind.style.backgroundColor = res || 'transparent';
44
+ }
45
+ };
46
+
47
+ const onSave = () => {
48
+ const title = (ref.$('.note-edit-title-input') as HTMLInputElement).value.trim();
49
+ const content = (ref.$('.note-edit-body-input') as HTMLTextAreaElement).value.trim();
50
+
51
+ if (!title) {
52
+ NotificationMessage.sendMessage('Please enter a note title', NotificationColor.Error);
53
+ return;
54
+ }
55
+
56
+ LocalNotesService.saveNote({
57
+ id: noteId,
58
+ title,
59
+ content,
60
+ color: selectedColor,
61
+ updatedAt: Date.now(),
62
+ });
63
+
64
+ NotificationMessage.sendMessage(isEdit ? 'Modified and saved' : 'Note added', NotificationColor.Success);
65
+ props.onSaved();
66
+ props.sliderFrameHook.close!(new MouseEvent('click'));
67
+ };
68
+
69
+ const css: CssProps = {
70
+ display: 'flex',
71
+ flexDirection: 'column',
72
+ height: '100%',
73
+ backgroundColor: 'var(--primary-bg-color)',
74
+ padding: '16px',
75
+
76
+ '.note-edit-title-input': {
77
+ width: '100%',
78
+ fontSize: '20px',
79
+ fontWeight: 'bold',
80
+ padding: '8px',
81
+ backgroundColor: 'transparent',
82
+ color: 'var(--primary-color)',
83
+ outline: 'none',
84
+ marginBottom: '16px',
85
+ '&:focus': {
86
+ borderBottomColor: 'var(--primary-accent-color)',
87
+ },
88
+ },
89
+ '.note-edit-body-input': {
90
+ flex: 1,
91
+ padding: '12px',
92
+ backgroundColor: 'transparent',
93
+ color: 'var(--primary-color)',
94
+ fontSize: '16px',
95
+ resize: 'none',
96
+ outline: 'none',
97
+ lineHeight: '1.6',
98
+ },
99
+ '.note-edit-color-row': {
100
+ display: 'flex',
101
+ alignItems: 'center',
102
+ padding: '12px',
103
+ cursor: 'pointer',
104
+ backgroundColor: 'var(--secondary-bg-color)',
105
+ borderRadius: '8px',
106
+ marginBottom: '16px',
107
+ color: 'var(--primary-color)',
108
+ fontWeight: 'bold',
109
+ fontSize: '16px',
110
+ },
111
+ };
112
+
113
+ return (
114
+ <HeaderWithBackFrame
115
+ title={isEdit ? 'Edit Note' : 'New Note'}
116
+ onBack={(e: Event) => props.sliderFrameHook.close!(e)}
117
+ right={
118
+ <div
119
+ onClick={onSave}
120
+ style={{
121
+ color: 'var(--primary-accent-color)',
122
+ fontWeight: 'bold',
123
+ fontSize: '16px',
124
+ padding: '0 8px',
125
+ cursor: 'pointer',
126
+ }}
127
+ >
128
+ Save
129
+ </div>
130
+ }
131
+ >
132
+ <div ref={ref} css={css} class='note-edit-container flex-col h-100'>
133
+ <input
134
+ type='text'
135
+ class='input-base note-edit-title-input'
136
+ placeholder='Title...'
137
+ value={defaultTitle}
138
+ maxLength={50}
139
+ />
140
+ <div class='note-edit-color-row' onClick={pickColor}>
141
+ <div class='flex-1'>Color Tag</div>
142
+ <div
143
+ class='note-color-preview color-preview-box'
144
+ style={{ backgroundColor: selectedColor || 'transparent' }}
145
+ ></div>
146
+ <i class='ifc-icon ma-pencil-outline icon-btn-secondary' />
147
+ </div>
148
+ <textarea class='input-base note-edit-body-input' placeholder='Write your note...'>
149
+ {defaultContent}
150
+ </textarea>
151
+ </div>
152
+ </HeaderWithBackFrame>
153
+ );
154
+ };