@kurot/ui 3.1.0 → 3.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/CHANGELOG.md CHANGED
@@ -4,6 +4,35 @@ All notable changes to `@kurot/ui` are documented here.
4
4
 
5
5
  ---
6
6
 
7
+ ## [3.2.0] — 2026-10-08
8
+
9
+ ### Added
10
+
11
+ - Export BitmapLabel, a native UI component wrapping Core BitmapText with normal
12
+ measurement, parent layout constraints, alignment, spacing and text bindings.
13
+ - Accept a caller-owned BitmapFont or a configured font-resource name. Resolve
14
+ preloaded fonts synchronously and load missing fonts through Core's resource
15
+ singleton, reporting completion and loading/type errors through events.
16
+ - Ignore superseded asynchronous font results, including A-to-B-to-A changes.
17
+ Font ownership remains with the resource cache or caller.
18
+
19
+ ### Dependencies and migration
20
+
21
+ - Require `@kurot/core ^2.2.0` in peer and development dependencies for rendered
22
+ BitmapText, FontAnalyzer and pure text measurement. Upgrade older Core installs
23
+ and lockfiles before adopting UI 3.2.0.
24
+ - Remove the local Core dependency override and build against published Core.
25
+ UI continues to depend only on Core; bitmap-font is Core's dependency.
26
+ - BitmapLabel supports native code and programmatic skins. The ui-document
27
+ catalog, CLI KUI tags, Editor and ui-runtime materializers do not yet adopt it.
28
+
29
+ ### Tests and documentation
30
+
31
+ - Cover layout and measurement, alignment, binding notifications, cached and
32
+ asynchronous font resolution, stale requests, invalid resources and errors.
33
+ - Translate architecture documentation to English and correct outdated Skin,
34
+ theme-adapter, validation and virtual-layout descriptions against source.
35
+
7
36
  ## [3.1.0] — 2026-10-05
8
37
 
9
38
  ### Added
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  UI component framework for [@kurot/core](https://github.com/kurot-engine/kurot/tree/main/packages/core). Migrated from Egret EUI, rewritten in modern TypeScript with clean class inheritance — no namespace hacks, no prototype manipulation.
4
4
 
5
- > **Current release: 3.1.0.** Requires `@kurot/core@^2.1.0`. Targets ES2022 + evergreen browsers, same as core.
5
+ > **Package version: 3.2.0.** Requires `@kurot/core@^2.2.0`. Targets ES2022 + evergreen browsers, same as core.
6
6
 
7
7
  For the full list of changes in this release, see [CHANGELOG.md](./CHANGELOG.md).
8
8
 
@@ -33,22 +33,44 @@ intended to wrap. Files are not migrated automatically. Load fonts before
33
33
  measurement; after late loading, call `label.invalidateSize()` to refresh
34
34
  metrics even if the family name is unchanged.
35
35
 
36
- See the [text layout and fitting contract](docs/label-text-layout.md). KUI
37
- authoring requires ui-document 0.9.x and matching CLI/ui-runtime releases;
38
- programmatic UI depends only on Core.
36
+ See the [text layout and fitting contract](docs/label-text-layout.md). Fitting
37
+ metadata was introduced in ui-document 0.9.0 and remains supported in 0.11.0.
38
+ Current CLI-built KUI projects use published CLI 3.3.0 with ui-document `^0.11.0`;
39
+ Published ui-runtime 0.8.2 uses the same kernel range. Programmatic UI depends
40
+ only on Core.
39
41
 
40
42
  ## Installation
41
43
 
42
44
  ```bash
43
- pnpm add @kurot/ui@^3.1.0 @kurot/core@^2.1.0
45
+ pnpm add @kurot/ui@^3.2.0 @kurot/core@^2.2.0
44
46
  ```
45
47
 
46
48
  `@kurot/ui` declares `@kurot/core` as a peer dependency. Install both packages explicitly so the application controls the resolved core version.
47
49
 
48
- UI 3.1 requires Core 2.1.0 or later within Core 2.x. Refresh old sheet manifests with
50
+ UI 3.2 requires Core 2.2.0 or later within Core 2.x for BitmapText rendering and
51
+ font resources. Core installs its published bitmap-font dependency automatically.
52
+ Refresh older Core/UI lockfiles and old sheet manifests with
49
53
  string-valued `subkeys` in Kurot Editor before launching the application.
50
54
  See the [resource migration guide](../ui-document/docs/resource-nine-slice.md).
51
55
 
56
+ ## Project style colors
57
+
58
+ CLI 3.3.0 resolves Label presets and named colors from the optional
59
+ `resource/config/style.json` into native UI properties, including state overrides:
60
+
61
+ ```xml
62
+ <Label id="labelDisplay" textColor="#FF9900"
63
+ textColor.disabled="@style:colors:disabled-text" />
64
+ ```
65
+
66
+ The Label belongs to a Skin declaring the `disabled` state. Native Skin state
67
+ handling applies the compiled numeric color and restores the base color on
68
+ leaving that state. The same reference syntax works for base color properties.
69
+ UI does not read style.json or evaluate XML references itself; programmatic
70
+ components assign numeric colors. This release does not introduce complete
71
+ typography presets or automatic live theme switching. See the
72
+ [project style contract](../ui-document/docs/project-styles.md).
73
+
52
74
  ## Quick Start
53
75
 
54
76
  ```ts
@@ -129,11 +151,7 @@ class MyButtonSkin extends Skin {
129
151
  this.bg = new Rect(120, 36, 0x6c5ce7);
130
152
  this.skinParts = ['bg'];
131
153
  this.elementsContent = [this.bg];
132
- this.states = [
133
- new State('up'),
134
- new State('down', [new SetProperty('bg', 'fillColor', 0x5a4bd1)]),
135
- new State('disabled', [new SetProperty('bg', 'fillColor', 0x636e72)]),
136
- ];
154
+ this.states = [new State('up'), new State('down', [new SetProperty('bg', 'fillColor', 0x5a4bd1)]), new State('disabled', [new SetProperty('bg', 'fillColor', 0x636e72)])];
137
155
  }
138
156
  }
139
157
 
@@ -204,19 +222,20 @@ dynamic properties; use `this.skinParts.<name>` during the ready lifecycle.
204
222
 
205
223
  ### Basic Controls
206
224
 
207
- | Component | Description |
208
- | -------------- | ------------------------------------------------------------------------------ |
209
- | `Label` | Text display. Wraps `TextField` in the UI lifecycle. |
210
- | `Button` | Tappable button with `up`/`down`/`disabled` states and `labelDisplay` part. |
211
- | `CheckBox` | Toggle button. Dispatches `Event.CHANGE` on selection change. |
212
- | `RadioButton` | Mutually exclusive toggle. Use `groupName` to link buttons. |
213
- | `ToggleButton` | Base for toggle-style buttons. |
214
- | `ToggleSwitch` | Binary on/off switch (visual variant of `ToggleButton`). |
215
- | `ProgressBar` | Value indicator. Inject `thumb` (a `Component`) as the fill part. |
216
- | `HSlider` | Horizontal slider. Inject `thumb` and `track` skin parts; default range 0–100. |
217
- | `VSlider` | Vertical slider. Inject `thumb` and `track` skin parts; default range 0–100. |
218
- | `Rect` | Filled/stroked rectangle. Supports `fillColor`, `strokeColor`, `fillAlpha`. |
219
- | `Image` | Bitmap display. Supports URL string or `Texture`, `scale9Grid`, `fillMode`. |
225
+ | Component | Description |
226
+ | -------------- | ------------------------------------------------------------------------------- |
227
+ | `Label` | Text display. Wraps `TextField` in the UI lifecycle. |
228
+ | `BitmapLabel` | Bitmap-font display. Wraps BitmapText with font resources, layout and bindings. |
229
+ | `Button` | Tappable button with `up`/`down`/`disabled` states and `labelDisplay` part. |
230
+ | `CheckBox` | Toggle button. Dispatches `Event.CHANGE` on selection change. |
231
+ | `RadioButton` | Mutually exclusive toggle. Use `groupName` to link buttons. |
232
+ | `ToggleButton` | Base for toggle-style buttons. |
233
+ | `ToggleSwitch` | Binary on/off switch (visual variant of `ToggleButton`). |
234
+ | `ProgressBar` | Value indicator. Inject `thumb` (a `Component`) as the fill part. |
235
+ | `HSlider` | Horizontal slider. Inject `thumb` and `track` skin parts; default range 0–100. |
236
+ | `VSlider` | Vertical slider. Inject `thumb` and `track` skin parts; default range 0–100. |
237
+ | `Rect` | Filled/stroked rectangle. Supports `fillColor`, `strokeColor`, `fillAlpha`. |
238
+ | `Image` | Bitmap display. Supports URL string or `Texture`, `scale9Grid`, `fillMode`. |
220
239
 
221
240
  Both sliders inherit Range's default `minimum = 0` and `maximum = 100`.
222
241
  Set either bound explicitly when a control needs a different range.
@@ -281,10 +300,12 @@ data.addItem('Durian');
281
300
  data.addItemAt('Elderberry', 1);
282
301
  data.removeItemAt(0);
283
302
  data.replaceItemAt('Fig', 0);
284
- data.sortOn('name'); // sort by field
285
- data.sort((a, b) => (a > b ? 1 : -1)); // custom sort
303
+ data.sort((a, b) => String(a).localeCompare(String(b)));
286
304
  data.filterFunction(item => item !== 'Fig');
287
305
  data.refresh(); // notify view after manual source changes
306
+
307
+ const records = new ArrayCollection([{ name: 'Pear' }, { name: 'Apple' }]);
308
+ records.sortOn('name'); // sort records by field
288
309
  ```
289
310
 
290
311
  ## Virtual Layout
@@ -335,20 +356,34 @@ component.percentHeight = 100;
335
356
  ## View States
336
357
 
337
358
  ```ts
338
- import { State, SetProperty, AddItems } from '@kurot/ui';
359
+ import { Label, Rect, Skin, State, SetProperty } from '@kurot/ui';
339
360
 
340
- class MyButtonSkin extends Skin {
341
- states = [
342
- new State('up'),
343
- new State('down', [new SetProperty('bg', 'fillColor', 0x5a4bd1)]),
344
- new State('disabled', [
345
- new SetProperty('bg', 'fillColor', 0x636e72),
346
- new SetProperty('lbl', 'textColor', 0xb2bec3),
347
- ]),
348
- ];
361
+ class StatefulButtonSkin extends Skin {
362
+ constructor() {
363
+ super();
364
+ const bg = new Rect(120, 36, 0x6c5ce7);
365
+ const labelDisplay = new Label();
366
+ labelDisplay.textColor = 0xffffff;
367
+ labelDisplay.horizontalCenter = 0;
368
+ labelDisplay.verticalCenter = 0;
369
+ this.setPart('bg', bg);
370
+ this.setPart('labelDisplay', labelDisplay);
371
+ this.skinParts = ['labelDisplay'];
372
+ this.elementsContent = [bg, labelDisplay];
373
+ this.states = [
374
+ new State('up'),
375
+ new State('down', [new SetProperty('bg', 'fillColor', 0x5a4bd1)]),
376
+ new State('disabled', [new SetProperty('bg', 'fillColor', 0x636e72), new SetProperty('labelDisplay', 'textColor', 0xb2bec3)]),
377
+ ];
378
+ }
349
379
  }
350
380
  ```
351
381
 
382
+ Button selects `up`, `down` or `disabled` through its native behavior. Each
383
+ state restores the previous property values before applying the next overrides.
384
+ CLI-built skins generate the same `State`/`SetProperty` objects from XML
385
+ attributes such as `textColor.disabled`.
386
+
352
387
  ## Events
353
388
 
354
389
  | Event | Dispatched by | Description |
@@ -405,14 +440,39 @@ cross-framework ranking.
405
440
 
406
441
  ## Differences from Egret EUI
407
442
 
408
- | | Egret EUI | @kurot/ui |
409
- | -------------- | --------------------------- | ------------------------------------ |
410
- | Namespace | `eui.*` global | ES Module named exports |
411
- | Component base | `namespace` + `mixin` | Standard class inheritance |
412
- | Layout state | Prototype-injected | `UIState` delegation |
413
- | Authored skins | EXML runtime parser | KUI XML compiled by `@kurot/cli` |
414
- | Skin parts | Incremental dynamic fields | Atomic typed `skinParts` |
415
- | Skin lifecycle | `partAdded` / `partRemoved` | `onSkinReady` / `onSkinRemoved` |
416
- | `thisObject` | Required in event listeners | Not needed — use arrow functions |
417
- | Virtual layout | Default on | Opt-in via `useVirtualLayout = true` |
418
- | i18n | Built-in | Not supported |
443
+ | | Egret EUI | @kurot/ui |
444
+ | -------------- | --------------------------- | ----------------------------------------------------------- |
445
+ | Namespace | `eui.*` global | ES Module named exports |
446
+ | Component base | `namespace` + `mixin` | Standard class inheritance |
447
+ | Layout state | Prototype-injected | `UIState` delegation |
448
+ | Authored skins | EXML runtime parser | KUI XML compiled by `@kurot/cli` |
449
+ | Skin parts | Incremental dynamic fields | Atomic typed `skinParts` |
450
+ | Skin lifecycle | `partAdded` / `partRemoved` | `onSkinReady` / `onSkinRemoved` |
451
+ | `thisObject` | Required in event listeners | Not needed — use arrow functions |
452
+ | Virtual layout | Default on | Opt-in via `useVirtualLayout = true` |
453
+ | i18n | Built-in | Project-managed translations; Core handles Unicode wrapping |
454
+
455
+ ## Bitmap labels in 3.2.0
456
+
457
+ [BitmapLabel](docs/bitmap-label.md) wraps Core BitmapText with native UI layout,
458
+ spacing, alignment and configured font-resource names:
459
+
460
+ ```ts
461
+ import { BitmapLabel } from '@kurot/ui';
462
+
463
+ const amount = new BitmapLabel('1,234.56');
464
+ amount.font = 'number_font_fnt';
465
+ amount.multiline = false;
466
+ amount.height = 100;
467
+ group.addChild(amount);
468
+ ```
469
+
470
+ Register the font descriptor in Core's resource configuration before assigning
471
+ its name, or assign a BitmapFont directly. The label borrows its font; the
472
+ resource cache or caller retains ownership. Superseded async requests cannot
473
+ replace a newer assignment. Successful named loads dispatch Event.COMPLETE;
474
+ failed or incorrectly typed resources dispatch IOErrorEvent.IO_ERROR.
475
+
476
+ The component supports native code and programmatic skins. Installed KUI
477
+ compilers, the ui-document catalog, Editor and ui-runtime materializers do not
478
+ yet adopt the BitmapLabel tag. Published UI 3.1.0 does not include the component.
@@ -0,0 +1,46 @@
1
+ import { BitmapFont } from '@kurot/core';
2
+ import { Component } from './Component.js';
3
+ import type { IDisplayText } from '../core/IDisplayText.js';
4
+ /**
5
+ * UI layout wrapper around BitmapText. String fonts are configured resource
6
+ * names; FontAnalyzer loads the descriptor and its page. Font ownership stays
7
+ * with the resource cache or the caller that supplied a BitmapFont.
8
+ */
9
+ export declare class BitmapLabel extends Component implements IDisplayText {
10
+ private readonly _bitmapText;
11
+ private _font?;
12
+ private _fontChanged;
13
+ private _fontRequest;
14
+ private _widthConstraint;
15
+ constructor(text?: string);
16
+ get text(): string;
17
+ set text(value: string);
18
+ get font(): string | BitmapFont | undefined;
19
+ set font(value: string | BitmapFont | undefined);
20
+ get textAlign(): 'left' | 'center' | 'right';
21
+ set textAlign(value: 'left' | 'center' | 'right');
22
+ get verticalAlign(): 'top' | 'middle' | 'bottom';
23
+ set verticalAlign(value: 'top' | 'middle' | 'bottom');
24
+ get letterSpacing(): number;
25
+ set letterSpacing(value: number);
26
+ get lineSpacing(): number;
27
+ set lineSpacing(value: number);
28
+ get multiline(): boolean;
29
+ set multiline(value: boolean);
30
+ get smoothing(): boolean;
31
+ set smoothing(value: boolean);
32
+ /**
33
+ * Content metrics under the label's width constraint, before height clipping.
34
+ */
35
+ get textWidth(): number;
36
+ get textHeight(): number;
37
+ createChildren(): void;
38
+ commitProperties(): void;
39
+ measure(): void;
40
+ setLayoutBoundsSize(layoutWidth: number, layoutHeight: number): void;
41
+ updateDisplayList(unscaledWidth: number, unscaledHeight: number): void;
42
+ private _invalidateText;
43
+ private _measureText;
44
+ private _resolveFont;
45
+ }
46
+ //# sourceMappingURL=BitmapLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BitmapLabel.d.ts","sourceRoot":"","sources":["../../../src/kurot/components/BitmapLabel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA6C,MAAM,aAAa,CAAC;AACpF,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3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AI,IAAI;IAItB,gBAAgB,IAAI,IAAI;IAMxB,OAAO,IAAI,IAAI;IAIf,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI;IAOpE,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,IAAI;IAOtF,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,YAAY;CA0BpB"}
@@ -0,0 +1,180 @@
1
+ import { BitmapFont, BitmapText, Event, IOErrorEvent, resource } from '@kurot/core';
2
+ import { Component } from './Component.js';
3
+ import { PropertyEvent } from '../events/PropertyEvent.js';
4
+ /**
5
+ * UI layout wrapper around BitmapText. String fonts are configured resource
6
+ * names; FontAnalyzer loads the descriptor and its page. Font ownership stays
7
+ * with the resource cache or the caller that supplied a BitmapFont.
8
+ */
9
+ export class BitmapLabel extends Component {
10
+ // ── Instance fields ──────────────────────────────────────────────────────
11
+ _bitmapText = new BitmapText();
12
+ _font;
13
+ _fontChanged = false;
14
+ _fontRequest = 0;
15
+ _widthConstraint = NaN;
16
+ // ── Constructor ──────────────────────────────────────────────────────────
17
+ constructor(text = '') {
18
+ super();
19
+ this.touchChildren = false;
20
+ this.text = text;
21
+ }
22
+ // ── Getters / Setters ─────────────────────────────────────────────────────
23
+ get text() {
24
+ return this._bitmapText.text;
25
+ }
26
+ set text(value) {
27
+ if (this.text === value)
28
+ return;
29
+ this._bitmapText.text = value;
30
+ PropertyEvent.dispatchPropertyEvent(this, 'text');
31
+ this._invalidateText();
32
+ }
33
+ get font() {
34
+ return this._font;
35
+ }
36
+ set font(value) {
37
+ if (this._font === value)
38
+ return;
39
+ this._font = value;
40
+ this._fontRequest++;
41
+ this._fontChanged = typeof value === 'string';
42
+ this._bitmapText.font = value instanceof BitmapFont ? value : undefined;
43
+ this.invalidateProperties();
44
+ this._invalidateText();
45
+ }
46
+ get textAlign() {
47
+ return this._bitmapText.textAlign;
48
+ }
49
+ set textAlign(value) {
50
+ if (this.textAlign === value)
51
+ return;
52
+ this._bitmapText.textAlign = value;
53
+ this.invalidateDisplayList();
54
+ }
55
+ get verticalAlign() {
56
+ return this._bitmapText.verticalAlign;
57
+ }
58
+ set verticalAlign(value) {
59
+ if (this.verticalAlign === value)
60
+ return;
61
+ this._bitmapText.verticalAlign = value;
62
+ this.invalidateDisplayList();
63
+ }
64
+ get letterSpacing() {
65
+ return this._bitmapText.letterSpacing;
66
+ }
67
+ set letterSpacing(value) {
68
+ if (this.letterSpacing === value)
69
+ return;
70
+ this._bitmapText.letterSpacing = value;
71
+ this._invalidateText();
72
+ }
73
+ get lineSpacing() {
74
+ return this._bitmapText.lineSpacing;
75
+ }
76
+ set lineSpacing(value) {
77
+ if (this.lineSpacing === value)
78
+ return;
79
+ this._bitmapText.lineSpacing = value;
80
+ this._invalidateText();
81
+ }
82
+ get multiline() {
83
+ return this._bitmapText.multiline;
84
+ }
85
+ set multiline(value) {
86
+ if (this.multiline === value)
87
+ return;
88
+ this._bitmapText.multiline = value;
89
+ this._invalidateText();
90
+ }
91
+ get smoothing() {
92
+ return this._bitmapText.smoothing;
93
+ }
94
+ set smoothing(value) {
95
+ if (this.smoothing === value)
96
+ return;
97
+ this._bitmapText.smoothing = value;
98
+ this.invalidateDisplayList();
99
+ }
100
+ /**
101
+ * Content metrics under the label's width constraint, before height clipping.
102
+ */
103
+ get textWidth() {
104
+ return this._measureText().width;
105
+ }
106
+ get textHeight() {
107
+ return this._measureText().height;
108
+ }
109
+ // ── Override methods ─────────────────────────────────────────────────────
110
+ createChildren() {
111
+ super.createChildren();
112
+ this.addChild(this._bitmapText);
113
+ }
114
+ commitProperties() {
115
+ super.commitProperties();
116
+ if (!this._fontChanged)
117
+ return;
118
+ this._fontChanged = false;
119
+ this._resolveFont();
120
+ }
121
+ measure() {
122
+ const measured = this._measureText();
123
+ this.setMeasuredSize(measured.width, measured.height);
124
+ }
125
+ setLayoutBoundsSize(layoutWidth, layoutHeight) {
126
+ super.setLayoutBoundsSize(layoutWidth, layoutHeight);
127
+ const width = Number.isFinite(layoutWidth) ? this.width : NaN;
128
+ if (Object.is(this._widthConstraint, width))
129
+ return;
130
+ this._widthConstraint = width;
131
+ this._invalidateText();
132
+ }
133
+ updateDisplayList(unscaledWidth, unscaledHeight) {
134
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
135
+ this._bitmapText.width = unscaledWidth;
136
+ this._bitmapText.height = unscaledHeight;
137
+ }
138
+ // ── Private methods ──────────────────────────────────────────────────────
139
+ _invalidateText() {
140
+ this.invalidateSize();
141
+ this.invalidateDisplayList();
142
+ }
143
+ _measureText() {
144
+ const width = Number.isFinite(this._widthConstraint) ? this._widthConstraint : this.$explicitWidth;
145
+ const layout = this._bitmapText.measureText(width);
146
+ return { width: layout.width, height: layout.height };
147
+ }
148
+ _resolveFont() {
149
+ const name = this._font;
150
+ if (typeof name !== 'string')
151
+ return;
152
+ const request = this._fontRequest;
153
+ const apply = (font) => {
154
+ if (request !== this._fontRequest)
155
+ return;
156
+ if (!(font instanceof BitmapFont))
157
+ throw new TypeError(`Resource ${name} is not a bitmap font.`);
158
+ this._bitmapText.font = font;
159
+ this._invalidateText();
160
+ this.dispatchEventWith(Event.COMPLETE);
161
+ };
162
+ const cached = resource.get(name);
163
+ const report = (error) => {
164
+ if (request !== this._fontRequest)
165
+ return;
166
+ this.dispatchEventWith(IOErrorEvent.IO_ERROR, false, { source: name, error });
167
+ };
168
+ if (cached !== undefined) {
169
+ try {
170
+ apply(cached);
171
+ }
172
+ catch (error) {
173
+ report(error);
174
+ }
175
+ return;
176
+ }
177
+ void resource.load(name).then(apply).catch(report);
178
+ }
179
+ }
180
+ //# sourceMappingURL=BitmapLabel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BitmapLabel.js","sourceRoot":"","sources":["../../../src/kurot/components/BitmapLabel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAA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IAAa,EAAQ,EAAE;YACrC,IAAI,OAAO,KAAK,IAAI,CAAC,YAAY;gBAAE,OAAO;YAC1C,IAAI,CAAC,CAAC,IAAI,YAAY,UAAU,CAAC;gBAAE,MAAM,IAAI,SAAS,CAAC,YAAY,IAAI,wBAAwB,CAAC,CAAC;YACjG,IAAI,CAAC,WAAW,CAAC,IAAI,GAAG,IAAI,CAAC;YAC7B,IAAI,CAAC,eAAe,EAAE,CAAC;YACvB,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACxC,CAAC,CAAC;QACF,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAClC,MAAM,MAAM,GAAG,CAAC,KAAc,EAAQ,EAAE;YACvC,IAAI,OAAO,KAAK,IAAI,CAAC,YAAY;gBAAE,OAAO;YAC1C,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;QAC/E,CAAC,CAAC;QACF,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YAC1B,IAAI,CAAC;gBACJ,KAAK,CAAC,MAAM,CAAC,CAAC;YACf,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,MAAM,CAAC,KAAK,CAAC,CAAC;YACf,CAAC;YACD,OAAO;QACR,CAAC;QACD,KAAK,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACpD,CAAC;CACD"}
@@ -31,4 +31,5 @@ export { UILayer } from './UILayer.js';
31
31
  export { EditableText } from './EditableText.js';
32
32
  export { TextInput } from './TextInput.js';
33
33
  export { ComboBox } from './ComboBox.js';
34
+ export { BitmapLabel } from './BitmapLabel.js';
34
35
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"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AAM,kBAAkB,CAAC"}
@@ -31,4 +31,5 @@ export { UILayer } from './UILayer.js';
31
31
  export { EditableText } from './EditableText.js';
32
32
  export { TextInput } from './TextInput.js';
33
33
  export { ComboBox } from './ComboBox.js';
34
+ export { BitmapLabel } from './BitmapLabel.js';
34
35
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/kurot/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA6D,MAAM,gBAAgB,CAAC;AACtG,OAAO,EAAE,KAAK,EAAoB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAoB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAmB,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EA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AAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
@@ -6,9 +6,11 @@ each session. Treat the package source and its `src/index.ts` barrel as the
6
6
  authority for current behavior and exports; this file provides the compressed
7
7
  map, runtime contracts and task→file lookup.
8
8
 
9
- Package identity: `@kurot/ui@3.1.0`, EUI-compatible UI framework on top of
10
- `@kurot/core`. Peer-depends on `@kurot/core@^2.1.0`. Rewritten with standard class
9
+ Package identity: `@kurot/ui@3.2.0`, EUI-compatible UI framework on top of
10
+ `@kurot/core`. Peer-depends on `@kurot/core@^2.2.0`. Rewritten with standard class
11
11
  inheritance and delegation — no namespace mixins, no prototype copying.
12
+ Version 3.2.0 is prepared for publication against published Core 2.2.0;
13
+ source metadata alone does not confirm UI publication.
12
14
 
13
15
  Source root: `src/kurot/`. Public API: `src/index.ts` is a flat re-export of
14
16
  7 barrels — `core`, `layouts`, `components`, `events`, `states`, `collections`,
@@ -24,7 +26,7 @@ src/kurot/
24
26
  │ Validator/validator (render-preparation validation scheduler),
25
27
  │ Theme/getTheme()/setTheme(), IViewport, IAssetAdapter/IThemeAdapter.
26
28
  ├── components/ Group, Component (delegation core — see §2), Skin, and
27
- │ concrete widgets: Button, Label, CheckBox, RadioButton,
29
+ │ concrete widgets: Button, Label, BitmapLabel, CheckBox, RadioButton,
28
30
  │ ToggleButton/ToggleSwitch, ProgressBar, HSlider/VSlider,
29
31
  │ Rect, Image, EditableText, TextInput, Panel, ViewStack,
30
32
  │ Scroller, UILayer, DataGroup, List, TabBar, ComboBox,
@@ -141,7 +143,7 @@ Flat re-export of 7 barrels, in this order: `core`, `layouts`, `components`,
141
143
 
142
144
  - **core**: `IUIComponent`, `IUIOwner`, `UIState`, `isUIComponent`, `Validator`/`validator`, `Theme`/`getTheme`/`setTheme`, `IViewport`, `IAssetAdapter`/`DefaultAssetAdapter`, `setAssetAdapter`/`getAssetAdapter`, `IThemeAdapter`/`DefaultThemeAdapter`, `Direction`, `ScrollPolicy`, `IDisplayText`, `IItemRenderer`.
143
145
  - **layouts**: `ILayoutTarget`, `LayoutBase`, `BasicLayout`, `LinearLayoutBase`, `VerticalLayout`, `HorizontalLayout`, `TileLayout`, `ColumnAlign`, `RowAlign`, `JustifyAlign`, `TileOrientation`.
144
- - **components**: `Group`/`GroupEvents`, `Component`/`ComponentEvents`, `Skin`/`SkinEvents`; `Button`, `Label`/`TextFitMode` (type), `CheckBox`, `RadioButton`/`RadioButtonGroup`, `ToggleButton`, `ToggleSwitch`, `ProgressBar`, `HSlider`/`VSlider`/`SliderBase`, `Rect`, `Image`, `EditableText`, `TextInput`, `Panel`, `ViewStack`, `Scroller`, `TouchScroll`, `UILayer`, `DataGroup`, `List`/`ListBase`, `TabBar`, `ComboBox`, `ItemRenderer`, `HScrollBar`/`VScrollBar`/`ScrollBarBase`, `Animation`, `Range`.
146
+ - **components**: `Group`/`GroupEvents`, `Component`/`ComponentEvents`, `Skin`/`SkinEvents`; `Button`, `Label`/`TextFitMode` (type), `BitmapLabel`, `CheckBox`, `RadioButton`/`RadioButtonGroup`, `ToggleButton`, `ToggleSwitch`, `ProgressBar`, `HSlider`/`VSlider`/`SliderBase`, `Rect`, `Image`, `EditableText`, `TextInput`, `Panel`, `ViewStack`, `Scroller`, `TouchScroll`, `UILayer`, `DataGroup`, `List`/`ListBase`, `TabBar`, `ComboBox`, `ItemRenderer`, `HScrollBar`/`VScrollBar`/`ScrollBarBase`, `Animation`, `Range`.
145
147
  - **events**: `UIEvent`, `ItemTapEvent`, `CollectionEvent`/`CollectionEventKind`, `PropertyEvent`, `ScrollerThrowEvent`.
146
148
  - **states**: `State`, `IOverride`, `SetProperty`, `SetStateProperty`, `AddItems`.
147
149
  - **collections**: `ICollection`, `ArrayCollection`.
@@ -204,8 +206,19 @@ automatic bounds are not fed back as fit constraints.
204
206
 
205
207
  `label.invalidateSize()` also invalidates Core line metrics. Call it after
206
208
  late font loading, even if the family name did not change. This requires
207
- Core >= 2.1.0; there is no global font-readiness listener.
209
+ Core >= 2.1.0 for that API; UI 3.2.0's package requirement is Core ^2.2.0.
210
+ There is no global font-readiness listener.
208
211
 
209
212
  See [Label text layout](label-text-layout.md) for fit bounds, state restoration,
210
213
  font readiness and shared-schema boundaries. Native UI still depends only on
211
- Core; KUI authoring uses ui-document 0.9.x and matching CLI/runtime releases.
214
+ Core; KUI authoring uses ui-document 0.11.x, published CLI 3.3.0 and
215
+ published ui-runtime 0.8.2. Label presets expand in consumer-owned
216
+ copies before native rendering; UI does not read style.json or consume textStyle.
217
+
218
+ ## Bitmap labels in 3.2.0
219
+
220
+ [bitmap-label.md](bitmap-label.md) documents the new exported BitmapLabel,
221
+ using one BitmapText child and the configured Core resource singleton for string
222
+ font names. Stale async results are guarded by request generation. Core ^2.2.0
223
+ is required; local Core overrides have been removed. Published UI 3.1.0 does
224
+ not contain it. KUI catalog, installed compilers and Editor adoption are separate.