@kurot/cli 3.5.0 → 3.6.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 (51) hide show
  1. package/CHANGELOG.md +66 -2
  2. package/README.md +37 -13
  3. package/dist/core/plugins/compile-custom-namespaces.js +1 -1
  4. package/dist/core/plugins/compile-custom-namespaces.js.map +1 -1
  5. package/dist/core/plugins/compile-engine.js +3 -3
  6. package/dist/core/plugins/compile-engine.js.map +1 -1
  7. package/dist/core/plugins/copy-assets.d.ts +2 -0
  8. package/dist/core/plugins/copy-assets.d.ts.map +1 -1
  9. package/dist/core/plugins/copy-assets.js +3 -1
  10. package/dist/core/plugins/copy-assets.js.map +1 -1
  11. package/dist/utils/fs.d.ts +7 -1
  12. package/dist/utils/fs.d.ts.map +1 -1
  13. package/dist/utils/fs.js +10 -3
  14. package/dist/utils/fs.js.map +1 -1
  15. package/docs/ai-context.md +33 -9
  16. package/docs/architecture.md +7 -1
  17. package/docs/default-ui-skins.md +123 -0
  18. package/docs/game-template.md +28 -4
  19. package/docs/label-text-layout.md +3 -1
  20. package/docs/text-components.md +4 -1
  21. package/package.json +1 -1
  22. package/templates/game/resource/assets/ui/kui/kui.json +240 -0
  23. package/templates/game/resource/assets/ui/kui/kui.png +0 -0
  24. package/templates/game/resource/config/style.json +26 -4
  25. package/templates/game/resource/default.res.json +70 -3
  26. package/templates/game/resource/ui/skins/ButtonSkin.kui.xml +4 -4
  27. package/templates/game/resource/ui/skins/CheckBoxSkin.kui.xml +4 -4
  28. package/templates/game/resource/ui/skins/CloseButtonSkin.kui.xml +4 -0
  29. package/templates/game/resource/ui/skins/ComboBoxSkin.kui.xml +5 -5
  30. package/templates/game/resource/ui/skins/HScrollBarSkin.kui.xml +1 -1
  31. package/templates/game/resource/ui/skins/HSliderSkin.kui.xml +3 -3
  32. package/templates/game/resource/ui/skins/ItemRendererSkin.kui.xml +3 -3
  33. package/templates/game/resource/ui/skins/PanelSkin.kui.xml +5 -6
  34. package/templates/game/resource/ui/skins/ProgressBarSkin.kui.xml +4 -4
  35. package/templates/game/resource/ui/skins/RadioButtonSkin.kui.xml +4 -4
  36. package/templates/game/resource/ui/skins/TextInputSkin.kui.xml +4 -4
  37. package/templates/game/resource/ui/skins/ToggleButtonSkin.kui.xml +3 -3
  38. package/templates/game/resource/ui/skins/ToggleSwitchSkin.kui.xml +3 -3
  39. package/templates/game/resource/ui/skins/VScrollBarSkin.kui.xml +1 -1
  40. package/templates/game/resource/ui/skins/VSliderSkin.kui.xml +3 -3
  41. package/templates/game/src/Main.ts +1 -1
  42. package/templates/game/template/web/index.html +117 -34
  43. package/templates/game/template/web/logo.png +0 -0
  44. package/templates/game/resource/assets/ui/eui/eui.json +0 -24
  45. package/templates/game/resource/assets/ui/eui/eui.png +0 -0
  46. package/templates/game/resource/ui/skins/GroupSkin.kui.xml +0 -4
  47. package/templates/game/resource/ui/skins/ImageSkin.kui.xml +0 -4
  48. package/templates/game/resource/ui/skins/LabelSkin.kui.xml +0 -4
  49. package/templates/game/resource/ui/skins/ListSkin.kui.xml +0 -7
  50. package/templates/game/resource/ui/skins/TabBarSkin.kui.xml +0 -5
  51. package/templates/game/resource/ui/skins/ViewStackSkin.kui.xml +0 -4
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
- <Skin xmlns="https://kurot.dev/ui/1" class="skins.VSliderSkin" minHeight="30" minWidth="25">
3
- <Image id="track" height="100%" horizontalCenter="0" scale9Grid="1,1,4,4" source="track_png" width="7" />
4
- <Image id="thumb" horizontalCenter="0" source="thumb_png" />
2
+ <Skin xmlns="https://kurot.dev/ui/1" class="skins.VSliderSkin" states="disabled" minHeight="80" minWidth="44">
3
+ <Image id="track" height="100%" horizontalCenter="0" source="kui.track" width="8" />
4
+ <Image id="thumb" width="28" height="28" horizontalCenter="0" source="kui.slider_thumb" source.disabled="kui.slider_thumb_disabled" />
5
5
  </Skin>
@@ -88,7 +88,7 @@ class Main extends UILayer {
88
88
  /**
89
89
  * Create the game scene.
90
90
  *
91
- * Build a responsive view with EUI components and constraint-based layout.
91
+ * Build a responsive view with Kurot UI components and constraint-based layout.
92
92
  */
93
93
  private _createGameScene(): void {
94
94
  // Responsive background
@@ -24,60 +24,138 @@
24
24
  display: block;
25
25
  }
26
26
 
27
- .web-loading {
27
+ .web-splash {
28
28
  position: fixed;
29
29
  inset: 0;
30
30
  z-index: 10;
31
31
  display: flex;
32
- flex-direction: column;
33
32
  align-items: center;
34
33
  justify-content: center;
35
34
  background: #000000;
36
35
  transition: opacity 240ms ease;
37
36
  }
38
37
 
39
- .web-loading--hidden {
38
+ .web-splash--hidden {
40
39
  opacity: 0;
41
40
  pointer-events: none;
42
41
  }
43
42
 
44
- .web-loading__logo {
43
+ .web-splash__brand {
44
+ display: flex;
45
+ flex-direction: column;
46
+ align-items: center;
47
+ gap: 28px;
48
+ }
49
+
50
+ .web-splash__caption {
51
+ color: rgba(205, 230, 255, 0.6);
52
+ font: 600 11px/1.4 'Arial Rounded MT Bold', 'Trebuchet MS', sans-serif;
53
+ letter-spacing: 0.04em;
54
+ }
55
+
56
+ .web-splash__mascot {
57
+ position: relative;
58
+ width: min(52vw, 50vh, 240px);
59
+ isolation: isolate;
60
+ }
61
+
62
+ .web-splash__mascot::before {
63
+ content: '';
64
+ position: absolute;
65
+ inset: -18%;
66
+ z-index: -1;
67
+ background: radial-gradient(circle, rgba(30, 145, 255, 0.14), transparent 68%);
68
+ animation: web-splash-glow 3.2s ease-in-out 1200ms infinite;
69
+ }
70
+
71
+ .web-splash__logo {
45
72
  display: block;
46
- width: min(42vw, 220px);
73
+ width: 100%;
47
74
  height: auto;
48
- animation: web-loading-pulse 1.8s ease-in-out infinite;
75
+ transform-origin: 50% 80%;
76
+ animation: web-splash-arrive 720ms ease-out both,
77
+ web-splash-play 3.2s ease-in-out 1200ms infinite;
78
+ }
79
+
80
+ .web-splash__spark {
81
+ position: absolute;
82
+ width: 14px;
83
+ height: 14px;
84
+ opacity: 0;
85
+ animation: web-splash-spark 900ms ease-out 260ms both,
86
+ web-splash-twinkle 3.2s ease-in-out 1200ms infinite;
87
+ }
88
+
89
+ .web-splash__spark::before,
90
+ .web-splash__spark::after {
91
+ content: '';
92
+ position: absolute;
93
+ inset: 0;
94
+ margin: auto;
95
+ border-radius: 999px;
96
+ background: #91e5ff;
97
+ }
98
+
99
+ .web-splash__spark::before {
100
+ width: 100%;
101
+ height: 3px;
102
+ }
103
+
104
+ .web-splash__spark::after {
105
+ width: 3px;
106
+ height: 100%;
107
+ }
108
+
109
+ .web-splash__spark--left {
110
+ left: -4%;
111
+ top: 24%;
112
+ }
113
+
114
+ .web-splash__spark--right {
115
+ right: -4%;
116
+ top: 52%;
117
+ width: 10px;
118
+ height: 10px;
119
+ animation-delay: 460ms, 1400ms;
120
+ }
121
+
122
+ @keyframes web-splash-arrive {
123
+ 0% { transform: translateY(12px) scale(0.92) rotate(-4deg); }
124
+ 60% { transform: translateY(-6px) scale(1.025) rotate(2deg); }
125
+ 100% { transform: translateY(0) scale(1) rotate(0); }
49
126
  }
50
127
 
51
- .web-loading__indicator {
52
- width: 26px;
53
- height: 26px;
54
- margin-top: 20px;
55
- border: 2px solid rgba(143, 225, 235, 0.18);
56
- border-top-color: #8fe1eb;
57
- border-radius: 50%;
58
- animation: web-loading-spin 800ms linear infinite;
128
+ @keyframes web-splash-play {
129
+ 0%, 90%, 100% { transform: translateY(0) scale(1) rotate(0); }
130
+ 12% { transform: translateY(3px) scale(1.04, 0.96) rotate(-2deg); }
131
+ 28% { transform: translateY(-16px) scale(1.025) rotate(-5deg); }
132
+ 46% { transform: translateY(2px) scale(1.035, 0.97) rotate(2deg); }
133
+ 62% { transform: translateY(-9px) scale(1) rotate(4deg); }
134
+ 80% { transform: translateY(0) scale(1) rotate(-1deg); }
59
135
  }
60
136
 
61
- .web-loading__text {
62
- margin-top: 12px;
63
- color: rgba(255, 255, 255, 0.58);
64
- font: 11px/1 Arial, sans-serif;
65
- letter-spacing: 0.28em;
66
- text-indent: 0.28em;
137
+ @keyframes web-splash-spark {
138
+ 0% { opacity: 0; transform: scale(0.4) rotate(-20deg); }
139
+ 35% { opacity: 0.85; transform: scale(1) rotate(10deg); }
140
+ 100% { opacity: 0; transform: scale(0.6) rotate(30deg); }
67
141
  }
68
142
 
69
- @keyframes web-loading-pulse {
70
- 0%, 100% { opacity: 0.72; transform: scale(0.98); }
71
- 50% { opacity: 1; transform: scale(1); }
143
+ @keyframes web-splash-twinkle {
144
+ 0%, 12% { opacity: 0; transform: scale(0.4) rotate(-20deg); }
145
+ 28% { opacity: 0.9; transform: scale(1.15) rotate(10deg); }
146
+ 48%, 100% { opacity: 0; transform: scale(0.6) rotate(35deg); }
72
147
  }
73
148
 
74
- @keyframes web-loading-spin {
75
- to { transform: rotate(360deg); }
149
+ @keyframes web-splash-glow {
150
+ 0%, 100% { opacity: 0.75; transform: scale(0.96); }
151
+ 28% { opacity: 1; transform: scale(1.08); }
152
+ 62% { opacity: 0.9; transform: scale(1.02); }
76
153
  }
77
154
 
78
155
  @media (prefers-reduced-motion: reduce) {
79
- .web-loading__logo,
80
- .web-loading__indicator {
156
+ .web-splash__mascot::before,
157
+ .web-splash__logo,
158
+ .web-splash__spark {
81
159
  animation: none;
82
160
  }
83
161
  }
@@ -85,10 +163,15 @@
85
163
  {{KUROT_IMPORT_MAP}}
86
164
  </head>
87
165
  <body>
88
- <div id="webLoading" class="web-loading" role="status" aria-label="Loading">
89
- <img class="web-loading__logo" src="logo.png" alt="">
90
- <div class="web-loading__indicator" aria-hidden="true"></div>
91
- <div class="web-loading__text">LOADING</div>
166
+ <div id="webSplash" class="web-splash" role="img" aria-label="Made with Kurot">
167
+ <div class="web-splash__brand">
168
+ <span class="web-splash__caption">Made with</span>
169
+ <div class="web-splash__mascot">
170
+ <img class="web-splash__logo" src="logo.png" alt="">
171
+ <span class="web-splash__spark web-splash__spark--left" aria-hidden="true"></span>
172
+ <span class="web-splash__spark web-splash__spark--right" aria-hidden="true"></span>
173
+ </div>
174
+ </div>
92
175
  </div>
93
176
  <canvas id="gameCanvas"
94
177
  data-content-width="{{KUROT_STAGE_WIDTH}}"
@@ -99,10 +182,10 @@
99
182
  <script type="module">
100
183
  import './{{KUROT_ENTRY_SCRIPT}}';
101
184
 
102
- const loading = document.getElementById('webLoading');
185
+ const splash = document.getElementById('webSplash');
103
186
  requestAnimationFrame(() => {
104
- loading.classList.add('web-loading--hidden');
105
- loading.addEventListener('transitionend', () => loading.remove(), { once: true });
187
+ splash.classList.add('web-splash--hidden');
188
+ splash.addEventListener('transitionend', () => splash.remove(), { once: true });
106
189
  });
107
190
  </script>
108
191
  </body>
@@ -1,24 +0,0 @@
1
- {"file":"eui.png","frames":{
2
- "button_down_png":{"x":200,"y":76,"w":16,"h":16,"offX":0,"offY":0,"sourceW":16,"sourceH":16},
3
- "button_up_png":{"x":236,"y":58,"w":16,"h":16,"offX":0,"offY":0,"sourceW":16,"sourceH":16},
4
- "checkbox_select_disabled_png":{"x":127,"y":49,"w":23,"h":23,"offX":0,"offY":0,"sourceW":23,"sourceH":23},
5
- "checkbox_select_down_png":{"x":102,"y":49,"w":23,"h":23,"offX":0,"offY":0,"sourceW":23,"sourceH":23},
6
- "checkbox_select_up_png":{"x":77,"y":49,"w":23,"h":23,"offX":0,"offY":0,"sourceW":23,"sourceH":23},
7
- "checkbox_unselect_png":{"x":52,"y":49,"w":23,"h":23,"offX":0,"offY":0,"sourceW":23,"sourceH":23},
8
- "selected_png":{"x":218,"y":58,"w":16,"h":16,"offX":0,"offY":0,"sourceW":16,"sourceH":16},
9
- "border_png":{"x":0,"y":0,"w":177,"h":47,"offX":0,"offY":0,"sourceW":177,"sourceH":47},
10
- "header_png":{"x":200,"y":58,"w":16,"h":16,"offX":0,"offY":0,"sourceW":16,"sourceH":16},
11
- "thumb_pb_png":{"x":246,"y":16,"w":6,"h":6,"offX":0,"offY":0,"sourceW":6,"sourceH":6},
12
- "track_pb_png":{"x":246,"y":8,"w":6,"h":6,"offX":0,"offY":0,"sourceW":6,"sourceH":6},
13
- "radiobutton_select_disabled_png":{"x":152,"y":73,"w":22,"h":22,"offX":0,"offY":0,"sourceW":22,"sourceH":22},
14
- "radiobutton_select_down_png":{"x":176,"y":58,"w":22,"h":22,"offX":0,"offY":0,"sourceW":22,"sourceH":22},
15
- "radiobutton_select_up_png":{"x":152,"y":49,"w":22,"h":22,"offX":0,"offY":0,"sourceW":22,"sourceH":22},
16
- "radiobutton_unselect_png":{"x":176,"y":82,"w":22,"h":22,"offX":0,"offY":0,"sourceW":22,"sourceH":22},
17
- "roundthumb_png":{"x":246,"y":0,"w":6,"h":6,"offX":0,"offY":0,"sourceW":6,"sourceH":6},
18
- "track_sb_png":{"x":246,"y":40,"w":6,"h":6,"offX":0,"offY":0,"sourceW":6,"sourceH":6},
19
- "thumb_png":{"x":0,"y":49,"w":25,"h":25,"offX":0,"offY":0,"sourceW":25,"sourceH":25},
20
- "track_png":{"x":246,"y":24,"w":6,"h":6,"offX":0,"offY":0,"sourceW":6,"sourceH":6},
21
- "tracklight_png":{"x":246,"y":32,"w":6,"h":6,"offX":0,"offY":0,"sourceW":6,"sourceH":6},
22
- "handle_png":{"x":27,"y":49,"w":23,"h":23,"offX":0,"offY":0,"sourceW":23,"sourceH":23},
23
- "off_png":{"x":179,"y":0,"w":65,"h":27,"offX":0,"offY":0,"sourceW":65,"sourceH":27},
24
- "on_png":{"x":179,"y":29,"w":65,"h":27,"offX":0,"offY":0,"sourceW":65,"sourceH":27}}}
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Skin xmlns="https://kurot.dev/ui/1" class="skins.GroupSkin">
3
- <Group id="contentGroup" height="100%" width="100%" />
4
- </Skin>
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Skin xmlns="https://kurot.dev/ui/1" class="skins.ImageSkin">
3
- <Image id="imageDisplay" height="100%" width="100%" />
4
- </Skin>
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Skin xmlns="https://kurot.dev/ui/1" class="skins.LabelSkin">
3
- <Label id="labelDisplay" height="100%" size="14" textColor="#DFE6E9" width="100%" />
4
- </Skin>
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Skin xmlns="https://kurot.dev/ui/1" class="skins.ListSkin" minHeight="20" minWidth="20">
3
- <Rect fillColor="#1A1A2E" height="100%" strokeColor="#0F3460" strokeWeight="1" width="100%" />
4
- <Scroller id="scroller" height="100%" width="100%">
5
- <DataGroup id="dataGroup" height="100%" width="100%" />
6
- </Scroller>
7
- </Skin>
@@ -1,5 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Skin xmlns="https://kurot.dev/ui/1" class="skins.TabBarSkin" minHeight="40" minWidth="100">
3
- <Rect fillColor="#16213E" height="100%" width="100%" />
4
- <DataGroup id="dataGroup" height="100%" width="100%" />
5
- </Skin>
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Skin xmlns="https://kurot.dev/ui/1" class="skins.ViewStackSkin">
3
- <Group id="contentGroup" height="100%" width="100%" />
4
- </Skin>