@akylas/nativescript 9.1.4 → 9.1.5

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 (149) hide show
  1. package/application/application-common.d.ts +9 -3
  2. package/application/application-common.js +16 -3
  3. package/application/application-common.js.map +1 -1
  4. package/application/application.android.js +2 -6
  5. package/application/application.android.js.map +1 -1
  6. package/application/application.ios.js +8 -12
  7. package/application/application.ios.js.map +1 -1
  8. package/application/helpers-common.d.ts +2 -0
  9. package/application/helpers-common.js +23 -0
  10. package/application/helpers-common.js.map +1 -1
  11. package/config/config.interface.d.ts +1 -1
  12. package/config/config.interface.js.map +1 -1
  13. package/css-mediaquery/index.d.ts +6 -1
  14. package/css-mediaquery/index.js +31 -2
  15. package/css-mediaquery/index.js.map +1 -1
  16. package/debugger/webinspector-network.d.ts +29 -0
  17. package/fetch/index.d.ts +79 -0
  18. package/fetch/index.js +408 -0
  19. package/fetch/index.js.map +1 -0
  20. package/file-system/file-system-access.android.d.ts +1 -0
  21. package/file-system/file-system-access.android.js +18 -21
  22. package/file-system/file-system-access.android.js.map +1 -1
  23. package/global-types.d.ts +1 -1
  24. package/globals/index.js +4 -4
  25. package/globals/index.js.map +1 -1
  26. package/http/http-request/index.android.js +5 -1
  27. package/http/http-request/index.android.js.map +1 -1
  28. package/http/http-request-internal/http-request-internal-common.d.ts +1 -0
  29. package/http/http-request-internal/http-request-internal-common.js +9 -0
  30. package/http/http-request-internal/http-request-internal-common.js.map +1 -1
  31. package/http/http-request-internal/index.android.js +7 -5
  32. package/http/http-request-internal/index.android.js.map +1 -1
  33. package/http/http-request-internal/index.ios.js +33 -16
  34. package/http/http-request-internal/index.ios.js.map +1 -1
  35. package/image-source/index.ios.js +7 -6
  36. package/image-source/index.ios.js.map +1 -1
  37. package/index.d.ts +1 -1
  38. package/js-libs/easysax/easysax.d.ts +49 -7
  39. package/js-libs/easysax/easysax.js +631 -747
  40. package/js-libs/easysax/easysax.js.map +1 -0
  41. package/media-query-list/index.js +57 -15
  42. package/media-query-list/index.js.map +1 -1
  43. package/module-name-resolver/helpers.d.ts +1 -1
  44. package/module-name-resolver/helpers.js.map +1 -1
  45. package/module-name-resolver/index.d.ts +2 -2
  46. package/module-name-resolver/index.js.map +1 -1
  47. package/native-window/native-window.ios.js +3 -5
  48. package/native-window/native-window.ios.js.map +1 -1
  49. package/package.json +2 -3
  50. package/timer/index.android.js +2 -1
  51. package/timer/index.android.js.map +1 -1
  52. package/ui/action-bar/index.android.js +5 -4
  53. package/ui/action-bar/index.android.js.map +1 -1
  54. package/ui/animation/index.ios.js +6 -1
  55. package/ui/animation/index.ios.js.map +1 -1
  56. package/ui/builder/binding-builder.d.ts +8 -0
  57. package/ui/builder/binding-builder.js +12 -0
  58. package/ui/builder/binding-builder.js.map +1 -1
  59. package/ui/builder/component-builder/index.d.ts +7 -4
  60. package/ui/builder/component-builder/index.js +13 -7
  61. package/ui/builder/component-builder/index.js.map +1 -1
  62. package/ui/builder/index.d.ts +16 -2
  63. package/ui/builder/index.js +52 -12
  64. package/ui/builder/index.js.map +1 -1
  65. package/ui/button/index.android.js +4 -3
  66. package/ui/button/index.android.js.map +1 -1
  67. package/ui/content-view/index.js +2 -0
  68. package/ui/content-view/index.js.map +1 -1
  69. package/ui/core/bindable/bindable-types.d.ts +15 -0
  70. package/ui/core/bindable/bindable-types.js.map +1 -1
  71. package/ui/core/bindable/index.d.ts +1 -1
  72. package/ui/core/bindable/index.js +12 -7
  73. package/ui/core/bindable/index.js.map +1 -1
  74. package/ui/core/view/index.android.js +11 -9
  75. package/ui/core/view/index.android.js.map +1 -1
  76. package/ui/date-picker/index.android.js +1 -1
  77. package/ui/date-picker/index.android.js.map +1 -1
  78. package/ui/editable-text-base/index.android.d.ts +2 -0
  79. package/ui/editable-text-base/index.android.js +15 -6
  80. package/ui/editable-text-base/index.android.js.map +1 -1
  81. package/ui/editable-text-base/index.d.ts +8 -0
  82. package/ui/frame/fragment.transitions.android.d.ts +8 -5
  83. package/ui/frame/fragment.transitions.android.js +16 -18
  84. package/ui/frame/fragment.transitions.android.js.map +1 -1
  85. package/ui/frame/index.android.d.ts +1 -0
  86. package/ui/frame/index.android.js +10 -4
  87. package/ui/frame/index.android.js.map +1 -1
  88. package/ui/gestures/index.android.js +18 -9
  89. package/ui/gestures/index.android.js.map +1 -1
  90. package/ui/gestures/index.ios.js +6 -6
  91. package/ui/gestures/index.ios.js.map +1 -1
  92. package/ui/image/index.android.js +1 -1
  93. package/ui/image/index.android.js.map +1 -1
  94. package/ui/image-cache/index.android.js +1 -2
  95. package/ui/image-cache/index.android.js.map +1 -1
  96. package/ui/index.d.ts +1 -1
  97. package/ui/index.js.map +1 -1
  98. package/ui/list-picker/index.android.d.ts +1 -0
  99. package/ui/list-picker/index.android.js +6 -5
  100. package/ui/list-picker/index.android.js.map +1 -1
  101. package/ui/list-view/index.android.js +17 -9
  102. package/ui/list-view/index.android.js.map +1 -1
  103. package/ui/page/index.ios.js +7 -3
  104. package/ui/page/index.ios.js.map +1 -1
  105. package/ui/search-bar/index.android.js +2 -2
  106. package/ui/search-bar/index.android.js.map +1 -1
  107. package/ui/segmented-bar/index.android.js +8 -8
  108. package/ui/segmented-bar/index.android.js.map +1 -1
  109. package/ui/slider/index.android.js +1 -2
  110. package/ui/slider/index.android.js.map +1 -1
  111. package/ui/styling/background-common.js +2 -2
  112. package/ui/styling/background-common.js.map +1 -1
  113. package/ui/styling/background.d.ts +1 -1
  114. package/ui/styling/background.ios.d.ts +1 -1
  115. package/ui/styling/background.ios.js +1 -1
  116. package/ui/styling/background.ios.js.map +1 -1
  117. package/ui/styling/style/index.d.ts +13 -2
  118. package/ui/styling/style/index.js.map +1 -1
  119. package/ui/styling/style-scope.js +6 -0
  120. package/ui/styling/style-scope.js.map +1 -1
  121. package/ui/switch/index.android.js +1 -1
  122. package/ui/switch/index.android.js.map +1 -1
  123. package/ui/tab-view/index.android.js +9 -16
  124. package/ui/tab-view/index.android.js.map +1 -1
  125. package/ui/tab-view/index.ios.js +2 -2
  126. package/ui/tab-view/index.ios.js.map +1 -1
  127. package/ui/text-base/index.android.js +1 -1
  128. package/ui/text-base/index.android.js.map +1 -1
  129. package/ui/text-base/index.ios.js +1 -1
  130. package/ui/text-base/index.ios.js.map +1 -1
  131. package/ui/time-picker/index.android.js +1 -1
  132. package/ui/time-picker/index.android.js.map +1 -1
  133. package/ui/transition/page-transition.android.js +0 -44
  134. package/ui/transition/page-transition.android.js.map +1 -1
  135. package/ui/web-view/index.android.js +1 -1
  136. package/ui/web-view/index.android.js.map +1 -1
  137. package/utils/android-runtime-version.d.ts +12 -0
  138. package/utils/android-runtime-version.js +36 -0
  139. package/utils/android-runtime-version.js.map +1 -0
  140. package/utils/native-helper-for-android.js +3 -1
  141. package/utils/native-helper-for-android.js.map +1 -1
  142. package/xhr/index.d.ts +5 -4
  143. package/xhr/index.js +18 -18
  144. package/xhr/index.js.map +1 -1
  145. package/xml/index.d.ts +2 -2
  146. package/xml/index.js +1 -1
  147. package/xml/index.js.map +1 -1
  148. package/LICENSE +0 -19
  149. package/fetch/index.mjs +0 -535
@@ -10,6 +10,7 @@ import type { AccessibilityLiveRegion, AccessibilityRole, AccessibilityState } f
10
10
  import { ShadowCSSValues } from '../css-shadow';
11
11
  import { StrokeCSSValues } from '../css-stroke';
12
12
  import { ClipPathFunction } from '../clip-path-function';
13
+ import type { CssPendingSubstitution } from '../../core/properties';
13
14
  export interface CommonLayoutParams {
14
15
  width: number;
15
16
  height: number;
@@ -167,10 +168,10 @@ export declare class Style extends Observable {
167
168
  iosAccessibilityMaxFontScale: number;
168
169
  PropertyBag: {
169
170
  new (): {
170
- [property: string]: string;
171
+ [property: string]: any;
171
172
  };
172
173
  prototype: {
173
- [property: string]: string;
174
+ [property: string]: any;
174
175
  };
175
176
  };
176
177
  viewRef: WeakRef<ViewBase>;
@@ -179,5 +180,15 @@ export declare class Style extends Observable {
179
180
  * shadows, so this is what tells the css state its recorded values may be stale.
180
181
  */
181
182
  _localValueVersion: number;
183
+ /**
184
+ * Local values specified with var()/calc(), by css name, with the variables their
185
+ * last substitution read and what it produced. The cascade substitutes them again
186
+ * when those variables change.
187
+ */
188
+ _localCssExpressions: Map<string, {
189
+ specified: string | CssPendingSubstitution;
190
+ substituted: unknown;
191
+ reads: Map<string, string | null>;
192
+ }>;
182
193
  get view(): ViewBase;
183
194
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/core/ui/styling/style/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAGtD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AA4BvC,MAAM,OAAO,KAAM,SAAQ,UAAU;IAIpC,YAAY,SAAuC;QAClD,KAAK,EAAE,CAAC;QAJD,yBAAoB,GAAG,IAAI,GAAG,EAAkB,CAAC;QACjD,uBAAkB,GAAG,IAAI,GAAG,EAAkB,CAAC;QAKtD,4EAA4E;QAC5E,IAAI,SAAS,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,IAAI,SAAS,CAAC,QAAQ,EAAE,IAAI,kBAAkB,EAAE,CAAC;YACpH,IAAI,CAAC,OAAO,GAAsB,SAAS,CAAC;QAC7C,CAAC;aAAM,CAAC;YACP,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAW,SAAS,CAAC,CAAC;QACjD,CAAC;IACF,CAAC;IAEM,oBAAoB,CAAC,OAAe,EAAE,KAAa;QACzD,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC7C,CAAC;IAEM,sBAAsB,CAAC,OAAe,EAAE,KAAa;QAC3D,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAEM,uBAAuB,CAAC,OAAe;QAC7C,IAAI,CAAC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,EAAE,CAAC;QACX,CAAC;QAED,OAAO,GAAG,IAAI,QAAQ,CAAC;IACxB,CAAC;IA0KD,IAAW,IAAI;QACd,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;QAC3B,CAAC;QAED,OAAO,SAAS,CAAC;IAClB,CAAC;CACD;AACD,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG;CAE7B,CAAC;AACF,KAAK,CAAC,SAAS,CAAC,kBAAkB,GAAG,CAAC,CAAC","sourcesContent":["import { Color } from '../../../color';\nimport { Font, FontStyleType, FontWeightType, FontVariationSettingsType } from '../font';\nimport { Background } from '../background';\nimport { ViewBase } from '../../core/view-base';\nimport { LinearGradient } from '../../styling/linear-gradient';\nimport { Observable } from '../../../data/observable';\n\nimport { FlexDirection, FlexWrap, JustifyContent, AlignItems, AlignContent, Order, FlexGrow, FlexShrink, FlexWrapBefore, AlignSelf, FlexFlow, Flex } from '../../layouts/flexbox-layout';\nimport { Trace } from '../../../trace';\nimport { CoreTypes } from '../../../core-types';\nimport type { AccessibilityLiveRegion, AccessibilityRole, AccessibilityState } from '../../../accessibility/accessibility-types';\nimport { ShadowCSSValues } from '../css-shadow';\nimport { StrokeCSSValues } from '../css-stroke';\nimport { ClipPathFunction } from '../clip-path-function';\n\nexport interface CommonLayoutParams {\n\twidth: number;\n\theight: number;\n\n\twidthPercent: number;\n\theightPercent: number;\n\n\tleftMargin: number;\n\ttopMargin: number;\n\trightMargin: number;\n\tbottomMargin: number;\n\n\tleftMarginPercent: number;\n\ttopMarginPercent: number;\n\trightMarginPercent: number;\n\tbottomMarginPercent: number;\n\n\thorizontalAlignment: CoreTypes.HorizontalAlignmentType;\n\tverticalAlignment: CoreTypes.VerticalAlignmentType;\n}\n\nexport class Style extends Observable {\n\tprivate unscopedCssVariables = new Map<string, string>();\n\tprivate scopedCssVariables = new Map<string, string>();\n\n\tconstructor(ownerView: ViewBase | WeakRef<ViewBase>) {\n\t\tsuper();\n\n\t\t// HACK: Could not find better way for cross platform WeakRef type checking.\n\t\tif (ownerView.constructor.toString().indexOf('[native code]') !== -1 || ownerView.toString() == '[object WeakRef]') {\n\t\t\tthis.viewRef = <WeakRef<ViewBase>>ownerView;\n\t\t} else {\n\t\t\tthis.viewRef = new WeakRef(<ViewBase>ownerView);\n\t\t}\n\t}\n\n\tpublic setScopedCssVariable(varName: string, value: string): void {\n\t\tthis.scopedCssVariables.set(varName, value);\n\t}\n\n\tpublic setUnscopedCssVariable(varName: string, value: string): void {\n\t\tthis.unscopedCssVariables.set(varName, value);\n\t}\n\n\tpublic removeScopedCssVariable(varName: string): void {\n\t\tthis.scopedCssVariables.delete(varName);\n\t}\n\n\tpublic removeUnscopedCssVariable(varName: string): void {\n\t\tthis.unscopedCssVariables.delete(varName);\n\t}\n\n\tpublic getCssVariable(varName: string): string | null {\n\t\tconst view = this.view;\n\t\tif (!view) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (this.unscopedCssVariables.has(varName)) {\n\t\t\treturn this.unscopedCssVariables.get(varName);\n\t\t}\n\n\t\tif (this.scopedCssVariables.has(varName)) {\n\t\t\treturn this.scopedCssVariables.get(varName);\n\t\t}\n\n\t\tif (!view.parent || !view.parent.style) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn view.parent.style.getCssVariable(varName);\n\t}\n\n\tpublic resetScopedCssVariables() {\n\t\tthis.scopedCssVariables.clear();\n\t}\n\n\tpublic resetUnscopedCssVariables() {\n\t\tthis.unscopedCssVariables.clear();\n\t}\n\n\ttoString() {\n\t\tconst view = this.viewRef.get();\n\t\tif (!view) {\n\t\t\tTrace.write(`toString() of Style cannot execute correctly because \".viewRef\" is cleared`, Trace.categories.Animation, Trace.messageType.warn);\n\n\t\t\treturn '';\n\t\t}\n\n\t\treturn `${view}.style`;\n\t}\n\n\tpublic fontInternal: Font;\n\tpublic iconFontFamily: string;\n\t/**\n\t * This property ensures inheritance of a11y scale among views.\n\t */\n\tpublic fontScaleInternal: number;\n\tpublic backgroundInternal: Background;\n\tpublic paddingInternal: string;\n\n\tpublic rotate: number;\n\tpublic rotateX: number;\n\tpublic rotateY: number;\n\tpublic perspective: number;\n\n\tpublic scaleX: number;\n\tpublic scaleY: number;\n\tpublic translateX: CoreTypes.dip;\n\tpublic translateY: CoreTypes.dip;\n\n\tpublic clipPath: string | ClipPathFunction;\n\tpublic color: Color;\n\tpublic tintColor: Color;\n\tpublic placeholderColor: Color;\n\n\tpublic background: string;\n\tpublic backgroundColor: Color;\n\tpublic backgroundImage: string | LinearGradient;\n\tpublic backgroundRepeat: CoreTypes.BackgroundRepeatType;\n\tpublic backgroundSize: string;\n\tpublic backgroundPosition: string;\n\n\tpublic borderColor: string | Color;\n\tpublic borderTopColor: Color;\n\tpublic borderRightColor: Color;\n\tpublic borderBottomColor: Color;\n\tpublic borderLeftColor: Color;\n\tpublic borderWidth: string | CoreTypes.LengthType;\n\tpublic borderTopWidth: CoreTypes.LengthType;\n\tpublic borderRightWidth: CoreTypes.LengthType;\n\tpublic borderBottomWidth: CoreTypes.LengthType;\n\tpublic borderLeftWidth: CoreTypes.LengthType;\n\tpublic borderRadius: string | CoreTypes.LengthType;\n\tpublic borderTopLeftRadius: CoreTypes.LengthType;\n\tpublic borderTopRightRadius: CoreTypes.LengthType;\n\tpublic borderBottomRightRadius: CoreTypes.LengthType;\n\tpublic borderBottomLeftRadius: CoreTypes.LengthType;\n\n\t/**\n\t * The curve used to round the corners: 'round' (circular arcs, the default)\n\t * or 'squircle' (Apple's continuous corner curve). iOS only; Android always\n\t * renders circular corners.\n\t */\n\tpublic cornerShape: CoreTypes.CornerShapeType;\n\n\tpublic boxShadow: string | ShadowCSSValues[];\n\n\tpublic direction: CoreTypes.LayoutDirectionType;\n\n\tpublic fontSize: number;\n\tpublic fontFamily: string;\n\tpublic fontStyle: FontStyleType;\n\tpublic fontWeight: FontWeightType;\n\tpublic fontVariationSettings: FontVariationSettingsType[];\n\tpublic font: string;\n\n\tpublic maxLines: CoreTypes.MaxLinesType;\n\n\tpublic androidElevation: number;\n\tpublic androidDynamicElevationOffset: number;\n\tpublic zIndex: number;\n\tpublic opacity: number;\n\tpublic visibility: CoreTypes.VisibilityType;\n\n\tpublic letterSpacing: number;\n\tpublic lineHeight: number;\n\tpublic textAlignment: CoreTypes.TextAlignmentType;\n\tpublic textDecoration: CoreTypes.TextDecorationType;\n\tpublic textTransform: CoreTypes.TextTransformType;\n\tpublic textShadow: ShadowCSSValues;\n\tpublic textStroke: StrokeCSSValues;\n\tpublic whiteSpace: CoreTypes.WhiteSpaceType;\n\tpublic textOverflow: CoreTypes.TextOverflowType;\n\n\tpublic minWidth: CoreTypes.LengthType;\n\tpublic minHeight: CoreTypes.LengthType;\n\tpublic maxWidth: CoreTypes.PercentLengthType;\n\tpublic maxHeight: CoreTypes.PercentLengthType;\n\tpublic width: CoreTypes.PercentLengthType;\n\tpublic height: CoreTypes.PercentLengthType;\n\tpublic margin: string | CoreTypes.PercentLengthType;\n\tpublic marginLeft: CoreTypes.PercentLengthType;\n\tpublic marginTop: CoreTypes.PercentLengthType;\n\tpublic marginRight: CoreTypes.PercentLengthType;\n\tpublic marginBottom: CoreTypes.PercentLengthType;\n\tpublic padding: string | CoreTypes.LengthType;\n\tpublic paddingLeft: CoreTypes.LengthType;\n\tpublic paddingTop: CoreTypes.LengthType;\n\tpublic paddingRight: CoreTypes.LengthType;\n\tpublic paddingBottom: CoreTypes.LengthType;\n\tpublic gap: string | CoreTypes.LengthType;\n\tpublic rowGap: CoreTypes.LengthType;\n\tpublic columnGap: CoreTypes.LengthType;\n\tpublic horizontalAlignment: CoreTypes.HorizontalAlignmentType;\n\tpublic verticalAlignment: CoreTypes.VerticalAlignmentType;\n\n\t// TabView-specific props\n\tpublic tabTextFontSize: number;\n\tpublic tabTextColor: Color;\n\tpublic tabBackgroundColor: Color;\n\tpublic selectedTabTextColor: Color;\n\tpublic androidSelectedTabHighlightColor: Color;\n\n\t// ListView-specific props\n\tpublic separatorColor: Color;\n\n\t//SegmentedBar-specific props\n\tpublic selectedBackgroundColor: Color;\n\tpublic selectedTextColor: Color;\n\n\t// Page-specific props\n\tpublic statusBarStyle: 'light' | 'dark';\n\tpublic androidStatusBarBackground: Color;\n\n\t// ActionBar-specific props\n\tpublic androidContentInset: string | CoreTypes.LengthType;\n\tpublic androidContentInsetLeft: CoreTypes.LengthType;\n\tpublic androidContentInsetRight: CoreTypes.LengthType;\n\n\t//flexbox layout properties\n\tpublic flexDirection: FlexDirection;\n\tpublic flexWrap: FlexWrap;\n\tpublic justifyContent: JustifyContent;\n\tpublic alignItems: AlignItems;\n\tpublic alignContent: AlignContent;\n\tpublic order: Order;\n\tpublic flexGrow: FlexGrow;\n\tpublic flexShrink: FlexShrink;\n\tpublic flexWrapBefore: FlexWrapBefore;\n\tpublic alignSelf: AlignSelf;\n\tpublic flexFlow: FlexFlow;\n\tpublic flex: Flex;\n\n\t// Accessibility properties\n\tpublic accessible: boolean;\n\tpublic accessibilityHidden: boolean;\n\tpublic accessibilityRole: AccessibilityRole;\n\tpublic accessibilityState: AccessibilityState;\n\tpublic accessibilityLiveRegion: AccessibilityLiveRegion;\n\tpublic accessibilityLanguage: string;\n\tpublic accessibilityMediaSession: boolean;\n\tpublic accessibilityStep: number;\n\tpublic iosAccessibilityAdjustsFontSize: boolean;\n\tpublic iosAccessibilityMinFontScale: number;\n\tpublic iosAccessibilityMaxFontScale: number;\n\n\tpublic PropertyBag: {\n\t\tnew (): { [property: string]: string };\n\t\tprototype: { [property: string]: string };\n\t};\n\n\tpublic viewRef: WeakRef<ViewBase>;\n\n\t/**\n\t * Bumped on every local write. A local value takes the slot of the css value it\n\t * shadows, so this is what tells the css state its recorded values may be stale.\n\t */\n\tpublic _localValueVersion: number;\n\n\tpublic get view(): ViewBase {\n\t\tif (this.viewRef) {\n\t\t\treturn this.viewRef.get();\n\t\t}\n\n\t\treturn undefined;\n\t}\n}\nStyle.prototype.PropertyBag = class {\n\t[property: string]: string;\n};\nStyle.prototype._localValueVersion = 0;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/core/ui/styling/style/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAGtD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AA6BvC,MAAM,OAAO,KAAM,SAAQ,UAAU;IAIpC,YAAY,SAAuC;QAClD,KAAK,EAAE,CAAC;QAJD,yBAAoB,GAAG,IAAI,GAAG,EAAkB,CAAC;QACjD,uBAAkB,GAAG,IAAI,GAAG,EAAkB,CAAC;QAKtD,4EAA4E;QAC5E,IAAI,SAAS,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,IAAI,SAAS,CAAC,QAAQ,EAAE,IAAI,kBAAkB,EAAE,CAAC;YACpH,IAAI,CAAC,OAAO,GAAsB,SAAS,CAAC;QAC7C,CAAC;aAAM,CAAC;YACP,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAW,SAAS,CAAC,CAAC;QACjD,CAAC;IACF,CAAC;IAEM,oBAAoB,CAAC,OAAe,EAAE,KAAa;QACzD,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC7C,CAAC;IAEM,sBAAsB,CAAC,OAAe,EAAE,KAAa;QAC3D,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAEM,uBAAuB,CAAC,OAAe;QAC7C,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;IAEM,yBAAyB,CAAC,OAAe;QAC/C,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC;IAEM,cAAc,CAAC,OAAe;QACpC,MAAM,IAAI,GAAG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O,SAAS,CAAC;IAClB,CAAC;CACD;AACD,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG;CAE7B,CAAC;AACF,KAAK,CAAC,SAAS,CAAC,kBAAkB,GAAG,CAAC,CAAC","sourcesContent":["import { Color } from '../../../color';\nimport { Font, FontStyleType, FontWeightType, FontVariationSettingsType } from '../font';\nimport { Background } from '../background';\nimport { ViewBase } from '../../core/view-base';\nimport { LinearGradient } from '../../styling/linear-gradient';\nimport { Observable } from '../../../data/observable';\n\nimport { FlexDirection, FlexWrap, JustifyContent, AlignItems, AlignContent, Order, FlexGrow, FlexShrink, FlexWrapBefore, AlignSelf, FlexFlow, Flex } from '../../layouts/flexbox-layout';\nimport { Trace } from '../../../trace';\nimport { CoreTypes } from '../../../core-types';\nimport type { AccessibilityLiveRegion, AccessibilityRole, AccessibilityState } from '../../../accessibility/accessibility-types';\nimport { ShadowCSSValues } from '../css-shadow';\nimport { StrokeCSSValues } from '../css-stroke';\nimport { ClipPathFunction } from '../clip-path-function';\nimport type { CssPendingSubstitution } from '../../core/properties';\n\nexport interface CommonLayoutParams {\n\twidth: number;\n\theight: number;\n\n\twidthPercent: number;\n\theightPercent: number;\n\n\tleftMargin: number;\n\ttopMargin: number;\n\trightMargin: number;\n\tbottomMargin: number;\n\n\tleftMarginPercent: number;\n\ttopMarginPercent: number;\n\trightMarginPercent: number;\n\tbottomMarginPercent: number;\n\n\thorizontalAlignment: CoreTypes.HorizontalAlignmentType;\n\tverticalAlignment: CoreTypes.VerticalAlignmentType;\n}\n\nexport class Style extends Observable {\n\tprivate unscopedCssVariables = new Map<string, string>();\n\tprivate scopedCssVariables = new Map<string, string>();\n\n\tconstructor(ownerView: ViewBase | WeakRef<ViewBase>) {\n\t\tsuper();\n\n\t\t// HACK: Could not find better way for cross platform WeakRef type checking.\n\t\tif (ownerView.constructor.toString().indexOf('[native code]') !== -1 || ownerView.toString() == '[object WeakRef]') {\n\t\t\tthis.viewRef = <WeakRef<ViewBase>>ownerView;\n\t\t} else {\n\t\t\tthis.viewRef = new WeakRef(<ViewBase>ownerView);\n\t\t}\n\t}\n\n\tpublic setScopedCssVariable(varName: string, value: string): void {\n\t\tthis.scopedCssVariables.set(varName, value);\n\t}\n\n\tpublic setUnscopedCssVariable(varName: string, value: string): void {\n\t\tthis.unscopedCssVariables.set(varName, value);\n\t}\n\n\tpublic removeScopedCssVariable(varName: string): void {\n\t\tthis.scopedCssVariables.delete(varName);\n\t}\n\n\tpublic removeUnscopedCssVariable(varName: string): void {\n\t\tthis.unscopedCssVariables.delete(varName);\n\t}\n\n\tpublic getCssVariable(varName: string): string | null {\n\t\tconst view = this.view;\n\t\tif (!view) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (this.unscopedCssVariables.has(varName)) {\n\t\t\treturn this.unscopedCssVariables.get(varName);\n\t\t}\n\n\t\tif (this.scopedCssVariables.has(varName)) {\n\t\t\treturn this.scopedCssVariables.get(varName);\n\t\t}\n\n\t\tif (!view.parent || !view.parent.style) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn view.parent.style.getCssVariable(varName);\n\t}\n\n\tpublic resetScopedCssVariables() {\n\t\tthis.scopedCssVariables.clear();\n\t}\n\n\tpublic resetUnscopedCssVariables() {\n\t\tthis.unscopedCssVariables.clear();\n\t}\n\n\ttoString() {\n\t\tconst view = this.viewRef.get();\n\t\tif (!view) {\n\t\t\tTrace.write(`toString() of Style cannot execute correctly because \".viewRef\" is cleared`, Trace.categories.Animation, Trace.messageType.warn);\n\n\t\t\treturn '';\n\t\t}\n\n\t\treturn `${view}.style`;\n\t}\n\n\tpublic fontInternal: Font;\n\tpublic iconFontFamily: string;\n\t/**\n\t * This property ensures inheritance of a11y scale among views.\n\t */\n\tpublic fontScaleInternal: number;\n\tpublic backgroundInternal: Background;\n\tpublic paddingInternal: string;\n\n\tpublic rotate: number;\n\tpublic rotateX: number;\n\tpublic rotateY: number;\n\tpublic perspective: number;\n\n\tpublic scaleX: number;\n\tpublic scaleY: number;\n\tpublic translateX: CoreTypes.dip;\n\tpublic translateY: CoreTypes.dip;\n\n\tpublic clipPath: string | ClipPathFunction;\n\tpublic color: Color;\n\tpublic tintColor: Color;\n\tpublic placeholderColor: Color;\n\n\tpublic background: string;\n\tpublic backgroundColor: Color;\n\tpublic backgroundImage: string | LinearGradient;\n\tpublic backgroundRepeat: CoreTypes.BackgroundRepeatType;\n\tpublic backgroundSize: string;\n\tpublic backgroundPosition: string;\n\n\tpublic borderColor: string | Color;\n\tpublic borderTopColor: Color;\n\tpublic borderRightColor: Color;\n\tpublic borderBottomColor: Color;\n\tpublic borderLeftColor: Color;\n\tpublic borderWidth: string | CoreTypes.LengthType;\n\tpublic borderTopWidth: CoreTypes.LengthType;\n\tpublic borderRightWidth: CoreTypes.LengthType;\n\tpublic borderBottomWidth: CoreTypes.LengthType;\n\tpublic borderLeftWidth: CoreTypes.LengthType;\n\tpublic borderRadius: string | CoreTypes.LengthType;\n\tpublic borderTopLeftRadius: CoreTypes.LengthType;\n\tpublic borderTopRightRadius: CoreTypes.LengthType;\n\tpublic borderBottomRightRadius: CoreTypes.LengthType;\n\tpublic borderBottomLeftRadius: CoreTypes.LengthType;\n\n\t/**\n\t * The curve used to round the corners: 'round' (circular arcs, the default)\n\t * or 'squircle' (Apple's continuous corner curve). iOS only; Android always\n\t * renders circular corners.\n\t */\n\tpublic cornerShape: CoreTypes.CornerShapeType;\n\n\tpublic boxShadow: string | ShadowCSSValues[];\n\n\tpublic direction: CoreTypes.LayoutDirectionType;\n\n\tpublic fontSize: number;\n\tpublic fontFamily: string;\n\tpublic fontStyle: FontStyleType;\n\tpublic fontWeight: FontWeightType;\n\tpublic fontVariationSettings: FontVariationSettingsType[];\n\tpublic font: string;\n\n\tpublic maxLines: CoreTypes.MaxLinesType;\n\n\tpublic androidElevation: number;\n\tpublic androidDynamicElevationOffset: number;\n\tpublic zIndex: number;\n\tpublic opacity: number;\n\tpublic visibility: CoreTypes.VisibilityType;\n\n\tpublic letterSpacing: number;\n\tpublic lineHeight: number;\n\tpublic textAlignment: CoreTypes.TextAlignmentType;\n\tpublic textDecoration: CoreTypes.TextDecorationType;\n\tpublic textTransform: CoreTypes.TextTransformType;\n\tpublic textShadow: ShadowCSSValues;\n\tpublic textStroke: StrokeCSSValues;\n\tpublic whiteSpace: CoreTypes.WhiteSpaceType;\n\tpublic textOverflow: CoreTypes.TextOverflowType;\n\n\tpublic minWidth: CoreTypes.LengthType;\n\tpublic minHeight: CoreTypes.LengthType;\n\tpublic maxWidth: CoreTypes.PercentLengthType;\n\tpublic maxHeight: CoreTypes.PercentLengthType;\n\tpublic width: CoreTypes.PercentLengthType;\n\tpublic height: CoreTypes.PercentLengthType;\n\tpublic margin: string | CoreTypes.PercentLengthType;\n\tpublic marginLeft: CoreTypes.PercentLengthType;\n\tpublic marginTop: CoreTypes.PercentLengthType;\n\tpublic marginRight: CoreTypes.PercentLengthType;\n\tpublic marginBottom: CoreTypes.PercentLengthType;\n\tpublic padding: string | CoreTypes.LengthType;\n\tpublic paddingLeft: CoreTypes.LengthType;\n\tpublic paddingTop: CoreTypes.LengthType;\n\tpublic paddingRight: CoreTypes.LengthType;\n\tpublic paddingBottom: CoreTypes.LengthType;\n\tpublic gap: string | CoreTypes.LengthType;\n\tpublic rowGap: CoreTypes.LengthType;\n\tpublic columnGap: CoreTypes.LengthType;\n\tpublic horizontalAlignment: CoreTypes.HorizontalAlignmentType;\n\tpublic verticalAlignment: CoreTypes.VerticalAlignmentType;\n\n\t// TabView-specific props\n\tpublic tabTextFontSize: number;\n\tpublic tabTextColor: Color;\n\tpublic tabBackgroundColor: Color;\n\tpublic selectedTabTextColor: Color;\n\tpublic androidSelectedTabHighlightColor: Color;\n\n\t// ListView-specific props\n\tpublic separatorColor: Color;\n\n\t//SegmentedBar-specific props\n\tpublic selectedBackgroundColor: Color;\n\tpublic selectedTextColor: Color;\n\n\t// Page-specific props\n\tpublic statusBarStyle: 'light' | 'dark';\n\tpublic androidStatusBarBackground: Color;\n\n\t// ActionBar-specific props\n\tpublic androidContentInset: string | CoreTypes.LengthType;\n\tpublic androidContentInsetLeft: CoreTypes.LengthType;\n\tpublic androidContentInsetRight: CoreTypes.LengthType;\n\n\t//flexbox layout properties\n\tpublic flexDirection: FlexDirection;\n\tpublic flexWrap: FlexWrap;\n\tpublic justifyContent: JustifyContent;\n\tpublic alignItems: AlignItems;\n\tpublic alignContent: AlignContent;\n\tpublic order: Order;\n\tpublic flexGrow: FlexGrow;\n\tpublic flexShrink: FlexShrink;\n\tpublic flexWrapBefore: FlexWrapBefore;\n\tpublic alignSelf: AlignSelf;\n\tpublic flexFlow: FlexFlow;\n\tpublic flex: Flex;\n\n\t// Accessibility properties\n\tpublic accessible: boolean;\n\tpublic accessibilityHidden: boolean;\n\tpublic accessibilityRole: AccessibilityRole;\n\tpublic accessibilityState: AccessibilityState;\n\tpublic accessibilityLiveRegion: AccessibilityLiveRegion;\n\tpublic accessibilityLanguage: string;\n\tpublic accessibilityMediaSession: boolean;\n\tpublic accessibilityStep: number;\n\tpublic iosAccessibilityAdjustsFontSize: boolean;\n\tpublic iosAccessibilityMinFontScale: number;\n\tpublic iosAccessibilityMaxFontScale: number;\n\n\t// Values are stylesheet text, or the converted values of expanded shorthand longhands.\n\tpublic PropertyBag: {\n\t\tnew (): { [property: string]: any };\n\t\tprototype: { [property: string]: any };\n\t};\n\n\tpublic viewRef: WeakRef<ViewBase>;\n\n\t/**\n\t * Bumped on every local write. A local value takes the slot of the css value it\n\t * shadows, so this is what tells the css state its recorded values may be stale.\n\t */\n\tpublic _localValueVersion: number;\n\n\t/**\n\t * Local values specified with var()/calc(), by css name, with the variables their\n\t * last substitution read and what it produced. The cascade substitutes them again\n\t * when those variables change.\n\t */\n\tpublic _localCssExpressions: Map<string, { specified: string | CssPendingSubstitution; substituted: unknown; reads: Map<string, string | null> }>;\n\n\tpublic get view(): ViewBase {\n\t\tif (this.viewRef) {\n\t\t\treturn this.viewRef.get();\n\t\t}\n\n\t\treturn undefined;\n\t}\n}\nStyle.prototype.PropertyBag = class {\n\t[property: string]: any;\n};\nStyle.prototype._localValueVersion = 0;\n"]}
@@ -3,6 +3,7 @@ import { CssAnimationProperty, _evaluateCssVariableExpression, _evaluateCssCalcE
3
3
  import { unsetValue } from '../core/properties/property-shared';
4
4
  import { StyleSheetSelectorScope, fromAstNode, matchMediaQueryString, matchSelectorCandidates } from './css-selector';
5
5
  import { Trace } from './styling-shared';
6
+ import { isEvaluableMediaQuery } from '../../css-mediaquery';
6
7
  import { File, knownFolders, path } from '../../file-system';
7
8
  import { Application } from '../../application';
8
9
  import { profile } from './styling-profile';
@@ -439,6 +440,11 @@ export function _populateRules(nodes, rulesets, keyframes, mediaQueryString) {
439
440
  keyframes.push(keyframeRule);
440
441
  }
441
442
  else if (isMedia(node)) {
443
+ // A query the runtime cannot evaluate never matches, so its rules are dead weight
444
+ if (!isEvaluableMediaQuery(node.media)) {
445
+ Trace.write(`Dropping '@media ${node.media}': the runtime cannot evaluate it`, Trace.categories.MediaQuery, Trace.messageType.warn);
446
+ continue;
447
+ }
442
448
  // Media query can be an array of strings in case of nested queries
443
449
  let compositeMediaQuery;
444
450
  if (mediaQueryString) {