@triniwiz/nativescript-masonkit 1.0.0-beta.61 → 1.0.0-beta.63

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 (81) hide show
  1. package/DOCS.md +5 -5
  2. package/button/index.ios.js +2 -2
  3. package/button/index.ios.js.map +1 -1
  4. package/common.d.ts +8 -1
  5. package/common.js +183 -140
  6. package/common.js.map +1 -1
  7. package/img/index.ios.js +4 -2
  8. package/img/index.ios.js.map +1 -1
  9. package/index.android.d.ts +2 -0
  10. package/index.android.js +2 -0
  11. package/index.android.js.map +1 -1
  12. package/index.d.ts +10 -0
  13. package/index.ios.d.ts +2 -0
  14. package/index.ios.js +2 -0
  15. package/index.ios.js.map +1 -1
  16. package/input/index.ios.js +10 -2
  17. package/input/index.ios.js.map +1 -1
  18. package/li/index.android.d.ts +12 -0
  19. package/li/index.android.js +57 -0
  20. package/li/index.android.js.map +1 -0
  21. package/li/index.ios.d.ts +14 -0
  22. package/li/index.ios.js +125 -0
  23. package/li/index.ios.js.map +1 -0
  24. package/list/common.d.ts +33 -0
  25. package/list/common.js +157 -0
  26. package/list/common.js.map +1 -0
  27. package/list/index.android.d.ts +28 -0
  28. package/list/index.android.js +155 -0
  29. package/list/index.android.js.map +1 -0
  30. package/list/index.ios.d.ts +42 -0
  31. package/list/index.ios.js +321 -0
  32. package/list/index.ios.js.map +1 -0
  33. package/package.json +1 -1
  34. package/platforms/android/masonkit-release.aar +0 -0
  35. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +110 -24
  36. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/mason_native.h +57 -8
  37. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
  38. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  39. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +63643 -39594
  40. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +777 -226
  41. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  42. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftinterface +777 -226
  43. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  44. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +8210 -7413
  45. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +220 -48
  46. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/mason_native.h +57 -8
  47. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
  48. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  49. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  50. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +63643 -39594
  51. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +777 -226
  52. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  53. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftinterface +777 -226
  54. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +63643 -39594
  55. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +777 -226
  56. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  57. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +777 -226
  58. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +28 -28
  59. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  60. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +8205 -7408
  61. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/x86_64/Mason.yml +7869 -7103
  62. package/properties.d.ts +12 -1
  63. package/properties.js +57 -0
  64. package/properties.js.map +1 -1
  65. package/scroll/index.ios.js +6 -2
  66. package/scroll/index.ios.js.map +1 -1
  67. package/style.d.ts +22 -3
  68. package/style.js +512 -235
  69. package/style.js.map +1 -1
  70. package/text/index.ios.js +5 -2
  71. package/text/index.ios.js.map +1 -1
  72. package/tree/index.android.d.ts +2 -0
  73. package/tree/index.android.js +6 -0
  74. package/tree/index.android.js.map +1 -1
  75. package/tree/index.ios.d.ts +3 -1
  76. package/tree/index.ios.js +7 -1
  77. package/tree/index.ios.js.map +1 -1
  78. package/utils/index.android.d.ts +11 -0
  79. package/utils/index.ios.d.ts +11 -0
  80. package/view/index.ios.js +20 -4
  81. package/view/index.ios.js.map +1 -1
package/DOCS.md CHANGED
@@ -869,11 +869,11 @@ function onTap() {
869
869
  import { registerElement } from '@nativescript/angular';
870
870
  import { View, Text, Div, H1, P } from '@triniwiz/nativescript-masonkit';
871
871
 
872
- registerElement('MasonView', () => View);
873
- registerElement('MasonText', () => Text);
874
- registerElement('MasonDiv', () => Div);
875
- registerElement('MasonH1', () => H1);
876
- registerElement('MasonP', () => P);
872
+ registerElement('view', () => View);
873
+ registerElement('text', () => Text);
874
+ registerElement('div', () => Div);
875
+ registerElement('h1', () => H1);
876
+ registerElement('p', () => P);
877
877
  ```
878
878
 
879
879
  ```html
@@ -65,8 +65,8 @@ let Button = class Button extends ButtonBase {
65
65
  const specHeight = Utils.layout.getMeasureSpecSize(heightMeasureSpec);
66
66
  const heightMode = Utils.layout.getMeasureSpecMode(heightMeasureSpec);
67
67
  if (!this[isMasonView_]) {
68
- // only call compute on the parent
69
- if (this.width === 'auto' && this.height === 'auto') {
68
+ const unconstrained = widthMode === Utils.layout.UNSPECIFIED || heightMode === Utils.layout.UNSPECIFIED || (widthMode === Utils.layout.AT_MOST && specWidth === 0) || (heightMode === Utils.layout.AT_MOST && specHeight === 0);
69
+ if (this.width === 'auto' && this.height === 'auto' && !unconstrained) {
70
70
  // todo
71
71
  // @ts-ignore
72
72
  this.ios.mason_computeWithSize(specWidth, specHeight);
@@ -1 +1 @@
1
- {"version":3,"file":"index.ios.js","sourceRoot":"","sources":["../../../../packages/nativescript-masonkit/button/index.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAY,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,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C,UAAe,EAAE,KAAa;QAChD,UAAU,CAAC,KAAK,GAAG,KAAK,CAAC;IAC3B,CAAC;CACF,CAAA;AA7KY,MAAM;IADlB,OAAO,CAAC,QAAQ,CAAC;;GACL,MAAM,CA6KlB"}
package/common.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AddChildFromBuilder, CustomLayoutView, View as NSView, ViewBase as NSViewBase, Property, CoreTypes } from '@nativescript/core';
2
- import { Display, Gap, GridAutoFlow, JustifyItems, JustifySelf, Length, LengthAuto, Overflow, Position, BoxSizing, VerticalAlign, FlexDirection } from '.';
2
+ import { Display, Gap, GridAutoFlow, JustifyItems, JustifySelf, Length, LengthAuto, Overflow, Position, BoxSizing, VerticalAlign, FlexDirection, Float, Clear } from '.';
3
3
  import { isMasonView_, isTextChild_, isText_, native_ } from './symbols';
4
4
  import { TextNode } from './text-node';
5
5
  export interface MasonChild extends ViewBase {
@@ -51,6 +51,9 @@ declare module '@nativescript/core/ui/styling/style' {
51
51
  verticalAlign: VerticalAlign;
52
52
  textWrap: 'nowrap' | 'wrap' | 'balance';
53
53
  textOverFlow: 'clip' | 'ellipsis' | `${string}`;
54
+ float: Float;
55
+ clear: Clear;
56
+ cornerShape: string;
54
57
  }
55
58
  }
56
59
  export declare class ViewBase extends CustomLayoutView implements AddChildFromBuilder {
@@ -97,6 +100,10 @@ export declare class ViewBase extends CustomLayoutView implements AddChildFromBu
97
100
  get textWrap(): "nowrap" | "wrap" | "balance";
98
101
  set aspectRatio(value: number);
99
102
  get aspectRatio(): number;
103
+ private _createOrUpdateNativeTextNode;
104
+ private _nativeAddChild;
105
+ private _nativeReplaceChild;
106
+ private _setOrPushChild;
100
107
  private _updateTextNode;
101
108
  set text(value: string);
102
109
  get filter(): string;
package/common.js CHANGED
@@ -4,7 +4,7 @@ var _a, _b, _c;
4
4
  import { CustomLayoutView, View as NSView, getViewById, Property, widthProperty, heightProperty, Length as CoreLength, PercentLength as CorePercentLength, marginLeftProperty, marginRightProperty, marginTopProperty, marginBottomProperty, minWidthProperty, minHeightProperty, fontSizeProperty, fontWeightProperty, fontStyleProperty, colorProperty, Color, lineHeightProperty, letterSpacingProperty, textAlignmentProperty, borderLeftWidthProperty, borderTopWidthProperty, borderRightWidthProperty, borderBottomWidthProperty, backgroundColorProperty, paddingLeftProperty, paddingRightProperty, paddingTopProperty, paddingBottomProperty, zIndexProperty } from '@nativescript/core';
5
5
  import { alignItemsProperty, alignSelfProperty, flexDirectionProperty, flexGrowProperty, flexShrinkProperty, flexWrapProperty, justifyContentProperty } from '@nativescript/core/ui/layouts/flexbox-layout';
6
6
  import { _forceStyleUpdate } from './utils';
7
- import { alignContentProperty, aspectRatioProperty, backgroundProperty, borderProperty, borderRadiusProperty, bottomProperty, boxSizingProperty, columnGapProperty, displayProperty, filterProperty, flexBasisProperty, gridAreaProperty, gridAutoColumnsProperty, gridAutoFlowProperty, gridAutoRowsProperty, gridColumnEndProperty, gridColumnProperty, gridColumnStartProperty, gridRowEndProperty, gridRowProperty, gridRowStartProperty, gridTemplateAreasProperty, gridTemplateColumnsProperty, gridTemplateRowsProperty, justifyItemsProperty, justifySelfProperty, leftProperty, marginProperty, maxHeightProperty, maxWidthProperty, overflowXProperty, overflowYProperty, paddingProperty, positionProperty, rightProperty, rowGapProperty, scrollBarWidthProperty, textOverFlowProperty, textWrapProperty, topProperty, verticalAlignProperty, } from './properties';
7
+ import { alignContentProperty, aspectRatioProperty, backgroundProperty, borderProperty, borderRadiusProperty, bottomProperty, boxSizingProperty, clearProperty, columnGapProperty, cornerShapeProperty, displayProperty, filterProperty, flexBasisProperty, floatProperty, gridAreaProperty, gridAutoColumnsProperty, gridAutoFlowProperty, gridAutoRowsProperty, gridColumnEndProperty, gridColumnProperty, gridColumnStartProperty, gridRowEndProperty, gridRowProperty, gridRowStartProperty, gridTemplateAreasProperty, gridTemplateColumnsProperty, gridTemplateRowsProperty, justifyItemsProperty, justifySelfProperty, leftProperty, marginProperty, maxHeightProperty, maxWidthProperty, overflowXProperty, overflowYProperty, paddingProperty, positionProperty, rightProperty, rowGapProperty, scrollBarWidthProperty, textOverFlowProperty, textWrapProperty, topProperty, verticalAlignProperty, } from './properties';
8
8
  import { isMasonView_, isTextChild_, isText_, isPlaceholder_, text_, native_, textNode_, textNodeIndex_ } from './symbols';
9
9
  import { Tree } from './tree';
10
10
  import { TextNode } from './text-node';
@@ -12,22 +12,60 @@ function getViewStyle(view) {
12
12
  const ret = (__ANDROID__ ? view.get() : view.deref());
13
13
  return ret._styleHelper;
14
14
  }
15
- let frameWork = 0 /* FrameWork.Core */;
16
- try {
17
- global.VUE3_ELEMENT_REF = require('nativescript-vue').ELEMENT_REF;
18
- frameWork = 2 /* FrameWork.Vue */;
19
- }
20
- catch (e) { }
21
- try {
22
- const helper = require('react-nativescript/dist/nativescript-vue-next/runtime/runtimeHelpers.js');
23
- global.REACT_ELEMENT_REF = helper.ELEMENT_REF;
24
- frameWork = 3 /* FrameWork.React */;
25
- }
26
- catch (e) { }
27
- if (global.__ngRegisteredViews || typeof Zone !== 'undefined') {
28
- frameWork = 1 /* FrameWork.Angular */;
15
+ /**
16
+ * Cached per-view accessor for the framework's virtual DOM element.
17
+ * The accessor is a function that retrieves the element cheaply on subsequent calls.
18
+ * We use `false` as a sentinel to indicate "no framework detected" (avoids re-scanning).
19
+ */
20
+ const _frameworkAccessorCache = new WeakMap();
21
+ function getFrameworkElement(view) {
22
+ const cached = _frameworkAccessorCache.get(view);
23
+ if (cached === false)
24
+ return null;
25
+ if (cached)
26
+ return cached(view);
27
+ // First call: detect framework and cache the accessor
28
+ const symbols = Object.getOwnPropertySymbols(view);
29
+ // Vue 3 (nativescript-vue): stores ELEMENT_REF symbol on native view
30
+ for (const sym of symbols) {
31
+ if (sym.description === 'elementRef' || sym.description === '') {
32
+ const el = view[sym];
33
+ if (el && Array.isArray(el.childNodes)) {
34
+ _frameworkAccessorCache.set(view, (v) => v[sym]);
35
+ return el;
36
+ }
37
+ }
38
+ }
39
+ // React (react-nativescript): stores __reactFiber$ symbol on node
40
+ for (const sym of symbols) {
41
+ if (sym.description?.startsWith('__reactFiber$')) {
42
+ if (Array.isArray(view.childNodes)) {
43
+ _frameworkAccessorCache.set(view, (v) => v);
44
+ return view;
45
+ }
46
+ }
47
+ }
48
+ // Svelte (svelte-native): stores __SvelteNativeElement__ on native view
49
+ if (view.__SvelteNativeElement__) {
50
+ const el = view.__SvelteNativeElement__;
51
+ if (Array.isArray(el.childNodes)) {
52
+ _frameworkAccessorCache.set(view, (v) => v.__SvelteNativeElement__);
53
+ return el;
54
+ }
55
+ }
56
+ // SolidJS (dominative): the element IS the native view, extended with DOM methods
57
+ if (view.__dominative_isNative) {
58
+ _frameworkAccessorCache.set(view, (v) => v);
59
+ return view;
60
+ }
61
+ // Angular (@nativescript/angular): uses firstChild/nextSibling linked list
62
+ if (view.firstChild !== undefined && view.meta?.skipAddToDom !== undefined) {
63
+ _frameworkAccessorCache.set(view, (v) => v);
64
+ return view;
65
+ }
66
+ _frameworkAccessorCache.set(view, false);
67
+ return null;
29
68
  }
30
- // @ts-ignore
31
69
  export const textContentProperty = new Property({
32
70
  name: 'textContent',
33
71
  affectsLayout: true,
@@ -404,151 +442,133 @@ export class ViewBase extends CustomLayoutView {
404
442
  style.aspectRatio = value;
405
443
  }
406
444
  }
407
- _updateTextNode(node, operation = null) {
408
- let textNode;
409
- if (__ANDROID__) {
410
- if (node[textNode_]) {
411
- node[textNode_].setData(node.text ?? '');
412
- textNode = node[textNode_];
413
- }
414
- else {
415
- textNode = new org.nativescript.mason.masonkit.TextNode(Tree.instance.native, node.text ?? '');
416
- node[textNode_] = textNode;
445
+ // -- Platform bridge methods for native text node operations --
446
+ _createOrUpdateNativeTextNode(node, text) {
447
+ if (node[textNode_]) {
448
+ if (__ANDROID__) {
449
+ node[textNode_].setData(text);
417
450
  }
418
- if (operation) {
419
- switch (operation.type) {
420
- case 'add':
421
- //@ts-ignore
422
- this._view.addChildAt(textNode, this._children.length);
423
- //@ts-ignore
424
- this._children.push({ [text_]: node.text, [textNode_]: textNode, [textNodeIndex_]: this._children.length });
425
- break;
426
- case 'replace':
427
- //@ts-ignore
428
- this._view.replaceChildAt(textNode, operation.index);
429
- if (this._children.length >= operation.index) {
430
- //@ts-ignore
431
- this._children[operation.index] = { text: node.text, [textNode_]: textNode, [textNodeIndex_]: operation.index };
432
- }
433
- else {
434
- //@ts-ignore
435
- this._children.push({ text: node.text, [textNode_]: textNode, [textNodeIndex_]: operation.index });
436
- }
437
- break;
438
- case 'insert':
439
- //@ts-ignore
440
- this._view.addChildAt(textNode, operation.index);
441
- if (this._children.length >= operation.index) {
442
- //@ts-ignore
443
- this._children[operation.index] = { text: node.text, [textNode_]: textNode, [textNodeIndex_]: operation.index };
444
- }
445
- else {
446
- //@ts-ignore
447
- this._children.push({ text: node.text, [textNode_]: textNode, [textNodeIndex_]: operation.index });
448
- }
449
- break;
450
- }
451
+ if (__APPLE__) {
452
+ node[textNode_].data = text;
451
453
  }
454
+ return node[textNode_];
455
+ }
456
+ let textNode;
457
+ if (__ANDROID__) {
458
+ textNode = new org.nativescript.mason.masonkit.TextNode(Tree.instance.native, text);
452
459
  }
453
460
  if (__APPLE__) {
454
- if (node[textNode_]) {
455
- node[textNode_].data = node.text;
456
- textNode = node[textNode_];
457
- if (operation && 'index' in operation && node[textNodeIndex_] === operation.index) {
458
- return;
459
- }
460
- }
461
- else {
462
- textNode = MasonTextNode.alloc().initWithMasonDataAttributes(Tree.instance.native, node.text, null);
463
- node[textNode_] = textNode;
464
- node[textNodeIndex_] = operation?.index ?? this._children.length;
465
- }
466
- if (operation) {
467
- switch (operation.type) {
468
- case 'add':
469
- //@ts-ignore
470
- this._view.mason_addChildAtNode(textNode, this._children.length);
471
- //@ts-ignore
472
- this._children.push({ [text_]: node.text, [textNode_]: textNode, [textNodeIndex_]: this._children.length });
473
- break;
474
- case 'replace':
475
- //@ts-ignore
476
- this._view.mason_replaceChildAtNode(textNode, operation.index);
477
- if (this._children.length >= operation.index) {
478
- //@ts-ignore
479
- this._children[operation.index] = { text: node.text, [textNode_]: textNode, [textNodeIndex_]: operation.index };
480
- }
481
- else {
482
- //@ts-ignore
483
- this._children.push({ text: node.text, [textNode_]: textNode, [textNodeIndex_]: operation.index });
484
- }
485
- break;
486
- case 'insert':
487
- //@ts-ignore
488
- this._view.mason_addChildAtNode(textNode, operation.index);
489
- if (this._children.length >= operation.index) {
490
- //@ts-ignore
491
- this._children[operation.index] = { text: node.text, [textNode_]: textNode, [textNodeIndex_]: operation.index };
492
- }
493
- else {
494
- //@ts-ignore
495
- this._children.push({ text: node.text, [textNode_]: textNode, [textNodeIndex_]: operation.index });
496
- }
497
- break;
498
- }
499
- }
461
+ textNode = MasonTextNode.alloc().initWithMasonDataAttributes(Tree.instance.native, text, null);
500
462
  }
463
+ node[textNode_] = textNode;
464
+ return textNode;
501
465
  }
466
+ _nativeAddChild(textNode, index) {
467
+ //@ts-ignore
468
+ if (__ANDROID__)
469
+ this._view.addChildAt(textNode, index);
470
+ //@ts-ignore
471
+ if (__APPLE__)
472
+ this._view.mason_addChildAtNode(textNode, index);
473
+ }
474
+ _nativeReplaceChild(textNode, index) {
475
+ //@ts-ignore
476
+ if (__ANDROID__)
477
+ this._view.replaceChildAt(textNode, index);
478
+ //@ts-ignore
479
+ if (__APPLE__)
480
+ this._view.mason_replaceChildAtNode(textNode, index);
481
+ }
482
+ _setOrPushChild(index, entry) {
483
+ if (this._children.length > index) {
484
+ //@ts-ignore
485
+ this._children[index] = entry;
486
+ }
487
+ else {
488
+ //@ts-ignore
489
+ this._children.push(entry);
490
+ }
491
+ }
492
+ // -- Unified text node update (cross-platform) --
493
+ _updateTextNode(node, operation = null) {
494
+ const text = node.text ?? node.data ?? '';
495
+ const textNode = this._createOrUpdateNativeTextNode(node, text);
496
+ if (!operation)
497
+ return;
498
+ const entry = { [text_]: text, [textNode_]: textNode, [textNodeIndex_]: operation.index ?? this._children.length };
499
+ switch (operation.type) {
500
+ case 'add':
501
+ this._nativeAddChild(textNode, this._children.length);
502
+ //@ts-ignore
503
+ this._children.push({ ...entry, [textNodeIndex_]: this._children.length });
504
+ break;
505
+ case 'replace':
506
+ this._nativeReplaceChild(textNode, operation.index);
507
+ this._setOrPushChild(operation.index, entry);
508
+ break;
509
+ case 'insert':
510
+ this._nativeAddChild(textNode, operation.index);
511
+ this._setOrPushChild(operation.index, entry);
512
+ break;
513
+ }
514
+ }
515
+ // -- Text setter with per-view framework detection --
502
516
  set text(value) {
503
- if ((frameWork === 2 /* FrameWork.Vue */ && global.VUE3_ELEMENT_REF) || (frameWork === 3 /* FrameWork.React */ && global.REACT_ELEMENT_REF)) {
504
- const view_ref = this[global.VUE3_ELEMENT_REF] ?? this[global.REACT_ELEMENT_REF];
505
- if (Array.isArray(view_ref.childNodes)) {
506
- if (view_ref.childNodes.length === 0) {
517
+ const frameworkEl = getFrameworkElement(this);
518
+ if (frameworkEl) {
519
+ // Frameworks with childNodes array (Vue, React, Svelte, SolidJS)
520
+ if (Array.isArray(frameworkEl.childNodes)) {
521
+ const childNodes = frameworkEl.childNodes;
522
+ if (childNodes.length === 0) {
507
523
  this.replaceChild({ [text_]: value }, 0);
508
524
  return;
509
525
  }
510
- if (view_ref.childNodes.length === 1) {
511
- const node = view_ref.childNodes[0];
512
- if (node && node.nodeType === 'text') {
513
- this._updateTextNode(node, { type: 'add' });
526
+ for (let i = 0; i < childNodes.length; i++) {
527
+ const node = childNodes[i];
528
+ const isTextNode = node.nodeType === 'text' || node.nodeType === 3;
529
+ if (isTextNode) {
530
+ const type = i === 0 && childNodes.length === 1 && !this._children.length ? 'add' : 'replace';
531
+ this._updateTextNode(node, { type, index: i, isBreak: node.nodeName === 'br' });
514
532
  }
515
- return;
516
533
  }
517
- view_ref.childNodes.forEach((node, index) => {
518
- if (node.nodeType === 'text') {
519
- this._updateTextNode(node, { type: 'replace', index, isBreak: node.nodeName === 'br' });
534
+ return;
535
+ }
536
+ // Frameworks with linked-list traversal (Angular)
537
+ if ('firstChild' in frameworkEl) {
538
+ const nodes = [];
539
+ let child = frameworkEl.firstChild;
540
+ while (child) {
541
+ nodes.push(child);
542
+ child = child.nextSibling;
543
+ }
544
+ for (let i = 0; i < nodes.length; i++) {
545
+ const node = nodes[i];
546
+ const isTextNode = node.nodeType === 'text' || node.nodeType === 3 || node.nodeName === 'TextNode' || node.constructor?.name === 'TextNode';
547
+ if (isTextNode || node.nodeName === 'br') {
548
+ this._updateTextNode(node, { type: 'replace', index: i, isBreak: node.nodeName === 'br' });
520
549
  }
521
- });
550
+ }
551
+ return;
522
552
  }
523
- return;
524
553
  }
554
+ // NativeScript Core: linked-list traversal on the view itself
525
555
  if ('firstChild' in this) {
526
- function getTextNodes(root) {
527
- const result = [];
528
- let node = root.firstChild;
529
- while (node) {
530
- result.push(node);
531
- node = node.nextSibling;
532
- }
533
- return result;
556
+ const nodes = [];
557
+ let child = this.firstChild;
558
+ while (child) {
559
+ nodes.push(child);
560
+ child = child.nextSibling;
534
561
  }
535
- const nodes = getTextNodes(this);
536
- for (const [index, node] of nodes.entries()) {
537
- if (node.nodeType === 'text' || node.nodeName === 'TextNode' || node.constructor.name === 'TextNode') {
538
- const existing = this._children[index];
539
- if (existing && Object.is(existing['node'], node)) {
540
- // todo direct set text
541
- this._updateTextNode(node, { type: 'replace', index });
542
- continue;
543
- }
544
- this._updateTextNode(node, { type: 'replace', index });
545
- }
546
- else if (node.nodeName === 'br') {
547
- this._updateTextNode(node, { type: 'replace', index, isBreak: true });
562
+ for (let i = 0; i < nodes.length; i++) {
563
+ const node = nodes[i];
564
+ const isTextNode = node.nodeType === 'text' || node.nodeName === 'TextNode' || node.constructor?.name === 'TextNode';
565
+ if (isTextNode || node.nodeName === 'br') {
566
+ this._updateTextNode(node, { type: 'replace', index: i, isBreak: node.nodeName === 'br' });
548
567
  }
549
568
  }
550
569
  return;
551
570
  }
571
+ // Fallback: direct textContent
552
572
  if ('textContent' in this) {
553
573
  // @ts-ignore
554
574
  this.textContent = value;
@@ -1341,6 +1361,29 @@ export class ViewBase extends CustomLayoutView {
1341
1361
  style.textOverFlow = value;
1342
1362
  }
1343
1363
  }
1364
+ [clearProperty.setNative](value) {
1365
+ // @ts-ignore
1366
+ const style = this._styleHelper;
1367
+ if (style) {
1368
+ // @ts-ignore
1369
+ style.clear = value;
1370
+ }
1371
+ }
1372
+ [floatProperty.setNative](value) {
1373
+ // @ts-ignore
1374
+ const style = this._styleHelper;
1375
+ if (style) {
1376
+ // @ts-ignore
1377
+ style.float = value;
1378
+ }
1379
+ }
1380
+ [cornerShapeProperty.setNative](value) {
1381
+ // @ts-ignore
1382
+ const style = this._styleHelper;
1383
+ if (style) {
1384
+ style.cornerShape = value;
1385
+ }
1386
+ }
1344
1387
  }
1345
1388
  export class TextBase extends ViewBase {
1346
1389
  [textWrapProperty.setNative](value) {