@nativescript/core 8.7.3-next-06-28-2024-9718379905 → 8.7.4

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 (87) hide show
  1. package/css/parser.d.ts +38 -0
  2. package/css/parser.js +108 -0
  3. package/css/parser.js.map +1 -1
  4. package/data/observable/index.d.ts +19 -60
  5. package/data/observable/index.js +155 -150
  6. package/data/observable/index.js.map +1 -1
  7. package/data/observable-array/index.d.ts +6 -10
  8. package/data/virtual-array/index.d.ts +5 -9
  9. package/image-source/index.android.d.ts +0 -2
  10. package/image-source/index.android.js +0 -6
  11. package/image-source/index.android.js.map +1 -1
  12. package/image-source/index.d.ts +0 -12
  13. package/image-source/index.ios.d.ts +0 -2
  14. package/image-source/index.ios.js +2 -25
  15. package/image-source/index.ios.js.map +1 -1
  16. package/package.json +1 -2
  17. package/references.d.ts +0 -1
  18. package/ui/action-bar/index.d.ts +6 -10
  19. package/ui/action-bar/index.ios.js +1 -1
  20. package/ui/action-bar/index.ios.js.map +1 -1
  21. package/ui/button/index.android.js +3 -3
  22. package/ui/button/index.android.js.map +1 -1
  23. package/ui/button/index.d.ts +5 -9
  24. package/ui/core/bindable/index.d.ts +0 -13
  25. package/ui/core/bindable/index.js +6 -27
  26. package/ui/core/bindable/index.js.map +1 -1
  27. package/ui/core/view/index.d.ts +12 -19
  28. package/ui/core/view/view-common.d.ts +5 -5
  29. package/ui/core/view/view-common.js +62 -52
  30. package/ui/core/view/view-common.js.map +1 -1
  31. package/ui/core/view-base/index.d.ts +0 -7
  32. package/ui/core/view-base/index.js +2 -11
  33. package/ui/core/view-base/index.js.map +1 -1
  34. package/ui/frame/index.d.ts +6 -10
  35. package/ui/gestures/gestures-common.d.ts +7 -10
  36. package/ui/gestures/gestures-common.js +71 -24
  37. package/ui/gestures/gestures-common.js.map +1 -1
  38. package/ui/gestures/index.android.js +46 -60
  39. package/ui/gestures/index.android.js.map +1 -1
  40. package/ui/gestures/index.d.ts +1 -3
  41. package/ui/gestures/index.ios.d.ts +2 -20
  42. package/ui/gestures/index.ios.js +66 -88
  43. package/ui/gestures/index.ios.js.map +1 -1
  44. package/ui/gestures/touch-manager.js +2 -2
  45. package/ui/gestures/touch-manager.js.map +1 -1
  46. package/ui/image/image-common.d.ts +0 -6
  47. package/ui/image/image-common.js +2 -21
  48. package/ui/image/image-common.js.map +1 -1
  49. package/ui/image/index.d.ts +0 -1
  50. package/ui/image/index.ios.js +1 -14
  51. package/ui/image/index.ios.js.map +1 -1
  52. package/ui/image-cache/index.d.ts +6 -10
  53. package/ui/index.d.ts +1 -1
  54. package/ui/index.js +1 -1
  55. package/ui/index.js.map +1 -1
  56. package/ui/list-view/index.d.ts +6 -10
  57. package/ui/page/index.d.ts +6 -10
  58. package/ui/placeholder/index.d.ts +5 -9
  59. package/ui/scroll-view/index.d.ts +5 -9
  60. package/ui/search-bar/index.d.ts +5 -9
  61. package/ui/segmented-bar/index.d.ts +5 -9
  62. package/ui/styling/css-selector.d.ts +23 -63
  63. package/ui/styling/css-selector.js +110 -372
  64. package/ui/styling/css-selector.js.map +1 -1
  65. package/ui/styling/style-properties.js +1 -1
  66. package/ui/styling/style-properties.js.map +1 -1
  67. package/ui/tab-view/index.d.ts +6 -10
  68. package/ui/transition/page-transition.android.js +1 -1
  69. package/ui/transition/page-transition.android.js.map +1 -1
  70. package/ui/web-view/index.d.ts +6 -10
  71. package/utils/common.d.ts +0 -1
  72. package/utils/common.js +1 -3
  73. package/utils/common.js.map +1 -1
  74. package/utils/index.ios.js +3 -2
  75. package/utils/index.ios.js.map +1 -1
  76. package/utils/ios/index.js +1 -1
  77. package/utils/ios/index.js.map +1 -1
  78. package/ui/image/symbol-effects-common.d.ts +0 -36
  79. package/ui/image/symbol-effects-common.js +0 -35
  80. package/ui/image/symbol-effects-common.js.map +0 -1
  81. package/ui/image/symbol-effects.android.d.ts +0 -4
  82. package/ui/image/symbol-effects.android.js +0 -8
  83. package/ui/image/symbol-effects.android.js.map +0 -1
  84. package/ui/image/symbol-effects.d.ts +0 -13
  85. package/ui/image/symbol-effects.ios.d.ts +0 -2
  86. package/ui/image/symbol-effects.ios.js +0 -93
  87. package/ui/image/symbol-effects.ios.js.map +0 -1
@@ -103,16 +103,12 @@ export class ListView extends View {
103
103
  isItemAtIndexVisible(index: number): boolean;
104
104
 
105
105
  /**
106
- * Adds a listener for the specified event name.
107
- *
108
- * @param eventName The name of the event.
109
- * @param callback The event listener to add. Will be called when an event of
110
- * the given name is raised.
111
- * @param thisArg An optional parameter which, when set, will be bound as the
112
- * `this` context when the callback is called. Falsy values will be not be
113
- * bound.
114
- */
115
- on(eventName: string, callback: (data: EventData) => void, thisArg?: any): void;
106
+ * A basic method signature to hook an event listener (shortcut alias to the addEventListener method).
107
+ * @param eventNames - String corresponding to events (e.g. "propertyChange"). Optionally could be used more events separated by `,` (e.g. "propertyChange", "change").
108
+ * @param callback - Callback function which will be executed when event is raised.
109
+ * @param thisArg - An optional parameter which will be used as `this` context for callback execution.
110
+ */
111
+ on(eventNames: string, callback: (data: EventData) => void, thisArg?: any): void;
116
112
 
117
113
  /**
118
114
  * Raised when a View for the data at the specified index should be created.
@@ -111,16 +111,12 @@ export declare class Page extends PageBase {
111
111
  public accessibilityAnnouncePageEnabled: boolean;
112
112
 
113
113
  /**
114
- * Adds a listener for the specified event name.
115
- *
116
- * @param eventName The name of the event.
117
- * @param callback The event listener to add. Will be called when an event of
118
- * the given name is raised.
119
- * @param thisArg An optional parameter which, when set, will be bound as the
120
- * `this` context when the callback is called. Falsy values will be not be
121
- * bound.
122
- */
123
- public on(eventName: string, callback: (data: EventData) => void, thisArg?: any): void;
114
+ * A basic method signature to hook an event listener (shortcut alias to the addEventListener method).
115
+ * @param eventNames - String corresponding to events (e.g. "propertyChange"). Optionally could be used more events separated by `,` (e.g. "propertyChange", "change").
116
+ * @param callback - Callback function which will be executed when event is raised.
117
+ * @param thisArg - An optional parameter which will be used as `this` context for callback execution.
118
+ */
119
+ public on(eventNames: string, callback: (data: EventData) => void, thisArg?: any): void;
124
120
 
125
121
  /**
126
122
  * Raised when navigation to the page has started.
@@ -13,16 +13,12 @@ export class Placeholder extends View {
13
13
  public static creatingViewEvent: string;
14
14
 
15
15
  /**
16
- * Adds a listener for the specified event name.
17
- *
18
- * @param eventName The name of the event.
19
- * @param callback The event listener to add. Will be called when an event of
20
- * the given name is raised.
21
- * @param thisArg An optional parameter which, when set, will be bound as the
22
- * `this` context when the callback is called. Falsy values will be not be
23
- * bound.
16
+ * A basic method signature to hook an event listener (shortcut alias to the addEventListener method).
17
+ * @param eventNames - String corresponding to events (e.g. "propertyChange"). Optionally could be used more events separated by `,` (e.g. "propertyChange", "change").
18
+ * @param callback - Callback function which will be executed when event is raised.
19
+ * @param thisArg - An optional parameter which will be used as `this` context for callback execution.
24
20
  */
25
- on(eventName: string, callback: (args: EventData) => void, thisArg?: any): void;
21
+ on(eventNames: string, callback: (args: EventData) => void, thisArg?: any): void;
26
22
 
27
23
  /**
28
24
  * Raised when a creatingView event occurs.
@@ -62,16 +62,12 @@ export class ScrollView extends ContentView {
62
62
  orientation: CoreTypes.OrientationType;
63
63
 
64
64
  /**
65
- * Adds a listener for the specified event name.
66
- *
67
- * @param eventName The name of the event.
68
- * @param callback The event listener to add. Will be called when an event of
69
- * the given name is raised.
70
- * @param thisArg An optional parameter which, when set, will be bound as the
71
- * `this` context when the callback is called. Falsy values will be not be
72
- * bound.
65
+ * A basic method signature to hook an event listener (shortcut alias to the addEventListener method).
66
+ * @param eventNames - String corresponding to events (e.g. "propertyChange"). Optionally could be used more events separated by `,` (e.g. "propertyChange", "change").
67
+ * @param callback - Callback function which will be executed when event is raised.
68
+ * @param thisArg - An optional parameter which will be used as `this` context for callback execution.
73
69
  */
74
- on(eventName: string, callback: (data: EventData) => void, thisArg?: any): void;
70
+ on(eventNames: string, callback: (data: EventData) => void, thisArg?: any): void;
75
71
 
76
72
  /**
77
73
  * Raised when a scroll event occurs.
@@ -48,16 +48,12 @@ export class SearchBar extends View {
48
48
  textFieldHintColor: Color;
49
49
 
50
50
  /**
51
- * Adds a listener for the specified event name.
52
- *
53
- * @param eventName The name of the event.
54
- * @param callback The event listener to add. Will be called when an event of
55
- * the given name is raised.
56
- * @param thisArg An optional parameter which, when set, will be bound as the
57
- * `this` context when the callback is called. Falsy values will be not be
58
- * bound.
51
+ * A basic method signature to hook an event listener (shortcut alias to the addEventListener method).
52
+ * @param eventNames - String corresponding to events (e.g. "propertyChange"). Optionally could be used more events separated by `,` (e.g. "propertyChange", "change").
53
+ * @param callback - Callback function which will be executed when event is raised.
54
+ * @param thisArg - An optional parameter which will be used as `this` context for callback execution.
59
55
  */
60
- on(eventName: string, callback: (data: EventData) => void, thisArg?: any): void;
56
+ on(eventNames: string, callback: (data: EventData) => void, thisArg?: any): void;
61
57
 
62
58
  /**
63
59
  * Raised when a search bar search is submitted.
@@ -60,16 +60,12 @@ export class SegmentedBar extends View implements AddChildFromBuilder, AddArrayF
60
60
  public static selectedIndexChangedEvent: string;
61
61
 
62
62
  /**
63
- * Adds a listener for the specified event name.
64
- *
65
- * @param eventName The name of the event.
66
- * @param callback The event listener to add. Will be called when an event of
67
- * the given name is raised.
68
- * @param thisArg An optional parameter which, when set, will be bound as the
69
- * `this` context when the callback is called. Falsy values will be not be
70
- * bound.
63
+ * A basic method signature to hook an event listener (shortcut alias to the addEventListener method).
64
+ * @param eventNames - String corresponding to events (e.g. "propertyChange"). Optionally could be used more events separated by `,` (e.g. "propertyChange", "change").
65
+ * @param callback - Callback function which will be executed when event is raised.
66
+ * @param thisArg - An optional parameter which will be used as `this` context for callback execution.
71
67
  */
72
- on(eventName: string, callback: (data: EventData) => void, thisArg?: any): void;
68
+ on(eventNames: string, callback: (data: EventData) => void, thisArg?: any): void;
73
69
 
74
70
  /**
75
71
  * Raised when the selected index changes.
@@ -1,4 +1,3 @@
1
- import { DataType as CSSWhatDataType } from 'css-what';
2
1
  import '../../globals';
3
2
  import * as ReworkCSS from '../../css';
4
3
  /**
@@ -15,7 +14,6 @@ export interface Node {
15
14
  cssPseudoClasses?: Set<string>;
16
15
  getChildIndex?(node: Node): number;
17
16
  getChildAt?(index: number): Node;
18
- getChildrenCount?(): number;
19
17
  }
20
18
  export interface Declaration {
21
19
  property: string;
@@ -36,41 +34,24 @@ declare const enum Rarity {
36
34
  Universal = 0,
37
35
  Inline = 0
38
36
  }
39
- declare const enum PseudoClassSelectorList {
40
- Regular = 0,
41
- Forgiving = 1,
42
- Relative = 2
43
- }
44
- declare enum Combinator {
45
- 'descendant' = " ",
46
- 'child' = ">",
47
- 'adjacent' = "+",
48
- 'sibling' = "~",
49
- 'parent' = "<",
50
- 'column-combinator' = "||"
51
- }
52
- declare type AttributeTest = 'exists' | 'equals' | 'start' | 'end' | 'any' | 'element' | 'hyphen';
53
37
  interface LookupSorter {
54
38
  sortById(id: string, sel: SelectorCore): any;
55
39
  sortByClass(cssClass: string, sel: SelectorCore): any;
56
40
  sortByType(cssType: string, sel: SelectorCore): any;
57
41
  sortAsUniversal(sel: SelectorCore): any;
58
42
  }
59
- export declare abstract class SelectorBase {
60
- /**
61
- * Dynamic selectors depend on attributes and pseudo classes.
62
- */
63
- dynamic: boolean;
64
- abstract match(node: Node): boolean;
65
- abstract mayMatch(node: Node): boolean;
66
- abstract trackChanges(node: Node, map: ChangeAccumulator): void;
67
- }
68
- export declare abstract class SelectorCore extends SelectorBase {
43
+ declare type Combinator = '+' | '>' | '~' | ' ';
44
+ export declare abstract class SelectorCore {
69
45
  pos: number;
70
46
  specificity: number;
71
47
  rarity: Rarity;
72
48
  combinator: Combinator;
73
49
  ruleset: RuleSet;
50
+ /**
51
+ * Dynamic selectors depend on attributes and pseudo classes.
52
+ */
53
+ dynamic: boolean;
54
+ abstract match(node: Node): boolean;
74
55
  /**
75
56
  * If the selector is static returns if it matches the node.
76
57
  * If the selector is dynamic returns if it may match the node, and accumulates any changes that may affect its state.
@@ -115,12 +96,12 @@ export declare class ClassSelector extends SimpleSelector {
115
96
  match(node: Node): boolean;
116
97
  lookupSort(sorter: LookupSorter, base?: SelectorCore): void;
117
98
  }
99
+ declare type AttributeTest = '=' | '^=' | '$=' | '*=' | '=' | '~=' | '|=';
118
100
  export declare class AttributeSelector extends SimpleSelector {
119
101
  attribute: string;
120
- test: AttributeTest;
121
- value: string;
122
- ignoreCase: boolean;
123
- constructor(attribute: string, test: AttributeTest, value: string, ignoreCase: boolean);
102
+ test?: AttributeTest;
103
+ value?: string;
104
+ constructor(attribute: string, test?: AttributeTest, value?: string);
124
105
  toString(): string;
125
106
  match(node: Node): boolean;
126
107
  mayMatch(node: Node): boolean;
@@ -134,26 +115,6 @@ export declare class PseudoClassSelector extends SimpleSelector {
134
115
  mayMatch(node: Node): boolean;
135
116
  trackChanges(node: Node, map: ChangeAccumulator): void;
136
117
  }
137
- export declare abstract class FunctionalPseudoClassSelector extends PseudoClassSelector {
138
- protected selectors: Array<SimpleSelector | SimpleSelectorSequence | ComplexSelector>;
139
- protected selectorListType?: PseudoClassSelectorList;
140
- constructor(cssPseudoClass: string, dataType: CSSWhatDataType);
141
- toString(): string;
142
- match(node: Node): boolean;
143
- mayMatch(node: Node): boolean;
144
- trackChanges(node: Node, map: ChangeAccumulator): void;
145
- }
146
- export declare class NotFunctionalPseudoClassSelector extends FunctionalPseudoClassSelector {
147
- match(node: Node): boolean;
148
- }
149
- export declare class IsFunctionalPseudoClassSelector extends FunctionalPseudoClassSelector {
150
- match(node: Node): boolean;
151
- lookupSort(sorter: LookupSorter, base?: SelectorCore): void;
152
- }
153
- export declare class WhereFunctionalPseudoClassSelector extends FunctionalPseudoClassSelector {
154
- match(node: Node): boolean;
155
- lookupSort(sorter: LookupSorter, base?: SelectorCore): void;
156
- }
157
118
  export declare class SimpleSelectorSequence extends SimpleSelector {
158
119
  selectors: SimpleSelector[];
159
120
  private head;
@@ -161,35 +122,34 @@ export declare class SimpleSelectorSequence extends SimpleSelector {
161
122
  toString(): string;
162
123
  match(node: Node): boolean;
163
124
  mayMatch(node: Node): boolean;
164
- trackChanges(node: Node, map: ChangeAccumulator): void;
125
+ trackChanges(node: any, map: any): void;
165
126
  lookupSort(sorter: LookupSorter, base?: SelectorCore): void;
166
127
  }
167
- export declare class ComplexSelector extends SelectorCore {
128
+ export declare class Selector extends SelectorCore {
168
129
  selectors: SimpleSelector[];
169
130
  private groups;
170
131
  private last;
171
132
  constructor(selectors: SimpleSelector[]);
172
133
  toString(): string;
173
134
  match(node: Node): boolean;
174
- mayMatch(node: Node): boolean;
175
- trackChanges(node: Node, map: ChangeAccumulator): void;
176
135
  lookupSort(sorter: LookupSorter, base?: SelectorCore): void;
177
136
  accumulateChanges(node: Node, map?: ChangeAccumulator): boolean;
178
137
  }
179
138
  export declare namespace Selector {
180
- class ChildGroup extends SelectorBase {
139
+ class ChildGroup {
181
140
  private selectors;
182
- constructor(selectors: SelectorBase[]);
183
- getMatchingNode(node: Node, strict: boolean): Node;
184
- match(node: Node): boolean;
185
- mayMatch(node: Node): boolean;
141
+ dynamic: boolean;
142
+ constructor(selectors: SiblingGroup[]);
143
+ match(node: Node): Node;
144
+ mayMatch(node: Node): Node;
186
145
  trackChanges(node: Node, map: ChangeAccumulator): void;
187
146
  }
188
- class SiblingGroup extends SelectorBase {
147
+ class SiblingGroup {
189
148
  private selectors;
149
+ dynamic: boolean;
190
150
  constructor(selectors: SimpleSelector[]);
191
- match(node: Node): boolean;
192
- mayMatch(node: Node): boolean;
151
+ match(node: Node): Node;
152
+ mayMatch(node: Node): Node;
193
153
  trackChanges(node: Node, map: ChangeAccumulator): void;
194
154
  }
195
155
  interface Bound {
@@ -207,7 +167,7 @@ export declare class RuleSet {
207
167
  lookupSort(sorter: LookupSorter): void;
208
168
  }
209
169
  export declare function fromAstNodes(astRules: ReworkCSS.Node[]): RuleSet[];
210
- export declare function createSelector(sel: string): SimpleSelector | SimpleSelectorSequence | ComplexSelector;
170
+ export declare function createSelector(sel: string): SimpleSelector | SimpleSelectorSequence | Selector;
211
171
  export declare class SelectorsMap<T extends Node> implements LookupSorter {
212
172
  private id;
213
173
  private class;