@flighthq/text 0.5.1-next.903.f434bc2 → 0.5.1-next.905.5fbf787
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 +2 -2
- package/package.json +9 -9
- package/src/nativeText.test.ts +7 -1
- package/src/richText.test.ts +7 -1
- package/src/textLabel.test.ts +7 -1
package/README.md
CHANGED
|
@@ -13,5 +13,5 @@ Import the supported application-facing API from `@flighthq/text`. The `@flighth
|
|
|
13
13
|
This package is part of the locked-version Flight SDK graph. Applications may instead install and import `@flighthq/sdk` when package-level tree shaking is sufficient.
|
|
14
14
|
|
|
15
15
|
- [Flight project](https://github.com/flighthq/flight)
|
|
16
|
-
- [Source for @flighthq/text@0.5.1-next.
|
|
17
|
-
- [License](https://github.com/flighthq/flight/blob/
|
|
16
|
+
- [Source for @flighthq/text@0.5.1-next.905.5fbf787](https://github.com/flighthq/flight/tree/5fbf7874064c384307542d68b4dcb6a895ff0dcf/packages/text)
|
|
17
|
+
- [License](https://github.com/flighthq/flight/blob/5fbf7874064c384307542d68b4dcb6a895ff0dcf/LICENSE.md)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flighthq/text",
|
|
3
|
-
"version": "0.5.1-next.
|
|
3
|
+
"version": "0.5.1-next.905.5fbf787",
|
|
4
4
|
"author": "Joshua Granick and other contributors",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"clean:dist": "tsx ../../scripts/clean-package-dist.ts"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@flighthq/scene2d": "0.5.1-next.
|
|
42
|
-
"@flighthq/entity": "0.5.1-next.
|
|
43
|
-
"@flighthq/geometry": "0.5.1-next.
|
|
44
|
-
"@flighthq/log": "0.5.1-next.
|
|
45
|
-
"@flighthq/node": "0.5.1-next.
|
|
46
|
-
"@flighthq/signals": "0.5.1-next.
|
|
47
|
-
"@flighthq/textlayout": "0.5.1-next.
|
|
48
|
-
"@flighthq/types": "0.5.1-next.
|
|
41
|
+
"@flighthq/scene2d": "0.5.1-next.905.5fbf787",
|
|
42
|
+
"@flighthq/entity": "0.5.1-next.905.5fbf787",
|
|
43
|
+
"@flighthq/geometry": "0.5.1-next.905.5fbf787",
|
|
44
|
+
"@flighthq/log": "0.5.1-next.905.5fbf787",
|
|
45
|
+
"@flighthq/node": "0.5.1-next.905.5fbf787",
|
|
46
|
+
"@flighthq/signals": "0.5.1-next.905.5fbf787",
|
|
47
|
+
"@flighthq/textlayout": "0.5.1-next.905.5fbf787",
|
|
48
|
+
"@flighthq/types": "0.5.1-next.905.5fbf787"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"typescript": "^5.3.0"
|
package/src/nativeText.test.ts
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
getNativeTextRuntime,
|
|
18
18
|
getNativeTextString,
|
|
19
19
|
getNativeTextStyle,
|
|
20
|
+
initializeNativeTextData,
|
|
20
21
|
patchNativeTextStyle,
|
|
21
22
|
setNativeTextAutoSize,
|
|
22
23
|
setNativeTextHeight,
|
|
@@ -173,6 +174,12 @@ describe('getNativeTextStyle', () => {
|
|
|
173
174
|
});
|
|
174
175
|
});
|
|
175
176
|
|
|
177
|
+
describe('initializeNativeTextData', () => {
|
|
178
|
+
it('is the construction initializer of createNativeTextData', () => {
|
|
179
|
+
expect(typeof initializeNativeTextData).toBe('function');
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
|
|
176
183
|
describe('patchNativeTextStyle', () => {
|
|
177
184
|
it('merges the patch into the existing style', () => {
|
|
178
185
|
const native = createNativeText({ data: { style: { size: 14, bold: false } } });
|
|
@@ -271,7 +278,6 @@ describe('setNativeTextVerticalAlign', () => {
|
|
|
271
278
|
expect(getNodeLocalContentRevision(native)).toBe(content);
|
|
272
279
|
});
|
|
273
280
|
});
|
|
274
|
-
|
|
275
281
|
describe('setNativeTextWidth', () => {
|
|
276
282
|
it('sets width, bumps content, and invalidates local bounds', () => {
|
|
277
283
|
const native = createNativeText();
|
package/src/richText.test.ts
CHANGED
|
@@ -40,6 +40,7 @@ import {
|
|
|
40
40
|
getRichTextTextHeight,
|
|
41
41
|
getRichTextTextWidth,
|
|
42
42
|
getTextFieldSignals,
|
|
43
|
+
initializeTextFieldSignals,
|
|
43
44
|
insertRichTextString,
|
|
44
45
|
removeRichTextFormatRangesIn,
|
|
45
46
|
replaceRichTextString,
|
|
@@ -698,6 +699,12 @@ describe('getTextFieldSignals', () => {
|
|
|
698
699
|
});
|
|
699
700
|
});
|
|
700
701
|
|
|
702
|
+
describe('initializeTextFieldSignals', () => {
|
|
703
|
+
it('is the construction initializer of createTextFieldSignals', () => {
|
|
704
|
+
expect(typeof initializeTextFieldSignals).toBe('function');
|
|
705
|
+
});
|
|
706
|
+
});
|
|
707
|
+
|
|
701
708
|
describe('insertRichTextString', () => {
|
|
702
709
|
it('inserts the value at the clamped index', () => {
|
|
703
710
|
const richText = createRichText({ data: { text: 'held' } });
|
|
@@ -1242,7 +1249,6 @@ describe('setRichTextWidth', () => {
|
|
|
1242
1249
|
expect(getNodeLocalContentRevision(richText)).toBe(content);
|
|
1243
1250
|
});
|
|
1244
1251
|
});
|
|
1245
|
-
|
|
1246
1252
|
describe('setRichTextWordWrap', () => {
|
|
1247
1253
|
it('sets wordWrap, bumps content, and invalidates bounds', () => {
|
|
1248
1254
|
const richText = createRichText();
|
package/src/textLabel.test.ts
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
getTextLabelFormat,
|
|
18
18
|
getTextLabelRuntime,
|
|
19
19
|
getTextLabelString,
|
|
20
|
+
initializeTextLabelData,
|
|
20
21
|
setTextLabelAutoSize,
|
|
21
22
|
setTextLabelFormat,
|
|
22
23
|
setTextLabelHeight,
|
|
@@ -180,6 +181,12 @@ describe('getTextLabelString', () => {
|
|
|
180
181
|
});
|
|
181
182
|
});
|
|
182
183
|
|
|
184
|
+
describe('initializeTextLabelData', () => {
|
|
185
|
+
it('is the construction initializer of createTextLabelData', () => {
|
|
186
|
+
expect(typeof initializeTextLabelData).toBe('function');
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
|
|
183
190
|
describe('setTextLabelAutoSize', () => {
|
|
184
191
|
it('sets autoSize, bumps content, and invalidates local bounds', () => {
|
|
185
192
|
const text = createTextLabel();
|
|
@@ -279,7 +286,6 @@ describe('setTextLabelVerticalAlign', () => {
|
|
|
279
286
|
expect(getNodeLocalContentRevision(text)).toBe(content);
|
|
280
287
|
});
|
|
281
288
|
});
|
|
282
|
-
|
|
283
289
|
describe('setTextLabelWidth', () => {
|
|
284
290
|
it('sets width, bumps content, and invalidates local bounds', () => {
|
|
285
291
|
const text = createTextLabel();
|