poi-plugin-leveling-plan 0.0.1

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 ADDED
@@ -0,0 +1,130 @@
1
+ # poi-plugin-leveling-plan
2
+
3
+ Ship leveling plan management plugin for poi.
4
+
5
+ ## Features
6
+
7
+ - Create and manage ship leveling plans
8
+ - Track experience requirements and progress
9
+ - Support multiple maps and experience calculations
10
+ - Auto-complete plans when ships reach target level
11
+ - Personal stats tracking for map experience
12
+ - Fuzzy search for ship selection
13
+ - Multi-language support (EN, JA, ZH-CN, ZH-TW)
14
+
15
+ ## Installation
16
+
17
+ ### Method 1: npm Package (Recommended)
18
+
19
+ ```bash
20
+ # Download the .tgz file, then install it in poi directory
21
+ cd /path/to/poi
22
+ npm install /path/to/poi-plugin-leveling-plan-x.x.x.tgz
23
+ ```
24
+
25
+ ### Method 2: Manual Installation (ZIP)
26
+
27
+ 1. Download and extract the `.zip` file
28
+ 2. Copy the contents of `dist/` directory to poi plugins directory:
29
+
30
+ ```bash
31
+ # macOS / Linux
32
+ cp -r dist/* /path/to/poi/node_modules/poi-plugin-leveling-plan/
33
+
34
+ # Windows
35
+ xcopy dist\* \path\to\poi\node_modules\poi-plugin-leveling-plan\ /E /I
36
+ ```
37
+
38
+ 3. Restart poi
39
+
40
+ ### Method 3: Development (Source)
41
+
42
+ ```bash
43
+ # Clone or copy this repository to poi plugins directory
44
+ cp -r poi-plugin-leveling-plan /path/to/poi/node_modules/
45
+
46
+ # Install dependencies
47
+ cd /path/to/poi/node_modules/poi-plugin-leveling-plan
48
+ npm install
49
+ ```
50
+
51
+ ## Development
52
+
53
+ ### Prerequisites
54
+
55
+ - Node.js >= 14
56
+ - npm >= 6
57
+ - poi development environment
58
+
59
+ ### Setup
60
+
61
+ ```bash
62
+ # Install dependencies
63
+ npm install
64
+
65
+ # Build the plugin
66
+ npm run build
67
+
68
+ # Or build everything (transpile + dist + packages)
69
+ npm run build:all
70
+ ```
71
+
72
+ ### Build Scripts
73
+
74
+ - `npm run build` - Full build (transpile + dist)
75
+ - `npm run build:transpile` - Transpile .es files to .js
76
+ - `npm run build:dist` - Create dist/ directory
77
+ - `npm run build:npm` - Create .tgz package
78
+ - `npm run build:zip` - Create .zip package
79
+ - `npm run build:all` - Build everything
80
+ - `npm run clean` - Remove build artifacts
81
+
82
+ ### Project Structure
83
+
84
+ ```
85
+ poi-plugin-leveling-plan/
86
+ ├── index.es # Plugin entry point
87
+ ├── views/ # React components
88
+ │ ├── leveling-plan-area.es
89
+ │ └── components/
90
+ ├── utils/ # Utility functions
91
+ ├── services/ # Business logic
92
+ ├── i18n/ # Translations
93
+ ├── assets/ # Static assets
94
+ └── scripts/ # Build scripts
95
+ ```
96
+
97
+ ## Building for Distribution
98
+
99
+ To create distribution packages:
100
+
101
+ ```bash
102
+ # Install build dependencies
103
+ npm install
104
+
105
+ # Create both .tgz and .zip packages
106
+ npm run build:all
107
+ ```
108
+
109
+ This will generate:
110
+ - `poi-plugin-leveling-plan-x.x.x.tgz` - npm package
111
+ - `poi-plugin-leveling-plan-x.x.x.zip` - Manual installation package
112
+ - `dist/` - Transpiled files ready for use
113
+
114
+ ## Dependencies
115
+
116
+ This plugin uses the following dependencies provided by poi:
117
+ - `@blueprintjs/core` - UI components
118
+ - `react` / `react-dom` - UI framework
119
+ - `redux` / `react-redux` - State management
120
+ - `redux-observers` - Redux observers
121
+ - `styled-components` - CSS-in-JS
122
+ - `classnames` - Class name utilities
123
+ - `fuse.js` - Fuzzy search
124
+ - `react-fontawesome` - Icons
125
+
126
+ These dependencies are marked as `peerDependencies` and will not be bundled with the plugin.
127
+
128
+ ## License
129
+
130
+ MIT
@@ -0,0 +1,271 @@
1
+ #leveling-plan {
2
+ height: 100%;
3
+ width: 100%;
4
+ }
5
+
6
+ #leveling-plan .flex-column {
7
+ display: flex;
8
+ flex-direction: column;
9
+ height: 100%;
10
+ }
11
+
12
+ #leveling-plan .main-nav {
13
+ margin: 0;
14
+ }
15
+
16
+ #leveling-plan .list-container {
17
+ flex: 1;
18
+ overflow-y: auto;
19
+ margin: 0 15px;
20
+ width: calc(100% - 30px);
21
+ padding: 0;
22
+ }
23
+
24
+ #leveling-plan .vertical-center {
25
+ display: flex;
26
+ align-items: center;
27
+ }
28
+
29
+ /* Header */
30
+ #leveling-plan .header-container {
31
+ display: flex;
32
+ justify-content: space-between;
33
+ align-items: center;
34
+ width: 100%;
35
+ }
36
+
37
+ /* Plan List */
38
+ #leveling-plan .plan-list {
39
+ width: 100%;
40
+ }
41
+
42
+ #leveling-plan .plan-list-content {
43
+ margin-top: 10px;
44
+ padding: 0 5px;
45
+ }
46
+
47
+ #leveling-plan .empty-message {
48
+ text-align: center;
49
+ padding: 40px;
50
+ color: #999;
51
+ font-size: 16px;
52
+ }
53
+
54
+ /* Plan Item */
55
+ #leveling-plan .plan-item {
56
+ margin-bottom: 15px;
57
+ }
58
+
59
+ #leveling-plan .plan-item-header {
60
+ display: flex;
61
+ justify-content: space-between;
62
+ align-items: center;
63
+ }
64
+
65
+ #leveling-plan .plan-item-title {
66
+ display: flex;
67
+ align-items: center;
68
+ gap: 10px;
69
+ }
70
+
71
+ #leveling-plan .ship-name {
72
+ font-weight: bold;
73
+ font-size: 16px;
74
+ }
75
+
76
+ #leveling-plan .level-info {
77
+ color: #666;
78
+ font-size: 14px;
79
+ }
80
+
81
+ #leveling-plan .completed-badge {
82
+ background-color: #5cb85c;
83
+ color: white;
84
+ padding: 2px 8px;
85
+ border-radius: 3px;
86
+ font-size: 12px;
87
+ }
88
+
89
+ #leveling-plan .plan-item-actions {
90
+ display: flex;
91
+ gap: 5px;
92
+ }
93
+
94
+ #leveling-plan .plan-item-body {
95
+ padding: 10px 0;
96
+ }
97
+
98
+ #leveling-plan .progress-section {
99
+ margin-bottom: 15px;
100
+ }
101
+
102
+ #leveling-plan .progress-label {
103
+ margin-bottom: 5px;
104
+ font-weight: bold;
105
+ }
106
+
107
+ #leveling-plan .exp-info {
108
+ margin-top: 5px;
109
+ color: #666;
110
+ font-size: 13px;
111
+ }
112
+
113
+ #leveling-plan .maps-section {
114
+ margin-bottom: 15px;
115
+ }
116
+
117
+ #leveling-plan .maps-label {
118
+ font-weight: bold;
119
+ margin-bottom: 8px;
120
+ }
121
+
122
+ #leveling-plan .maps-list {
123
+ display: flex;
124
+ flex-direction: column;
125
+ gap: 5px;
126
+ }
127
+
128
+ #leveling-plan .map-item {
129
+ display: flex;
130
+ align-items: center;
131
+ gap: 10px;
132
+ padding: 5px 10px;
133
+ background-color: rgba(0, 0, 0, 0.1);
134
+ border: 1px solid rgba(255, 255, 255, 0.1);
135
+ border-radius: 3px;
136
+ }
137
+
138
+ #leveling-plan .map-name {
139
+ font-weight: bold;
140
+ min-width: 50px;
141
+ color: inherit;
142
+ }
143
+
144
+ #leveling-plan .map-exp {
145
+ color: rgba(255, 255, 255, 0.7);
146
+ min-width: 100px;
147
+ }
148
+
149
+ #leveling-plan .personal-badge {
150
+ color: #ffc107;
151
+ margin-left: 3px;
152
+ }
153
+
154
+ #leveling-plan .map-sorties {
155
+ color: #5bc0de;
156
+ font-weight: bold;
157
+ }
158
+
159
+ #leveling-plan .notes-section {
160
+ margin-top: 15px;
161
+ padding-top: 15px;
162
+ border-top: 1px solid #ddd;
163
+ }
164
+
165
+ #leveling-plan .notes-label {
166
+ font-weight: bold;
167
+ margin-bottom: 5px;
168
+ }
169
+
170
+ #leveling-plan .notes-content {
171
+ color: #666;
172
+ white-space: pre-wrap;
173
+ }
174
+
175
+ /* Map Selector */
176
+ #leveling-plan .map-selector {
177
+ width: 100%;
178
+ }
179
+
180
+ #leveling-plan .quick-select-buttons {
181
+ display: flex;
182
+ flex-wrap: wrap;
183
+ gap: 8px;
184
+ margin-bottom: 15px;
185
+ }
186
+
187
+ #leveling-plan .map-quick-button {
188
+ display: flex;
189
+ flex-direction: column;
190
+ align-items: center;
191
+ min-width: 70px;
192
+ }
193
+
194
+ #leveling-plan .map-exp-badge {
195
+ font-size: 11px;
196
+ opacity: 0.8;
197
+ }
198
+
199
+ #leveling-plan .show-all-toggle {
200
+ margin-bottom: 15px;
201
+ }
202
+
203
+ #leveling-plan .map-table-container {
204
+ max-height: 300px;
205
+ overflow-y: auto;
206
+ margin-bottom: 15px;
207
+ }
208
+
209
+ #leveling-plan .selected-maps {
210
+ padding: 10px;
211
+ background-color: #f5f5f5;
212
+ border-radius: 3px;
213
+ }
214
+
215
+ #leveling-plan .selected-maps-label {
216
+ font-weight: bold;
217
+ margin-bottom: 8px;
218
+ }
219
+
220
+ #leveling-plan .selected-maps-list {
221
+ display: flex;
222
+ flex-wrap: wrap;
223
+ gap: 8px;
224
+ }
225
+
226
+ #leveling-plan .selected-map-tag {
227
+ display: inline-flex;
228
+ align-items: center;
229
+ gap: 5px;
230
+ padding: 4px 8px;
231
+ background-color: #337ab7;
232
+ color: white;
233
+ border-radius: 3px;
234
+ font-size: 13px;
235
+ }
236
+
237
+ #leveling-plan .remove-map {
238
+ cursor: pointer;
239
+ font-weight: bold;
240
+ font-size: 16px;
241
+ line-height: 1;
242
+ }
243
+
244
+ #leveling-plan .remove-map:hover {
245
+ color: #ff4444;
246
+ }
247
+
248
+ /* Settings */
249
+ #leveling-plan .plan-settings {
250
+ max-width: 100%;
251
+ padding: 10px 5px;
252
+ }
253
+
254
+ #leveling-plan .settings-actions {
255
+ display: flex;
256
+ gap: 10px;
257
+ margin-top: 20px;
258
+ }
259
+
260
+ .bp5-popover-transition-container{
261
+ z-index: 11000;
262
+ }
263
+
264
+ /* Ship Selector Portal - ensure it appears above modals */
265
+ .ship-selector-portal .bp3-popover {
266
+ z-index: 10 !important;
267
+ }
268
+
269
+ .ship-selector-portal .bp3-overlay-backdrop {
270
+ z-index: 9 !important;
271
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "Leveling Plan": "Leveling Plan",
3
+ "plugin_description": "Ship leveling plan management tool",
4
+ "Plans": "Plans",
5
+ "Settings": "Settings",
6
+ "Add Plan": "Add Plan",
7
+ "Edit Plan": "Edit Plan",
8
+ "Delete": "Delete",
9
+ "Edit": "Edit",
10
+ "Complete": "Complete",
11
+ "Completed": "Completed",
12
+ "Active": "Active",
13
+ "All": "All",
14
+ "No plans yet": "No plans yet",
15
+ "Ship": "Ship",
16
+ "Target Level": "Target Level",
17
+ "Current level": "Current level",
18
+ "Maps": "Maps",
19
+ "Notes": "Notes",
20
+ "Optional": "Optional",
21
+ "Save": "Save",
22
+ "Cancel": "Cancel",
23
+ "Select a ship": "Select a ship",
24
+ "Enter target level": "Enter target level",
25
+ "Enter notes": "Enter notes",
26
+ "Cannot change ship in existing plan": "Cannot change ship in existing plan",
27
+ "Progress": "Progress",
28
+ "Current EXP": "Current EXP",
29
+ "Required EXP": "Required EXP",
30
+ "sorties": "sorties",
31
+ "Personal Stats": "Personal Stats",
32
+ "Personal": "Personal",
33
+ "Poi DB": "Poi DB",
34
+ "Map": "Map",
35
+ "Base EXP": "Base EXP",
36
+ "Source": "Source",
37
+ "Selected": "Selected",
38
+ "maps": "maps",
39
+ "Show all maps": "Show all maps",
40
+ "Show frequent maps only": "Show frequent maps only",
41
+ "Default Battle Conditions": "Default Battle Conditions",
42
+ "These settings affect sortie calculations for all plans": "These settings affect sortie calculations for all plans",
43
+ "Battle Result": "Battle Result",
44
+ "Flagship Position": "Flagship Position",
45
+ "MVP": "MVP",
46
+ "Reset to Default": "Reset to Default",
47
+ "Save Settings": "Save Settings",
48
+ "Are you sure you want to delete this plan?": "Are you sure you want to delete this plan?"
49
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "Leveling Plan": "レベリング計画",
3
+ "plugin_description": "艦娘のレベリング計画管理ツール",
4
+ "Plans": "計画",
5
+ "Settings": "設定",
6
+ "Add Plan": "計画を追加",
7
+ "Edit Plan": "計画を編集",
8
+ "Delete": "削除",
9
+ "Edit": "編集",
10
+ "Complete": "完了",
11
+ "Completed": "完了済み",
12
+ "Active": "進行中",
13
+ "All": "すべて",
14
+ "No plans yet": "計画がありません",
15
+ "Ship": "艦娘",
16
+ "Target Level": "目標レベル",
17
+ "Current level": "現在のレベル",
18
+ "Maps": "海域",
19
+ "Notes": "メモ",
20
+ "Optional": "任意",
21
+ "Save": "保存",
22
+ "Cancel": "キャンセル",
23
+ "Select a ship": "艦娘を選択",
24
+ "Enter target level": "目標レベルを入力",
25
+ "Enter notes": "メモを入力",
26
+ "Cannot change ship in existing plan": "既存の計画の艦娘は変更できません",
27
+ "Progress": "進捗",
28
+ "Current EXP": "現在の経験値",
29
+ "Required EXP": "必要経験値",
30
+ "sorties": "回出撃",
31
+ "Personal Stats": "個人統計",
32
+ "Personal": "個人",
33
+ "Poi DB": "Poiデータベース",
34
+ "Map": "海域",
35
+ "Base EXP": "基礎経験値",
36
+ "Source": "ソース",
37
+ "Selected": "選択済み",
38
+ "maps": "個の海域",
39
+ "Show all maps": "すべての海域を表示",
40
+ "Show frequent maps only": "よく使う海域のみ表示",
41
+ "Default Battle Conditions": "デフォルト戦闘条件",
42
+ "These settings affect sortie calculations for all plans": "これらの設定はすべての計画の出撃回数計算に影響します",
43
+ "Battle Result": "戦闘結果",
44
+ "Flagship Position": "旗艦位置",
45
+ "MVP": "MVP",
46
+ "Reset to Default": "デフォルトに戻す",
47
+ "Save Settings": "設定を保存",
48
+ "Are you sure you want to delete this plan?": "この計画を削除してもよろしいですか?"
49
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "Leveling Plan": "练级计划",
3
+ "plugin_description": "舰娘练级计划管理工具",
4
+ "Plans": "计划",
5
+ "Settings": "设置",
6
+ "Add Plan": "添加计划",
7
+ "Edit Plan": "编辑计划",
8
+ "Delete": "删除",
9
+ "Edit": "编辑",
10
+ "Complete": "完成",
11
+ "Completed": "已完成",
12
+ "Active": "进行中",
13
+ "All": "全部",
14
+ "No plans yet": "暂无计划",
15
+ "Ship": "舰娘",
16
+ "Target Level": "目标等级",
17
+ "Current level": "当前等级",
18
+ "Maps": "海图",
19
+ "Notes": "备注",
20
+ "Optional": "可选",
21
+ "Save": "保存",
22
+ "Cancel": "取消",
23
+ "Select a ship": "选择舰娘",
24
+ "Enter target level": "输入目标等级",
25
+ "Enter notes": "输入备注",
26
+ "Cannot change ship in existing plan": "无法修改已有计划的舰娘",
27
+ "Progress": "进度",
28
+ "Current EXP": "当前经验",
29
+ "Required EXP": "所需经验",
30
+ "sorties": "次出击",
31
+ "Personal Stats": "个人统计",
32
+ "Personal": "个人",
33
+ "Poi DB": "Poi数据库",
34
+ "Map": "海图",
35
+ "Base EXP": "基础经验",
36
+ "Source": "来源",
37
+ "Selected": "已选择",
38
+ "maps": "个海图",
39
+ "Show all maps": "显示所有海图",
40
+ "Show frequent maps only": "仅显示常用海图",
41
+ "Default Battle Conditions": "默认战斗条件",
42
+ "These settings affect sortie calculations for all plans": "这些设置会影响所有计划的出击次数计算",
43
+ "Battle Result": "战斗结果",
44
+ "Flagship Position": "旗舰位置",
45
+ "MVP": "MVP",
46
+ "Reset to Default": "恢复默认",
47
+ "Save Settings": "保存设置",
48
+ "Are you sure you want to delete this plan?": "确定要删除这个计划吗?"
49
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "Leveling Plan": "練級計劃",
3
+ "plugin_description": "艦娘練級計劃管理工具",
4
+ "Plans": "計劃",
5
+ "Settings": "設定",
6
+ "Add Plan": "新增計劃",
7
+ "Edit Plan": "編輯計劃",
8
+ "Delete": "刪除",
9
+ "Edit": "編輯",
10
+ "Complete": "完成",
11
+ "Completed": "已完成",
12
+ "Active": "進行中",
13
+ "All": "全部",
14
+ "No plans yet": "暫無計劃",
15
+ "Ship": "艦娘",
16
+ "Target Level": "目標等級",
17
+ "Current level": "當前等級",
18
+ "Maps": "海圖",
19
+ "Notes": "備註",
20
+ "Optional": "可選",
21
+ "Save": "儲存",
22
+ "Cancel": "取消",
23
+ "Select a ship": "選擇艦娘",
24
+ "Enter target level": "輸入目標等級",
25
+ "Enter notes": "輸入備註",
26
+ "Cannot change ship in existing plan": "無法修改已有計劃的艦娘",
27
+ "Progress": "進度",
28
+ "Current EXP": "當前經驗",
29
+ "Required EXP": "所需經驗",
30
+ "sorties": "次出擊",
31
+ "Personal Stats": "個人統計",
32
+ "Personal": "個人",
33
+ "Poi DB": "Poi資料庫",
34
+ "Map": "海圖",
35
+ "Base EXP": "基礎經驗",
36
+ "Source": "來源",
37
+ "Selected": "已選擇",
38
+ "maps": "個海圖",
39
+ "Show all maps": "顯示所有海圖",
40
+ "Show frequent maps only": "僅顯示常用海圖",
41
+ "Default Battle Conditions": "預設戰鬥條件",
42
+ "These settings affect sortie calculations for all plans": "這些設定會影響所有計劃的出擊次數計算",
43
+ "Battle Result": "戰鬥結果",
44
+ "Flagship Position": "旗艦位置",
45
+ "MVP": "MVP",
46
+ "Reset to Default": "恢復預設",
47
+ "Save Settings": "儲存設定",
48
+ "Are you sure you want to delete this plan?": "確定要刪除這個計劃嗎?"
49
+ }
package/index.js ADDED
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.windowOptions = exports.reactClass = exports.windowMode = void 0;
5
+
6
+ var _levelingPlanArea = require("./views/leveling-plan-area");
7
+
8
+ const {
9
+ config
10
+ } = window;
11
+ const windowMode = true;
12
+ exports.windowMode = windowMode;
13
+ const reactClass = _levelingPlanArea.LevelingPlanArea;
14
+ exports.reactClass = reactClass;
15
+ const windowOptions = {
16
+ x: config.get('poi.window.x', 0),
17
+ y: config.get('poi.window.y', 0),
18
+ width: 820,
19
+ height: 650 // Initialize auto-complete observer when plugin loads
20
+ // Import and initialize in next tick to ensure POI is ready
21
+
22
+ };
23
+ exports.windowOptions = windowOptions;
24
+
25
+ if (typeof setImmediate === 'function') {
26
+ setImmediate(() => {
27
+ try {
28
+ const {
29
+ initAutoCompleteObserver
30
+ } = require('./services/auto-complete-observer');
31
+
32
+ initAutoCompleteObserver();
33
+ } catch (error) {
34
+ console.error('[LevelingPlan] Failed to load auto-complete observer:', error);
35
+ }
36
+ });
37
+ } else {
38
+ setTimeout(() => {
39
+ try {
40
+ const {
41
+ initAutoCompleteObserver
42
+ } = require('./services/auto-complete-observer');
43
+
44
+ initAutoCompleteObserver();
45
+ } catch (error) {
46
+ console.error('[LevelingPlan] Failed to load auto-complete observer:', error);
47
+ }
48
+ }, 0);
49
+ }