@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 +29 -0
- package/README.md +107 -47
- package/dist/kurot/components/BitmapLabel.d.ts +46 -0
- package/dist/kurot/components/BitmapLabel.d.ts.map +1 -0
- package/dist/kurot/components/BitmapLabel.js +180 -0
- package/dist/kurot/components/BitmapLabel.js.map +1 -0
- package/dist/kurot/components/index.d.ts +1 -0
- package/dist/kurot/components/index.d.ts.map +1 -1
- package/dist/kurot/components/index.js +1 -0
- package/dist/kurot/components/index.js.map +1 -1
- package/docs/ai-context.md +19 -6
- package/docs/architecture.md +397 -408
- package/docs/bitmap-label.md +41 -0
- package/docs/label-text-layout.md +8 -3
- package/package.json +4 -4
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# BitmapLabel
|
|
2
|
+
|
|
3
|
+
Available in UI 3.2.0 with `@kurot/core ^2.2.0`. Core resolves its published
|
|
4
|
+
@kurot/bitmap-font dependency from npm. UI 3.2.0 is prepared for publication;
|
|
5
|
+
published UI 3.1.0 does not contain this component. Core 2.1.1 does not contain
|
|
6
|
+
its required BitmapText rendering.
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
import { BitmapLabel } from '@kurot/ui';
|
|
10
|
+
|
|
11
|
+
const label = new BitmapLabel('1,234.56');
|
|
12
|
+
label.font = 'number_font_fnt';
|
|
13
|
+
label.multiline = false;
|
|
14
|
+
label.height = 100;
|
|
15
|
+
group.addChild(label);
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
`font` accepts a BitmapFont, a configured resource name, or undefined to clear.
|
|
19
|
+
Names resolve through the Core resource singleton. Preloaded names resolve
|
|
20
|
+
synchronously during commitProperties; unloaded names start resource.load.
|
|
21
|
+
Successful name resolution dispatches Event.COMPLETE; failed or incorrectly
|
|
22
|
+
typed resources dispatch IOErrorEvent.IO_ERROR with source/error data.
|
|
23
|
+
Superseded asynchronous requests cannot overwrite a newer font assignment,
|
|
24
|
+
including A-to-B-to-A changes. The resource cache or caller retains ownership.
|
|
25
|
+
|
|
26
|
+
Text assignments dispatch PropertyEvent.PROPERTY_CHANGE for binding. The
|
|
27
|
+
component participates in normal layout, measurement and invalidation and owns
|
|
28
|
+
one BitmapText child. Parent width constraints affect wrapping; measurements do
|
|
29
|
+
not leave temporary width/height constraints on that child. textWidth/textHeight
|
|
30
|
+
report content under the width constraint before height clipping.
|
|
31
|
+
|
|
32
|
+
Properties: text, font, textAlign, verticalAlign, letterSpacing, lineSpacing,
|
|
33
|
+
multiline and smoothing, plus ordinary Component properties. Tint is the ordinary
|
|
34
|
+
DisplayObject tint. Alignments position glyphs without scaling them. Set scaleX
|
|
35
|
+
and scaleY for decorative number sizing. Default multiline=true; explicit false
|
|
36
|
+
keeps the first hard-separated line unwrapped.
|
|
37
|
+
|
|
38
|
+
This initial change exposes a native UI component and supports programmatic
|
|
39
|
+
skins. The ui-document built-in catalog, CLI KUI tag registry, Editor and
|
|
40
|
+
ui-runtime materializers do not yet adopt BitmapLabel. Those require coordinated
|
|
41
|
+
consumer releases; do not assume an installed compiler accepts the XML tag.
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
# Label text layout and fitting
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Introduced in UI 3.1.0 with Core >= 2.1.0, this contract is unchanged in UI 3.2.0,
|
|
4
|
+
which requires Core ^2.2.0. The public
|
|
4
5
|
`TextFitMode` type is `none | shrink`. Native UI depends only on Core. KUI
|
|
5
|
-
authoring
|
|
6
|
-
|
|
6
|
+
authoring introduced fitting metadata in ui-document 0.9.0 and retains it in
|
|
7
|
+
0.11.0. Published CLI 3.3.0 and ui-runtime 0.8.2 use ui-document `^0.11.0`.
|
|
8
|
+
Runtime 0.8.0's `^0.9.0` and runtime 0.8.1's `^0.10.0` peer ranges exclude
|
|
9
|
+
the current kernel. Label presets are expanded into native properties before
|
|
10
|
+
rendering; their precedence does not change fitting behavior. See the
|
|
11
|
+
[project style contract](../../ui-document/docs/project-styles.md).
|
|
7
12
|
|
|
8
13
|
## Lines and bounds
|
|
9
14
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kurot/ui",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "EUI-compatible UI component framework for the Kurot game engine
|
|
3
|
+
"version": "3.2.0",
|
|
4
|
+
"description": "EUI-compatible UI component framework for the Kurot game engine \u2014 skin-based components, layouts, data binding, view states",
|
|
5
5
|
"author": "Kelvin <kyia.x52@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"prepublishOnly": "npm run clean && npm run build"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@kurot/core": "^2.
|
|
36
|
+
"@kurot/core": "^2.2.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@kurot/core": "^2.
|
|
39
|
+
"@kurot/core": "^2.2.0",
|
|
40
40
|
"@playwright/test": "1.62.1",
|
|
41
41
|
"@types/node": "^22.0.0",
|
|
42
42
|
"happy-dom": "^20.8.9",
|