@kurot/cli 3.4.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 (58) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/README.md +49 -8
  3. package/dist/core/kui/kui-parser.d.ts.map +1 -1
  4. package/dist/core/kui/kui-parser.js +2 -0
  5. package/dist/core/kui/kui-parser.js.map +1 -1
  6. package/dist/core/kui/validate-flip-properties.d.ts +7 -0
  7. package/dist/core/kui/validate-flip-properties.d.ts.map +1 -0
  8. package/dist/core/kui/validate-flip-properties.js +33 -0
  9. package/dist/core/kui/validate-flip-properties.js.map +1 -0
  10. package/dist/core/plugins/compile-custom-namespaces.js +1 -1
  11. package/dist/core/plugins/compile-custom-namespaces.js.map +1 -1
  12. package/dist/core/plugins/compile-engine.js +3 -3
  13. package/dist/core/plugins/compile-engine.js.map +1 -1
  14. package/dist/core/plugins/copy-assets.d.ts +2 -0
  15. package/dist/core/plugins/copy-assets.d.ts.map +1 -1
  16. package/dist/core/plugins/copy-assets.js +3 -1
  17. package/dist/core/plugins/copy-assets.js.map +1 -1
  18. package/dist/utils/fs.d.ts +7 -1
  19. package/dist/utils/fs.d.ts.map +1 -1
  20. package/dist/utils/fs.js +10 -3
  21. package/dist/utils/fs.js.map +1 -1
  22. package/docs/ai-context.md +40 -10
  23. package/docs/architecture.md +7 -1
  24. package/docs/default-ui-skins.md +123 -0
  25. package/docs/game-template.md +28 -4
  26. package/docs/label-text-layout.md +3 -1
  27. package/docs/text-components.md +4 -1
  28. package/package.json +2 -2
  29. package/templates/game/resource/assets/ui/kui/kui.json +240 -0
  30. package/templates/game/resource/assets/ui/kui/kui.png +0 -0
  31. package/templates/game/resource/config/style.json +26 -4
  32. package/templates/game/resource/default.res.json +70 -3
  33. package/templates/game/resource/ui/skins/ButtonSkin.kui.xml +4 -4
  34. package/templates/game/resource/ui/skins/CheckBoxSkin.kui.xml +4 -4
  35. package/templates/game/resource/ui/skins/CloseButtonSkin.kui.xml +4 -0
  36. package/templates/game/resource/ui/skins/ComboBoxSkin.kui.xml +5 -5
  37. package/templates/game/resource/ui/skins/HScrollBarSkin.kui.xml +1 -1
  38. package/templates/game/resource/ui/skins/HSliderSkin.kui.xml +3 -3
  39. package/templates/game/resource/ui/skins/ItemRendererSkin.kui.xml +3 -3
  40. package/templates/game/resource/ui/skins/PanelSkin.kui.xml +5 -6
  41. package/templates/game/resource/ui/skins/ProgressBarSkin.kui.xml +4 -4
  42. package/templates/game/resource/ui/skins/RadioButtonSkin.kui.xml +4 -4
  43. package/templates/game/resource/ui/skins/TextInputSkin.kui.xml +4 -4
  44. package/templates/game/resource/ui/skins/ToggleButtonSkin.kui.xml +3 -3
  45. package/templates/game/resource/ui/skins/ToggleSwitchSkin.kui.xml +3 -3
  46. package/templates/game/resource/ui/skins/VScrollBarSkin.kui.xml +1 -1
  47. package/templates/game/resource/ui/skins/VSliderSkin.kui.xml +3 -3
  48. package/templates/game/src/Main.ts +1 -1
  49. package/templates/game/template/web/index.html +117 -34
  50. package/templates/game/template/web/logo.png +0 -0
  51. package/templates/game/resource/assets/ui/eui/eui.json +0 -24
  52. package/templates/game/resource/assets/ui/eui/eui.png +0 -0
  53. package/templates/game/resource/ui/skins/GroupSkin.kui.xml +0 -4
  54. package/templates/game/resource/ui/skins/ImageSkin.kui.xml +0 -4
  55. package/templates/game/resource/ui/skins/LabelSkin.kui.xml +0 -4
  56. package/templates/game/resource/ui/skins/ListSkin.kui.xml +0 -7
  57. package/templates/game/resource/ui/skins/TabBarSkin.kui.xml +0 -5
  58. package/templates/game/resource/ui/skins/ViewStackSkin.kui.xml +0 -4
@@ -39,7 +39,7 @@ factory variables, property assignments, semantic layout children, and state
39
39
  property overrides. Document contracts, reusable instances, data bindings, and
40
40
  actions remain `UIDocument` concepts.
41
41
 
42
- CLI 3.4.0 consumes ui-document 0.12.x, retaining Label text-fitting metadata. The
42
+ CLI 3.6.0 consumes ui-document ^0.13.0, retaining Label text-fitting metadata. The
43
43
  compiler emits `textFit`, `minFontSize`, base font sizes and state overrides;
44
44
  native UI owns measurement and derives drawing sizes after layout validation.
45
45
  See [Label compilation](label-text-layout.md). The application supplies UI
@@ -71,6 +71,12 @@ Development builds preserve application source module structure under
71
71
  `manifest.json`. Static resources retain stable paths because application code
72
72
  addresses them by key or URL.
73
73
 
74
+ Asset copying creates directories only when an accepted runtime file needs them.
75
+ KUI source files and source theme JSON are excluded when UI compilation is enabled,
76
+ so a skin-only `resource/ui` tree is absent from output. Mixed directories retain
77
+ their runtime images/JSON and generated theme output is preserved. Template
78
+ scaffolding keeps its separate empty-directory behavior.
79
+
74
80
  ## Development watchers
75
81
 
76
82
  The dev server has separate rebuild paths for application source, KUI XML, and
@@ -0,0 +1,123 @@
1
+ # Default KUI skins
2
+
3
+ This game-template refresh is included in CLI 3.6.0, pending publication.
4
+ Registry CLI 3.5.0 contains the older atlas. The 2× kit requires Core ^2.5.0;
5
+ publish Core 2.5.0 before CLI 3.6.0.
6
+ The template owns the XML, textures and project colors; `@kurot/ui`
7
+ does not ship a bitmap theme or load a stylesheet itself.
8
+
9
+ ## Visual language
10
+
11
+ Rounded corners, bright blue actions, pale neutral surfaces and a small pressed
12
+ button offset echo the Kurot mascot. The default is a light game interface:
13
+
14
+ | Role | Value |
15
+ | --- | --- |
16
+ | Action / selected outline | `#1487E8` |
17
+ | Action text / marks | `#071D30` |
18
+ | Canvas / panel | `#EDF3FC` / `#FFFFFF` |
19
+ | Input / neutral control | `#F1F5FC` |
20
+ | Text / secondary text | `#18273E` / `#64748B` |
21
+ | Disabled text | `#7C8799` |
22
+ | Button / input minimum height | 48 logical pixels |
23
+ | CheckBox / RadioButton / switch / slider minimum hit height | 44 logical pixels |
24
+
25
+ Buttons use 14-pixel corner radii and panels use 22. XML single-line labels
26
+ shrink within their allocated width, to a minimum of 14; editable text stays at
27
+ 18. Fonts inherit the application's configured family. No browser CSS is used
28
+ to draw the components, and no runtime light/dark switching is introduced.
29
+
30
+ ## Text and spacing
31
+
32
+ Single-line captions use `multiline="false" verticalAlign="middle"` with the
33
+ Core 2.5.0 ink-centering correction. Button label padding is 10 pixels
34
+ above/below; its down state uses 12/8 to retain a deliberate 2-pixel press offset.
35
+ The icon has the same neutral/down centers. Panel titles also opt into middle
36
+ alignment. Input text retains Core's stable font baseline while its placeholder
37
+ uses dynamic visual centering. No language-specific skin offsets are required.
38
+ See [Core text alignment](../../core/docs/text-layout.md#visual-centering-and-stable-baselines-core-250).
39
+ Published Core 2.4.0 does not contain that correction; the isolated preview uses
40
+ checkout Core for both text alignment and source density.
41
+
42
+ ## Resources and XML
43
+
44
+ - `resource/assets/ui/kui/kui.json` and `kui.png`: Kurot-owned 512×512 atlas,
45
+ generated at 2× with sheet `resolution: 2`. XML dimensions stay logical.
46
+ - `resource/default.res.json`: preload group `kui` and object-valued frame
47
+ metadata. Qualified sources such as `kui.button_up` avoid bare-key collisions.
48
+ - `resource/ui/skins/*.kui.xml`: 15 native default component skins and
49
+ `CloseButtonSkin`, used explicitly by Panel's `closeButton`.
50
+ - `resource/config/style.json`: named colors used by Label/EditableText state
51
+ properties. Raster colors are baked into textures; changing text colors alone
52
+ does not recolor the atlas.
53
+
54
+ Buttons provide up/down/disabled surfaces. CheckBox, RadioButton, ToggleButton
55
+ and ToggleSwitch cover all six selected/pressed/disabled combinations.
56
+ ItemRenderer supplies selected states for List and TabBar; ComboBox supplies
57
+ normal/open/disabled states and TextInput handles both prompt states when
58
+ enabled or disabled. Sliders supply a disabled thumb. Panel retains its drag
59
+ area, title and close button.
60
+
61
+ Skin part names and the native component APIs stay unchanged. The CLI compiles
62
+ source changes with a paired nine-slice grid from resource metadata, including
63
+ state transitions. Frames retain their full physical dimensions and never rotate
64
+ or trim; extrusion stays outside the recorded frame. Core divides original frame
65
+ dimensions/trim offsets by density; grids remain logical. Stretchable surfaces keep
66
+ their corners while the interior expands. Icons and switch handles remain fixed
67
+ size. Horizontal and vertical slider tracks have grids that fit their 8-pixel
68
+ thickness.
69
+
70
+ Scroller keeps `autoVisibility="false" visible="false"` on both bars. It retains
71
+ automatic scrolling policies and touch/trackpad scrolling. To display bars in a
72
+ project, edit those parts explicitly.
73
+
74
+ ItemRenderer backgrounds fit the allocated row width without extra horizontal
75
+ padding. The checkout Core also fixes fractional WebGL scissor bounds so scaled
76
+ Lists retain their right outline. Published Core 2.4.0 lacks that correction;
77
+ shrinking the skin or changing its nine-slice grid is not required.
78
+
79
+ Group, List, TabBar, ViewStack and text/image nodes are composed directly in XML;
80
+ their old default-Skin placeholders were not conventional Theme mappings and
81
+ are removed. Use `itemRendererSkinName` to choose a List/TabBar row appearance,
82
+ and wrap the node with Group/Image/Scroller for its surface and viewport.
83
+
84
+ ## Native preview and maintenance
85
+
86
+ `examples/game/resource/ui/DefaultUISkin.kui.xml` contains the native gallery.
87
+ `src/DefaultUI.ts` only connects data and events. The example installs its own
88
+ project font loader and document dependency; other projects are unchanged.
89
+
90
+ Core 2.5.0 is published. Until the example adopts it, build Core/CLI for an isolated
91
+ source trial. The example's registry lock does not yet contain density support:
92
+
93
+ ```sh
94
+ pnpm --dir packages/core build
95
+ pnpm --dir packages/cli build
96
+ pnpm --dir tools/default-ui-assets preview
97
+ ```
98
+
99
+ The preview tool prints a new directory under docs-internal, with strict dev
100
+ and minified release builds. It links the built checkout Core and the example's
101
+ installed UI/Game/document packages; it does not edit application installations
102
+ or locks. Run the repository CLI dev command in that printed directory and open
103
+ the server URL with `?ui=1`. The ordinary game remains available without
104
+ that parameter. Try the inputs, switches, ComboBox, tabs, sliders, panel close
105
+ button and draggable List. The gallery is rendered by Core/UI from compiled
106
+ KUI XML. After explicitly installing the Core 2.5.0 release in the
107
+ example, ordinary repository-CLI builds can run directly from examples/game.
108
+
109
+ CLI 3.6.0 preserves constructor names in development and release
110
+ engine/namespace bundles so Theme lookup also works for self-referencing
111
+ classes such as Scroller. Published CLI 3.5.0 lacks the development correction.
112
+
113
+ `tools/default-ui-assets` contains editable SVG geometry and the reproducible
114
+ PNG/atlas generator. It uses registry `@kurot/atlas@0.1.0` only as private
115
+ repository tooling. CLI and runtime SDKs gain no atlas dependency. See its
116
+ [maintenance instructions](../../../tools/default-ui-assets/README.md).
117
+
118
+ Core 2.5.0 must be published before CLI 3.6.0.
119
+ UI/Game/document/runtime need no incidental release; existing 1× consumers keep
120
+ their behavior. See [density units and adoption](../../core/docs/texture-density.md).
121
+ Existing projects keep their own skins, resource keys and startup code. New
122
+ scaffolds receive this kit after the supporting Core and CLI publications;
123
+ installing a new CLI does not rewrite an existing project's resources.
@@ -1,12 +1,12 @@
1
1
  # Project styles and languages in the game template
2
2
 
3
- CLI 3.2.1 is published with this template update. It adds
4
- project-owned initialization without changing Core/UI APIs or migrating existing
5
- projects. The empty template stays minimal.
3
+ Project-owned style/font/language initialization was introduced in CLI 3.2.1
4
+ and remains in CLI 3.6.0 (pending publication). Existing projects keep their own startup
5
+ code and HTML; the empty template stays minimal.
6
6
 
7
7
  ## Files
8
8
 
9
- - resource/config/style.json declares the primary font role and disabled-text color.
9
+ - resource/config/style.json declares the primary font role and skin text colors.
10
10
  - resource/assets/fonts contains unmodified Chakra Petch regular (400) and bold (700)
11
11
  files, with OFL.txt. Source: [Google Fonts](https://github.com/google/fonts/tree/main/ofl/chakrapetch).
12
12
  - resource/config/locale.json enables English and selects en_US by default.
@@ -28,8 +28,32 @@ This ordering includes loading-screen Labels in the project font. The loading
28
28
  screen's startup messages stay in English because translations are not loaded yet.
29
29
  Templates do not implement live font/theme/language replacement.
30
30
 
31
+ ## HTML brand splash
32
+
33
+ This splash is included in CLI 3.6.0, pending publication; npm CLI 3.5.0 lacks it.
34
+
35
+ The game template's `web/index.html` presents `web/logo.png` beneath a small
36
+ "Made with" caption. The mascot makes a gentle entrance, then repeats a playful
37
+ hop and sway every 3.2 seconds while the entry module loads. Sparkles and a soft
38
+ blue glow follow the loop. The splash has no loading text or progress indicator;
39
+ the application's Preloader owns resource progress. Animations stop when the
40
+ browser requests reduced motion. The logo size follows both viewport width and
41
+ height for small screens and landscape.
42
+
43
+ The HTML overlay fades out after the entry module evaluates, without a minimum
44
+ display time or a wait for the entrance animation to finish. It does not wait
45
+ for project font or resource loading. Customize the branding directly in the
46
+ project's HTML. This template update applies to newly scaffolded game projects;
47
+ existing project HTML is project-owned.
48
+
31
49
  ## Change fonts and colors
32
50
 
51
+ The CLI 3.6.0 [default KUI skins](default-ui-skins.md) use Kurot-owned textures
52
+ under resource/assets/ui/kui and a matching color palette. Registry CLI 3.5.0
53
+ does not include this skin refresh. Skin state text colors compile from the
54
+ project stylesheet; texture colors are baked into the PNG, without live palette
55
+ switching. Templates inherit project fonts and retain the existing licensed files.
56
+
33
57
  Font keys such as primary produce stable aliases such as kurot-primary. Replace
34
58
  files and update style.json resource-relative paths, retaining weight 400 and
35
59
  unique weights. Default skins inherit the configured font; explicit Label fontFamily
@@ -1,6 +1,6 @@
1
1
  # Label text compilation
2
2
 
3
- CLI 3.4.0 consumes ui-document 0.12.x and compiles KUI text-fitting properties
3
+ CLI 3.6.0 consumes ui-document ^0.13.0 and compiles KUI text-fitting properties
4
4
  through the existing UIDocument → SkinIR → ESM factory pipeline. The semantic
5
5
  document format remains version 2.
6
6
 
@@ -35,6 +35,8 @@ introduces build-time text measurement. See the
35
35
  ## Runtime boundary
36
36
 
37
37
  - The application must install UI `^3.1.0` and Core `^2.1.0` for shrinking.
38
+ These are the feature's original API minimums. Installing current UI 3.4.0
39
+ requires Core `^2.4.0` for that package's centered-flip contract.
38
40
  They remain application dependencies; CLI depends on the headless document
39
41
  package rather than importing the engine into the build process.
40
42
  - `textFit` is `none` by default or `shrink` for ordinary single-line Labels.
@@ -1,9 +1,12 @@
1
1
  # BitmapLabel and RichLabel compilation
2
2
 
3
- CLI 3.4.0 uses published ui-document 0.12.0. Applications rendering these tags
3
+ Native text compilation was introduced in CLI 3.4.0 with document 0.12.0.
4
+ Current CLI 3.6.0 requires published ui-document ^0.13.0 and retains these tags.
5
+ Applications rendering these tags
4
6
  must install UI `^3.3.0` and Core `^2.3.0`; Core 2.3.1 fixes unstyled blank
5
7
  rich-text line metrics. The CLI does not install or bundle its own Core/UI.
6
8
  Document format version 2 and existing project configuration are unchanged.
9
+ Installing UI 3.4.0 requires Core ^2.4.0 for that package's centered-flip contract.
7
10
 
8
11
  ```xml
9
12
  <Skin xmlns="https://kurot.dev/ui/1" class="TextSkin" states="disabled">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kurot/cli",
3
- "version": "3.4.0",
3
+ "version": "3.6.0",
4
4
  "description": "Kurot CLI - build tool for Kurot Editor KUI XML workflows",
5
5
  "author": "Kelvin <kyia.x52@gmail.com>",
6
6
  "license": "MIT",
@@ -28,7 +28,7 @@
28
28
  "kurot": "tsx src/index.ts"
29
29
  },
30
30
  "dependencies": {
31
- "@kurot/ui-document": "^0.12.0",
31
+ "@kurot/ui-document": "^0.13.0",
32
32
  "commander": "^13.0.0",
33
33
  "esbuild": "^0.25.0"
34
34
  },
@@ -0,0 +1,240 @@
1
+ {
2
+ "file": "kui.png",
3
+ "frames": {
4
+ "button_disabled": {
5
+ "x": 142,
6
+ "y": 6,
7
+ "w": 96,
8
+ "h": 96
9
+ },
10
+ "button_down": {
11
+ "x": 246,
12
+ "y": 6,
13
+ "w": 96,
14
+ "h": 96
15
+ },
16
+ "button_up": {
17
+ "x": 350,
18
+ "y": 6,
19
+ "w": 96,
20
+ "h": 96
21
+ },
22
+ "checkbox_disabled": {
23
+ "x": 198,
24
+ "y": 358,
25
+ "w": 56,
26
+ "h": 56
27
+ },
28
+ "checkbox_down": {
29
+ "x": 246,
30
+ "y": 286,
31
+ "w": 56,
32
+ "h": 56
33
+ },
34
+ "checkbox_selected": {
35
+ "x": 302,
36
+ "y": 214,
37
+ "w": 56,
38
+ "h": 56
39
+ },
40
+ "checkbox_selected_disabled": {
41
+ "x": 198,
42
+ "y": 422,
43
+ "w": 56,
44
+ "h": 56
45
+ },
46
+ "checkbox_selected_down": {
47
+ "x": 366,
48
+ "y": 214,
49
+ "w": 56,
50
+ "h": 56
51
+ },
52
+ "checkbox_up": {
53
+ "x": 430,
54
+ "y": 214,
55
+ "w": 56,
56
+ "h": 56
57
+ },
58
+ "chevron": {
59
+ "x": 326,
60
+ "y": 470,
61
+ "w": 32,
62
+ "h": 32
63
+ },
64
+ "chevron_disabled": {
65
+ "x": 366,
66
+ "y": 470,
67
+ "w": 32,
68
+ "h": 32
69
+ },
70
+ "chevron_open": {
71
+ "x": 406,
72
+ "y": 406,
73
+ "w": 32,
74
+ "h": 32
75
+ },
76
+ "close_disabled": {
77
+ "x": 230,
78
+ "y": 214,
79
+ "w": 64,
80
+ "h": 64
81
+ },
82
+ "close_down": {
83
+ "x": 126,
84
+ "y": 358,
85
+ "w": 64,
86
+ "h": 64
87
+ },
88
+ "close_up": {
89
+ "x": 126,
90
+ "y": 430,
91
+ "w": 64,
92
+ "h": 64
93
+ },
94
+ "panel": {
95
+ "x": 6,
96
+ "y": 6,
97
+ "w": 128,
98
+ "h": 128
99
+ },
100
+ "progress": {
101
+ "x": 262,
102
+ "y": 478,
103
+ "w": 24,
104
+ "h": 24
105
+ },
106
+ "progress_track": {
107
+ "x": 294,
108
+ "y": 478,
109
+ "w": 24,
110
+ "h": 24
111
+ },
112
+ "radio_disabled": {
113
+ "x": 262,
114
+ "y": 350,
115
+ "w": 56,
116
+ "h": 56
117
+ },
118
+ "radio_down": {
119
+ "x": 310,
120
+ "y": 278,
121
+ "w": 56,
122
+ "h": 56
123
+ },
124
+ "radio_selected": {
125
+ "x": 262,
126
+ "y": 414,
127
+ "w": 56,
128
+ "h": 56
129
+ },
130
+ "radio_selected_disabled": {
131
+ "x": 374,
132
+ "y": 278,
133
+ "w": 56,
134
+ "h": 56
135
+ },
136
+ "radio_selected_down": {
137
+ "x": 438,
138
+ "y": 278,
139
+ "w": 56,
140
+ "h": 56
141
+ },
142
+ "radio_up": {
143
+ "x": 326,
144
+ "y": 342,
145
+ "w": 56,
146
+ "h": 56
147
+ },
148
+ "scroll_thumb": {
149
+ "x": 390,
150
+ "y": 446,
151
+ "w": 16,
152
+ "h": 16
153
+ },
154
+ "slider_thumb": {
155
+ "x": 326,
156
+ "y": 406,
157
+ "w": 56,
158
+ "h": 56
159
+ },
160
+ "slider_thumb_disabled": {
161
+ "x": 390,
162
+ "y": 342,
163
+ "w": 56,
164
+ "h": 56
165
+ },
166
+ "surface_disabled_selected": {
167
+ "x": 142,
168
+ "y": 110,
169
+ "w": 96,
170
+ "h": 96
171
+ },
172
+ "surface_down": {
173
+ "x": 6,
174
+ "y": 142,
175
+ "w": 96,
176
+ "h": 96
177
+ },
178
+ "surface_selected": {
179
+ "x": 246,
180
+ "y": 110,
181
+ "w": 96,
182
+ "h": 96
183
+ },
184
+ "surface_selected_down": {
185
+ "x": 350,
186
+ "y": 110,
187
+ "w": 96,
188
+ "h": 96
189
+ },
190
+ "surface_up": {
191
+ "x": 6,
192
+ "y": 246,
193
+ "w": 96,
194
+ "h": 96
195
+ },
196
+ "switch_disabled_off": {
197
+ "x": 6,
198
+ "y": 350,
199
+ "w": 112,
200
+ "h": 64
201
+ },
202
+ "switch_disabled_on": {
203
+ "x": 6,
204
+ "y": 422,
205
+ "w": 112,
206
+ "h": 64
207
+ },
208
+ "switch_handle": {
209
+ "x": 454,
210
+ "y": 342,
211
+ "w": 48,
212
+ "h": 48
213
+ },
214
+ "switch_handle_disabled": {
215
+ "x": 454,
216
+ "y": 398,
217
+ "w": 48,
218
+ "h": 48
219
+ },
220
+ "switch_off": {
221
+ "x": 110,
222
+ "y": 214,
223
+ "w": 112,
224
+ "h": 64
225
+ },
226
+ "switch_on": {
227
+ "x": 126,
228
+ "y": 286,
229
+ "w": 112,
230
+ "h": 64
231
+ },
232
+ "track": {
233
+ "x": 198,
234
+ "y": 486,
235
+ "w": 16,
236
+ "h": 16
237
+ }
238
+ },
239
+ "resolution": 2
240
+ }
@@ -4,13 +4,35 @@
4
4
  "default": "primary",
5
5
  "families": {
6
6
  "primary": {
7
- "fallback": ["Arial", "sans-serif"],
7
+ "fallback": [
8
+ "Arial",
9
+ "sans-serif"
10
+ ],
8
11
  "faces": [
9
- { "url": "assets/fonts/ChakraPetch-Regular.ttf", "weight": 400 },
10
- { "url": "assets/fonts/ChakraPetch-Bold.ttf", "weight": 700 }
12
+ {
13
+ "url": "assets/fonts/ChakraPetch-Regular.ttf",
14
+ "weight": 400
15
+ },
16
+ {
17
+ "url": "assets/fonts/ChakraPetch-Bold.ttf",
18
+ "weight": 700
19
+ }
11
20
  ]
12
21
  }
13
22
  }
14
23
  },
15
- "colors": { "disabled-text": "#999999" }
24
+ "colors": {
25
+ "disabled-text": "#7C8799",
26
+ "brand": "#1487E8",
27
+ "brand-pressed": "#0874CF",
28
+ "on-brand": "#071D30",
29
+ "canvas": "#EDF3FC",
30
+ "surface": "#FFFFFF",
31
+ "soft": "#F1F5FC",
32
+ "edge": "#DBE5F2",
33
+ "text": "#18273E",
34
+ "muted-text": "#64748B",
35
+ "disabled": "#EEF1F6",
36
+ "selected": "#E4F2FF"
37
+ }
16
38
  }
@@ -1,15 +1,82 @@
1
1
  {
2
2
  "groups": [
3
3
  {
4
- "keys": "eui,locale_json,lang_en_US_properties",
4
+ "keys": "kui,locale_json,lang_en_US_properties",
5
5
  "name": "preload"
6
6
  }
7
7
  ],
8
8
  "resources": [
9
9
  {
10
- "name": "eui",
10
+ "name": "kui",
11
11
  "type": "sheet",
12
- "url": "assets/ui/eui/eui.json"
12
+ "url": "assets/ui/kui/kui.json",
13
+ "subkeys": {
14
+ "button_up": {
15
+ "scale9grid": "16,16,16,16"
16
+ },
17
+ "button_down": {
18
+ "scale9grid": "16,16,16,16"
19
+ },
20
+ "button_disabled": {
21
+ "scale9grid": "16,16,16,16"
22
+ },
23
+ "surface_up": {
24
+ "scale9grid": "16,16,16,16"
25
+ },
26
+ "surface_down": {
27
+ "scale9grid": "16,16,16,16"
28
+ },
29
+ "surface_selected": {
30
+ "scale9grid": "16,16,16,16"
31
+ },
32
+ "surface_selected_down": {
33
+ "scale9grid": "16,16,16,16"
34
+ },
35
+ "surface_disabled_selected": {
36
+ "scale9grid": "16,16,16,16"
37
+ },
38
+ "panel": {
39
+ "scale9grid": "24,24,16,16"
40
+ },
41
+ "track": {
42
+ "scale9grid": "3,3,2,2"
43
+ },
44
+ "progress_track": {
45
+ "scale9grid": "5,5,2,2"
46
+ },
47
+ "progress": {
48
+ "scale9grid": "5,5,2,2"
49
+ },
50
+ "scroll_thumb": {
51
+ "scale9grid": "3,3,2,2"
52
+ },
53
+ "checkbox_up": {},
54
+ "checkbox_down": {},
55
+ "checkbox_disabled": {},
56
+ "checkbox_selected": {},
57
+ "checkbox_selected_down": {},
58
+ "checkbox_selected_disabled": {},
59
+ "radio_up": {},
60
+ "radio_down": {},
61
+ "radio_disabled": {},
62
+ "radio_selected": {},
63
+ "radio_selected_down": {},
64
+ "radio_selected_disabled": {},
65
+ "slider_thumb": {},
66
+ "slider_thumb_disabled": {},
67
+ "switch_off": {},
68
+ "switch_on": {},
69
+ "switch_disabled_off": {},
70
+ "switch_disabled_on": {},
71
+ "switch_handle": {},
72
+ "switch_handle_disabled": {},
73
+ "chevron": {},
74
+ "chevron_open": {},
75
+ "chevron_disabled": {},
76
+ "close_up": {},
77
+ "close_down": {},
78
+ "close_disabled": {}
79
+ }
13
80
  },
14
81
  {
15
82
  "name": "locale_json",
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
- <Skin xmlns="https://kurot.dev/ui/1" class="skins.ButtonSkin" states="disabled,down,up" minHeight="50" minWidth="100">
3
- <Image height="100%" scale9Grid="1,3,8,8" source="button_up_png" width="100%" alpha.disabled="0.5" source.down="button_down_png" />
4
- <Label id="labelDisplay" bottom="8" left="8" right="8" size="20" textAlign="center" textColor="#FFFFFF" textColor.disabled="@style:colors:disabled-text" top="8" verticalAlign="middle" />
5
- <Image id="iconDisplay" horizontalCenter="0" verticalCenter="0" />
2
+ <Skin xmlns="https://kurot.dev/ui/1" class="skins.ButtonSkin" states="disabled,down,up" minHeight="48" minWidth="96">
3
+ <Image height="100%" width="100%" source="kui.button_up" source.down="kui.button_down" source.disabled="kui.button_disabled" touchEnabled="false" />
4
+ <Label id="labelDisplay" left="16" right="16" top="10" bottom="10" size="18" bold="true" multiline="false" textFit="shrink" minFontSize="14" textAlign="center" verticalAlign="middle" textColor="@style:colors:on-brand" textColor.disabled="@style:colors:disabled-text" top.down="12" bottom.down="8" />
5
+ <Image id="iconDisplay" horizontalCenter="0" verticalCenter="0" verticalCenter.down="2" />
6
6
  </Skin>
@@ -1,10 +1,10 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
- <Skin xmlns="https://kurot.dev/ui/1" class="skins.CheckBoxSkin" states="disabled,disabledAndSelected,down,downAndSelected,up,upAndSelected">
2
+ <Skin xmlns="https://kurot.dev/ui/1" class="skins.CheckBoxSkin" states="disabled,disabledAndSelected,down,downAndSelected,up,upAndSelected" minHeight="44">
3
3
  <Group height="100%" width="100%">
4
4
  <layout>
5
- <HorizontalLayout verticalAlign="middle" />
5
+ <HorizontalLayout gap="10" paddingTop="8" paddingBottom="8" verticalAlign="middle" />
6
6
  </layout>
7
- <Image alpha="1" fillMode="scale" source="checkbox_unselect_png" alpha.disabled="0.5" source.disabledAndSelected="checkbox_select_disabled_png" alpha.down="0.7" source.downAndSelected="checkbox_select_down_png" source.upAndSelected="checkbox_select_up_png" />
8
- <Label id="labelDisplay" size="20" textAlign="center" textColor="#707070" verticalAlign="middle" />
7
+ <Image width="28" height="28" source="kui.checkbox_up" source.down="kui.checkbox_down" source.disabled="kui.checkbox_disabled" source.disabledAndSelected="kui.checkbox_selected_disabled" source.downAndSelected="kui.checkbox_selected_down" source.upAndSelected="kui.checkbox_selected" />
8
+ <Label id="labelDisplay" size="18" multiline="false" textColor="@style:colors:text" textColor.disabled="@style:colors:disabled-text" textColor.disabledAndSelected="@style:colors:disabled-text" verticalAlign="middle" />
9
9
  </Group>
10
10
  </Skin>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Skin xmlns="https://kurot.dev/ui/1" class="skins.CloseButtonSkin" states="disabled,down,up" minWidth="44" minHeight="44">
3
+ <Image width="32" height="32" horizontalCenter="0" verticalCenter="0" source="kui.close_up" source.down="kui.close_down" source.disabled="kui.close_disabled" />
4
+ </Skin>
@@ -1,9 +1,9 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
- <Skin xmlns="https://kurot.dev/ui/1" class="skins.ComboBoxSkin" states="disabled,normal,open" minHeight="36" minWidth="100">
3
- <Rect fillColor="#1A1A2E" height="36" strokeColor="#0F3460" strokeWeight="1" width="100%" fillColor.disabled="#16213E" strokeColor.disabled="#4A5459" fillColor.open="#16213E" strokeColor.open="#6C5CE7" />
4
- <Label id="labelDisplay" height="36" left="10" right="36" size="14" textColor="#DFE6E9" top="0" verticalAlign="middle" textColor.disabled="@style:colors:disabled-text" />
5
- <Label height="36" right="4" size="10" text="▼" textAlign="center" textColor="#636E72" top="0" verticalAlign="middle" width="24" textColor.open="#6C5CE7" />
6
- <Scroller id="dropDown" height="180" left="0" right="0" top="36" visible="false">
2
+ <Skin xmlns="https://kurot.dev/ui/1" class="skins.ComboBoxSkin" states="disabled,normal,open" minHeight="48" minWidth="160">
3
+ <Image height="48" top="0" width="100%" source="kui.surface_up" source.disabled="kui.button_disabled" source.open="kui.surface_selected" />
4
+ <Label id="labelDisplay" height="48" left="14" right="42" size="18" multiline="false" textFit="shrink" minFontSize="14" textColor="@style:colors:text" top="0" verticalAlign="middle" textColor.disabled="@style:colors:disabled-text" />
5
+ <Image height="16" width="16" right="14" top="16" source="kui.chevron" source.open="kui.chevron_open" source.disabled="kui.chevron_disabled" />
6
+ <Scroller id="dropDown" height="180" left="0" right="0" top="54" visible="false" includeInLayout="false">
7
7
  <List id="list" height="180" width="100%" />
8
8
  </Scroller>
9
9
  </Skin>