@nativescript-community/ui-core 1.3.0 → 1.4.1
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 +8 -0
- package/formatted-text-common.d.ts +1 -1
- package/formatted-text-common.js +5 -1
- package/formatted-text-common.js.map +1 -1
- package/formatted-text.android.d.ts +1 -1
- package/formatted-text.android.js.map +1 -1
- package/formatted-text.d.ts +2 -1
- package/formatted-text.ios.d.ts +1 -1
- package/formatted-text.ios.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.4.1](https://github.com/nativescript-community/ui-native-components/compare/v1.4.0...v1.4.1) (2026-10-30)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @nativescript-community/ui-core
|
|
9
|
+
|
|
10
|
+
## [1.4.0](https://github.com/nativescript-community/ui-native-components/compare/v1.3.0...v1.4.0) (2026-10-29)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @nativescript-community/ui-core
|
|
13
|
+
|
|
6
14
|
## [1.3.0](https://github.com/nativescript-community/ui-native-components/compare/v1.2.0...v1.3.0) (2026-10-29)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @nativescript-community/ui-core
|
|
@@ -5,4 +5,4 @@ import { FormattedString, TextBase } from '@nativescript/core';
|
|
|
5
5
|
export declare function getTextLib(): {
|
|
6
6
|
createNativeAttributedString?: (...args: any[]) => any;
|
|
7
7
|
} | null;
|
|
8
|
-
export declare function createNativeFormattedTextCommon(formatted: FormattedString, owner?: TextBase, density?: number): any;
|
|
8
|
+
export declare function createNativeFormattedTextCommon(formatted: FormattedString | object, owner?: TextBase, density?: number): any;
|
package/formatted-text-common.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Label } from '@nativescript/core';
|
|
1
|
+
import { FormattedString, Label } from '@nativescript/core';
|
|
2
2
|
let textLib;
|
|
3
3
|
let textLibChecked = false;
|
|
4
4
|
/**
|
|
@@ -20,6 +20,10 @@ export function createNativeFormattedTextCommon(formatted, owner, density) {
|
|
|
20
20
|
if (!formatted) {
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
|
+
// already native (`createNativeAttributedString` of `@nativescript-community/text`...): used as is
|
|
24
|
+
if (!(formatted instanceof FormattedString)) {
|
|
25
|
+
return formatted;
|
|
26
|
+
}
|
|
23
27
|
// the owner gives the default font and color of the spans
|
|
24
28
|
owner = owner || new Label();
|
|
25
29
|
const lib = getTextLib();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatted-text-common.js","sourceRoot":"","sources":["../../src/ui-core/formatted-text-common.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"formatted-text-common.js","sourceRoot":"","sources":["../../src/ui-core/formatted-text-common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,EAAY,MAAM,oBAAoB,CAAC;AAEtE,IAAI,OAAY,CAAC;AACjB,IAAI,cAAc,GAAG,KAAK,CAAC;AAE3B;;GAEG;AACH,MAAM,UAAU,UAAU;IACtB,IAAI,CAAC,cAAc,EAAE,CAAC;QAClB,cAAc,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC;YACD,OAAO,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;QACtD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,GAAG,IAAI,CAAC;QACnB,CAAC;IACL,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,+BAA+B,CAAC,SAAmC,EAAE,KAAgB,EAAE,OAAgB;IACnH,IAAI,CAAC,SAAS,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,mGAAmG;IACnG,IAAI,CAAC,CAAC,SAAS,YAAY,eAAe,CAAC,EAAE,CAAC;QAC1C,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,0DAA0D;IAC1D,KAAK,GAAG,KAAK,IAAI,IAAI,KAAK,EAAE,CAAC;IAC7B,MAAM,GAAG,GAAG,UAAU,EAAE,CAAC;IACzB,IAAI,GAAG,EAAE,4BAA4B,EAAE,CAAC;QACpC,kDAAkD;QAClD,OAAO,GAAG,CAAC,4BAA4B,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;IACxF,CAAC;IACD,OAAQ,KAAa,EAAE,yBAAyB,EAAE,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC;AAC1E,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FormattedString, ImageSource, TextBase } from '@nativescript/core';
|
|
2
|
-
export declare function createNativeFormattedText(formatted: FormattedString, owner?: TextBase): android.text.SpannableStringBuilder;
|
|
2
|
+
export declare function createNativeFormattedText(formatted: FormattedString | object, owner?: TextBase): android.text.SpannableStringBuilder;
|
|
3
3
|
export declare function renderAttributedStringToImage(attributed: any): any;
|
|
4
4
|
export declare function renderFormattedTextToImageSource(formatted: FormattedString, owner: TextBase, fontSize?: number): ImageSource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatted-text.android.js","sourceRoot":"","sources":["../../src/ui-core/formatted-text.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,WAAW,EAAY,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,MAAM,UAAU,yBAAyB,CAAC,
|
|
1
|
+
{"version":3,"file":"formatted-text.android.js","sourceRoot":"","sources":["../../src/ui-core/formatted-text.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,WAAW,EAAY,KAAK,EAAE,MAAM,oBAAoB,C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C;IAC3H,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACtI,MAAM,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IACjD,OAAO,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC"}
|
package/formatted-text.d.ts
CHANGED
|
@@ -3,9 +3,10 @@ import { FormattedString, ImageSource, TextBase } from '@nativescript/core';
|
|
|
3
3
|
/**
|
|
4
4
|
* Creates the native rich text of a FormattedString (spans): a SpannableStringBuilder on Android, a NSAttributedString on iOS.
|
|
5
5
|
* `@nativescript-community/text` is used when it is installed (optional), else the conversion of the core `owner` label.
|
|
6
|
+
* A native rich text (the result of `createNativeAttributedString`) is returned as is.
|
|
6
7
|
* @param owner a label (core or `@nativescript-community/ui-label`) used for the default font and color, a new Label by default
|
|
7
8
|
*/
|
|
8
|
-
export function createNativeFormattedText(formatted: FormattedString, owner?: TextBase): any;
|
|
9
|
+
export function createNativeFormattedText(formatted: FormattedString | object, owner?: TextBase): any;
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* iOS only: draws a NSAttributedString into a (non template) UIImage.
|
package/formatted-text.ios.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FormattedString, ImageSource, TextBase } from '@nativescript/core';
|
|
2
|
-
export declare function createNativeFormattedText(formatted: FormattedString, owner?: TextBase): NSAttributedString;
|
|
2
|
+
export declare function createNativeFormattedText(formatted: FormattedString | object, owner?: TextBase): NSAttributedString;
|
|
3
3
|
export declare function renderAttributedStringToImage(attributed: NSAttributedString): UIImage;
|
|
4
4
|
export declare function renderFormattedTextToImageSource(formatted: FormattedString, owner: TextBase, fontSize?: number): ImageSource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatted-text.ios.js","sourceRoot":"","sources":["../../src/ui-core/formatted-text.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,WAAW,EAAY,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,MAAM,UAAU,yBAAyB,CAAC,
|
|
1
|
+
{"version":3,"file":"formatted-text.ios.js","sourceRoot":"","sources":["../../src/ui-core/formatted-text.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,WAAW,EAAY,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,MAAM,UAAU,yBAAyB,CAAC,SAAmC,EAAE,KAAgB;IAC3F,OAAO,+BAA+B,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,UAA8B;IACxE,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,8CAA8C;IAC9C,MAAM,OAAO,GAAG,yBAAyB,CAAC,KAAK,EAAE,CAAC,wBAAwB,CAAC,UAAU,CAAC,CAAC;IACvF,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,gCAAgC,CAAC,iBAAiB,CAAC,sBAAsB,CAAC,CAAC;IACjH,OAAO,CAAC,0CAA0C,CAAC,8BAA8B,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,EAAE,CAAyC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QACpL,IAAI,CAAC,KAAK,EAAE,CAAC;YACT,OAAO,CAAC,sBAAsB,CAAC,8BAA8B,EAAE,UAAU,EA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
|
1
1
|
{
|
|
2
2
|
"name": "@nativescript-community/ui-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Core module for NativeScript augmented components (Material on Android, native UIKit on iOS)",
|
|
5
5
|
"main": "./index",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"optional": true
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "038bbede0659fcaf43f9f6980b6fd2dc09e1a511"
|
|
58
58
|
}
|