@hanzogui/web 8.1.1 → 8.2.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.
Files changed (117) hide show
  1. package/dist/cjs/Gui.native.js.map +1 -1
  2. package/dist/cjs/_withStableStyle.native.js.map +1 -1
  3. package/dist/cjs/animationDriverTypes.test-d.native.js.map +1 -1
  4. package/dist/cjs/config.native.js.map +1 -1
  5. package/dist/cjs/constants/constants.native.js.map +1 -1
  6. package/dist/cjs/constants/isDevTools.native.js.map +1 -1
  7. package/dist/cjs/contexts/ComponentContext.native.js.map +1 -1
  8. package/dist/cjs/contexts/GroupContext.native.js.map +1 -1
  9. package/dist/cjs/createComponent.native.js.map +1 -1
  10. package/dist/cjs/createFont.native.js.map +1 -1
  11. package/dist/cjs/createGui.native.js.map +1 -1
  12. package/dist/cjs/createShorthands.native.js.map +1 -1
  13. package/dist/cjs/createTokens.native.js.map +1 -1
  14. package/dist/cjs/createVariable.native.js.map +1 -1
  15. package/dist/cjs/createVariables.native.js.map +1 -1
  16. package/dist/cjs/defaultComponentState.native.js.map +1 -1
  17. package/dist/cjs/helpers/createDesignSystem.native.js.map +1 -1
  18. package/dist/cjs/helpers/createMediaStyle.native.js.map +1 -1
  19. package/dist/cjs/helpers/createStyledContext.native.js.map +1 -1
  20. package/dist/cjs/helpers/defaultAnimationDriver.native.js.map +1 -1
  21. package/dist/cjs/helpers/defaultOffset.native.js.map +1 -1
  22. package/dist/cjs/helpers/expandStyle.native.js +4 -0
  23. package/dist/cjs/helpers/expandStyle.native.js.map +1 -1
  24. package/dist/cjs/helpers/expandStyles.cjs +8 -0
  25. package/dist/cjs/helpers/expandStyles.native.js.map +1 -1
  26. package/dist/cjs/helpers/getDefaultProps.native.js.map +1 -1
  27. package/dist/cjs/helpers/getDynamicVal.native.js.map +1 -1
  28. package/dist/cjs/helpers/getExpandedShorthands.native.js.map +1 -1
  29. package/dist/cjs/helpers/getFontLanguage.native.js.map +1 -1
  30. package/dist/cjs/helpers/getGroupPropParts.native.js.map +1 -1
  31. package/dist/cjs/helpers/getShorthandValue.native.js.map +1 -1
  32. package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
  33. package/dist/cjs/helpers/getTokenForKey.native.js.map +1 -1
  34. package/dist/cjs/helpers/getVariantExtras.native.js.map +1 -1
  35. package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
  36. package/dist/cjs/helpers/isActivePlatform.native.js.map +1 -1
  37. package/dist/cjs/helpers/isActiveTheme.native.js.map +1 -1
  38. package/dist/cjs/helpers/isGuiComponent.native.js.map +1 -1
  39. package/dist/cjs/helpers/isGuiElement.native.js.map +1 -1
  40. package/dist/cjs/helpers/isObj.native.js.map +1 -1
  41. package/dist/cjs/helpers/log.native.js.map +1 -1
  42. package/dist/cjs/helpers/mediaObjectToString.native.js.map +1 -1
  43. package/dist/cjs/helpers/mediaState.native.js.map +1 -1
  44. package/dist/cjs/helpers/mergeProps.native.js.map +1 -1
  45. package/dist/cjs/helpers/mergeRenderElementProps.native.js.map +1 -1
  46. package/dist/cjs/helpers/mergeSlotStyleProps.native.js.map +1 -1
  47. package/dist/cjs/helpers/mergeVariants.native.js.map +1 -1
  48. package/dist/cjs/helpers/nativeOnlyProps.native.js.map +1 -1
  49. package/dist/cjs/helpers/normalizeStyle.native.js.map +1 -1
  50. package/dist/cjs/helpers/normalizeValueWithProperty.native.js.map +1 -1
  51. package/dist/cjs/helpers/objectIdentityKey.native.js.map +1 -1
  52. package/dist/cjs/helpers/parseNativeStyle.native.js.map +1 -1
  53. package/dist/cjs/helpers/propMapper.native.js.map +1 -1
  54. package/dist/cjs/helpers/proxyThemeToParents.native.js.map +1 -1
  55. package/dist/cjs/helpers/proxyThemeVariables.native.js.map +1 -1
  56. package/dist/cjs/helpers/pseudoDescriptors.native.js.map +1 -1
  57. package/dist/cjs/helpers/pseudoTransitions.native.js.map +1 -1
  58. package/dist/cjs/helpers/registerCSSVariable.native.js.map +1 -1
  59. package/dist/cjs/helpers/resolveAnimationDriver.native.js.map +1 -1
  60. package/dist/cjs/helpers/resolveCompoundTokens.native.js.map +1 -1
  61. package/dist/cjs/helpers/skipProps.native.js.map +1 -1
  62. package/dist/cjs/helpers/sortString.native.js.map +1 -1
  63. package/dist/cjs/helpers/styleOriginalValues.native.js.map +1 -1
  64. package/dist/cjs/helpers/styleProvenance.native.js.map +1 -1
  65. package/dist/cjs/helpers/subscribeToContextGroup.native.js.map +1 -1
  66. package/dist/cjs/helpers/themeable.native.js.map +1 -1
  67. package/dist/cjs/helpers/themes.native.js.map +1 -1
  68. package/dist/cjs/helpers/timer.native.js.map +1 -1
  69. package/dist/cjs/helpers/transformsToString.native.js.map +1 -1
  70. package/dist/cjs/helpers/useRenderElement.native.js.map +1 -1
  71. package/dist/cjs/helpers/wrapStyleTags.native.js.map +1 -1
  72. package/dist/cjs/hooks/getThemeProxied.native.js.map +1 -1
  73. package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
  74. package/dist/cjs/hooks/useDisableSSR.native.js.map +1 -1
  75. package/dist/cjs/hooks/useIsTouchDevice.native.js.map +1 -1
  76. package/dist/cjs/hooks/useMedia.native.js.map +1 -1
  77. package/dist/cjs/hooks/useProps.native.js.map +1 -1
  78. package/dist/cjs/hooks/useTheme.native.js.map +1 -1
  79. package/dist/cjs/hooks/useThemeName.native.js.map +1 -1
  80. package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
  81. package/dist/cjs/index.native.js.map +1 -1
  82. package/dist/cjs/inject-styles.native.js.map +1 -1
  83. package/dist/cjs/insertFont.native.js.map +1 -1
  84. package/dist/cjs/interfaces/CSSColorNames.native.js.map +1 -1
  85. package/dist/cjs/interfaces/GetRef.native.js.map +1 -1
  86. package/dist/cjs/interfaces/GuiComponentEvents.native.js.map +1 -1
  87. package/dist/cjs/interfaces/GuiComponentPropsBaseBase.native.js.map +1 -1
  88. package/dist/cjs/interfaces/RNExclusiveTypes.native.js.map +1 -1
  89. package/dist/cjs/opacityModifier.test-d.native.js.map +1 -1
  90. package/dist/cjs/setupHooks.native.js.map +1 -1
  91. package/dist/cjs/setupReactNative.native.js.map +1 -1
  92. package/dist/cjs/styled.native.js.map +1 -1
  93. package/dist/cjs/styledHtml.test-d.native.js.map +1 -1
  94. package/dist/cjs/styledNonStyleProps.test-d.native.js.map +1 -1
  95. package/dist/cjs/type-utils.native.js.map +1 -1
  96. package/dist/cjs/types.native.js.map +1 -1
  97. package/dist/cjs/views/Configuration.native.js.map +1 -1
  98. package/dist/cjs/views/GuiProvider.native.js.map +1 -1
  99. package/dist/cjs/views/Slot.native.js.map +1 -1
  100. package/dist/cjs/views/Text.native.js.map +1 -1
  101. package/dist/cjs/views/Theme.native.js.map +1 -1
  102. package/dist/cjs/views/ThemeProvider.native.js.map +1 -1
  103. package/dist/cjs/views/View.native.js.map +1 -1
  104. package/dist/esm/helpers/expandStyle.native.js +4 -0
  105. package/dist/esm/helpers/expandStyle.native.js.map +1 -1
  106. package/dist/esm/helpers/expandStyles.mjs +8 -0
  107. package/dist/esm/helpers/expandStyles.mjs.map +1 -1
  108. package/package.json +13 -13
  109. package/src/helpers/expandStyle.ts +26 -0
  110. package/src/helpers/expandStyles.ts +49 -0
  111. package/src/types.tsx +94 -8
  112. package/types/helpers/expandStyle.d.ts.map +1 -1
  113. package/types/helpers/expandStyles.d.ts.map +1 -1
  114. package/types/helpers/webPropsToSkip.native.d.ts +20 -0
  115. package/types/helpers/webPropsToSkip.native.d.ts.map +1 -1
  116. package/types/types.d.ts +79 -8
  117. package/types/types.d.ts.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","View_exports","View","module","exports","import_helpers","require","import_createComponent","createComponent","acceptsClassName","validStyles"],"sources":["View.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar View_exports = {};\n__export(View_exports, {\n View: () => View\n});\nmodule.exports = __toCommonJS(View_exports);\nvar import_helpers = require(\"@hanzogui/helpers\");\nvar import_createComponent = require(\"../createComponent\");\nvar View = (0, import_createComponent.createComponent)({\n acceptsClassName: true,\n validStyles: import_helpers.validStyles\n});\n//# sourceMappingURL=View.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBZ,SAAS,CAACW,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,EAAEF,GAAG,CAACC,IAAI,CAAC;IAAEE,UAAU,EAAE;EAAK,CAAC,CAAC;AACjE,CAAC;AACD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,EAAE;IAClE,KAAK,IAAIG,GAAG,IAAIhB,iBAAiB,CAACa,IAAI,CAAC,EACrC,IAAI,CAACX,YAAY,CAACe,IAAI,CAACL,EAAE,EAAEI,GAAG,CAAC,IAAIA,GAAG,KAAKF,MAAM,EAC/CnB,SAAS,CAACiB,EAAE,EAAEI,GAAG,EAAE;MAAEP,GAAG,EAAEA,CAAA,KAAMI,IAAI,CAACG,GAAG,CAAC;MAAEN,UAAU,EAAE,EAAEK,IAAI,GAAGjB,gBAAgB,CAACe,IAAI,EAAEG,GAAG,CAAC,CAAC,IAAID,IAAI,CAACL;IAAW,CAAC,CAAC;EACxH;EACA,OAAOE,EAAE;AACX,CAAC;AACD,IAAIM,YAAY,GAAIC,GAAG,IAAKR,WAAW,CAAChB,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE;EAAEyB,KAAK,EAAE;AAAK,CAAC,CAAC,EAAED,GAAG,CAAC;AAC1F,IAAIE,YAAY,GAAG,CAAC,CAAC;AACrBhB,QAAQ,CAACgB,YAAY,EAAE;EACrBC,IAAI,EAAEA,CAAA,KAAMA;AACd,CAAC,CAAC;AACFC,MAAM,CAACC,OAAO,GAAGN,YAAY,CAACG,YAAY,CAAC;AAC3C,IAAII,cAAc,GAAGC,OAAO,CAAC,mBAAmB,CAAC;AACjD,IAAIC,sBAAsB,GAAGD,OAAO,CAAC,8BAAoB,CAAC;AAC1D,IAAIJ,IAAI,GAAG,CAAC,CAAC,EAAEK,sBAAsB,CAACC,eAAe,EAAE;EACrDC,gBAAgB,EAAE,IAAI;EACtBC,WAAW,EAAEL,cAAc,CAACK;AAC9B,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","View_exports","__export","View","module","exports","import_helpers","require","import_createComponent","createComponent","acceptsClassName","validStyles"],"sources":["../../../src/views/View.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,YAAA;AAAAC,QAAA,CAAAD,YAAA;EAAAE,IAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAA4B,CAAAK,YAAA;AAE5B,IAAAK,cAAA,GAAAC,OAAA,CAAgC;AASzB,IAAAC,sBAAa,GAAAD,OAAA,+BAKlB;AAAA,IACAJ,IAAA,OAAAK,sBAAkB,CAAAC,eAAA;EAClBC,gBAAA;EACDC,WAAA,EAAAL,cAAA,CAAAK","ignoreList":[]}
@@ -21,6 +21,10 @@ function expandStyle(key, value) {
21
21
  case "position":
22
22
  if (value === "fixed" || value === "sticky") return [["position", "absolute"]];
23
23
  return;
24
+ case "display":
25
+ if (value === "grid" || value === "inline-grid") return [["display", "flex"]];
26
+ if (value === "list-item") return [["display", "flex"]];
27
+ return;
24
28
  case "backgroundImage":
25
29
  return [["experimental_backgroundImage", value]];
26
30
  case "border":
@@ -1 +1 @@
1
- {"version":3,"names":["isAndroid","isWeb","getStyleCompat","parseBorderShorthand","parseOutlineShorthand","_loop","parent2","_exec","_exec_index","prefix","slice","exec","index","length","EXPANSIONS","map","k","expandStyle","key","value","arguments","resizeModeMap","verticalAlignMap","parsed","parsed1","nativeInlineExpansions","universalExpansions","fill","none","contain","cover","top","middle","bottom","auto","all","horiz","vert","xy","borderColor","borderRadius","borderWidth","margin","marginHorizontal","marginVertical","padding","paddingHorizontal","paddingVertical","borderStyle","overflow","overscrollBehavior","parent","inset","insetBlock","insetBlockStart","insetBlockEnd","marginBlock","marginBlockStart","marginBlockEnd","paddingBlock","paddingBlockStart","paddingBlockEnd","borderBlockColor","borderBlockWidth","borderBlockStyle","borderBlockStartColor","borderBlockEndColor","borderBlockStartWidth","borderBlockEndWidth","borderBlockStartStyle","borderBlockEndStyle","minBlockSize","maxBlockSize","minInlineSize","maxInlineSize","blockSize","inlineSize","borderInlineColor","borderInlineWidth","borderInlineStyle","borderInlineStartColor","borderInlineEndColor","borderInlineStartWidth","borderInlineEndWidth","borderInlineStartStyle","borderInlineEndStyle","marginInline","marginInlineStart","marginInlineEnd","paddingInline","paddingInlineStart","paddingInlineEnd","insetInlineStart","insetInlineEnd"],"sources":["expandStyle.native.js"],"sourcesContent":["import { isAndroid, isWeb } from \"@hanzogui/constants\";\nimport { getStyleCompat } from \"../config\";\nimport { parseBorderShorthand } from \"./parseBorderShorthand\";\nimport { parseOutlineShorthand } from \"./parseOutlineShorthand\";\n\nvar _loop = function(parent2) {\n\tvar _exec;\n\tvar _exec_index;\n\tvar prefix = parent2.slice(0, (_exec_index = (_exec = /[A-Z]/.exec(parent2)) === null || _exec === void 0 ? void 0 : _exec.index) !== null && _exec_index !== void 0 ? _exec_index : parent2.length);\n\tEXPANSIONS[parent2] = EXPANSIONS[parent2].map(function(k) {\n\t\treturn `${prefix}${k}`;\n\t});\n};\nfunction expandStyle(key, value) {\n\targuments.length > 2 && arguments[2] !== void 0 ? arguments[2] : getStyleCompat();\n\tif (isAndroid && key === \"elevationAndroid\") return [[\"elevation\", value]];\n\tswitch (key) {\n\t\tcase \"objectFit\": return [[\"resizeMode\", resizeModeMap[value] || \"cover\"]];\n\t\tcase \"verticalAlign\": return [[\"textAlignVertical\", verticalAlignMap[value] || \"auto\"]];\n\t\tcase \"position\":\n\t\t\tif (value === \"fixed\" || value === \"sticky\") return [[\"position\", \"absolute\"]];\n\t\t\treturn;\n\t\tcase \"backgroundImage\": return [[\"experimental_backgroundImage\", value]];\n\t\tcase \"border\":\n\t\t\tif (typeof value === \"string\") {\n\t\t\t\tvar parsed = parseBorderShorthand(value);\n\t\t\t\tif (parsed) return parsed;\n\t\t\t}\n\t\t\treturn;\n\t\tcase \"outline\":\n\t\t\tif (typeof value === \"string\") {\n\t\t\t\tvar parsed1 = parseOutlineShorthand(value);\n\t\t\t\tif (parsed1) return parsed1;\n\t\t\t}\n\t\t\treturn;\n\t}\n\tif (key in nativeInlineExpansions) return nativeInlineExpansions[key].map(function(k) {\n\t\treturn [k, value];\n\t});\n\tif (key in universalExpansions) return universalExpansions[key].map(function(k) {\n\t\treturn [k, value];\n\t});\n\tif (key in EXPANSIONS) return EXPANSIONS[key].map(function(k) {\n\t\treturn [k, value];\n\t});\n}\nvar resizeModeMap = {\n\tfill: \"stretch\",\n\tnone: \"center\",\n\t\"scale-down\": \"contain\",\n\tcontain: \"contain\",\n\tcover: \"cover\"\n};\nvar verticalAlignMap = {\n\ttop: \"top\",\n\tmiddle: \"center\",\n\tbottom: \"bottom\",\n\tauto: \"auto\"\n};\nvar all = [\n\t\"Top\",\n\t\"Right\",\n\t\"Bottom\",\n\t\"Left\"\n];\nvar horiz = [\"Right\", \"Left\"];\nvar vert = [\"Top\", \"Bottom\"];\nvar xy = [\"X\", \"Y\"];\nvar EXPANSIONS = {\n\tborderColor: [\n\t\t\"TopColor\",\n\t\t\"RightColor\",\n\t\t\"BottomColor\",\n\t\t\"LeftColor\"\n\t],\n\tborderRadius: [\n\t\t\"TopLeftRadius\",\n\t\t\"TopRightRadius\",\n\t\t\"BottomRightRadius\",\n\t\t\"BottomLeftRadius\"\n\t],\n\tborderWidth: [\n\t\t\"TopWidth\",\n\t\t\"RightWidth\",\n\t\t\"BottomWidth\",\n\t\t\"LeftWidth\"\n\t],\n\tmargin: all,\n\tmarginHorizontal: horiz,\n\tmarginVertical: vert,\n\tpadding: all,\n\tpaddingHorizontal: horiz,\n\tpaddingVertical: vert,\n\t...isWeb && {\n\t\tborderStyle: [\n\t\t\t\"TopStyle\",\n\t\t\t\"RightStyle\",\n\t\t\t\"BottomStyle\",\n\t\t\t\"LeftStyle\"\n\t\t],\n\t\toverflow: xy,\n\t\toverscrollBehavior: xy\n\t}\n};\nfor (var parent in EXPANSIONS) _loop(parent);\nvar universalExpansions = {\n\tinset: [\n\t\t\"top\",\n\t\t\"right\",\n\t\t\"bottom\",\n\t\t\"left\"\n\t],\n\tinsetBlock: [\"top\", \"bottom\"],\n\tinsetBlockStart: [\"top\"],\n\tinsetBlockEnd: [\"bottom\"],\n\tmarginBlock: [\"marginTop\", \"marginBottom\"],\n\tmarginBlockStart: [\"marginTop\"],\n\tmarginBlockEnd: [\"marginBottom\"],\n\tpaddingBlock: [\"paddingTop\", \"paddingBottom\"],\n\tpaddingBlockStart: [\"paddingTop\"],\n\tpaddingBlockEnd: [\"paddingBottom\"],\n\tborderBlockColor: [\"borderTopColor\", \"borderBottomColor\"],\n\tborderBlockWidth: [\"borderTopWidth\", \"borderBottomWidth\"],\n\tborderBlockStyle: [\"borderTopStyle\", \"borderBottomStyle\"],\n\tborderBlockStartColor: [\"borderTopColor\"],\n\tborderBlockEndColor: [\"borderBottomColor\"],\n\tborderBlockStartWidth: [\"borderTopWidth\"],\n\tborderBlockEndWidth: [\"borderBottomWidth\"],\n\tborderBlockStartStyle: [\"borderTopStyle\"],\n\tborderBlockEndStyle: [\"borderBottomStyle\"],\n\tminBlockSize: [\"minHeight\"],\n\tmaxBlockSize: [\"maxHeight\"],\n\tminInlineSize: [\"minWidth\"],\n\tmaxInlineSize: [\"maxWidth\"],\n\tblockSize: [\"height\"],\n\tinlineSize: [\"width\"]\n};\nvar nativeInlineExpansions = {\n\tborderInlineColor: [\"borderEndColor\", \"borderStartColor\"],\n\tborderInlineWidth: [\"borderEndWidth\", \"borderStartWidth\"],\n\tborderInlineStyle: [\"borderEndStyle\", \"borderStartStyle\"],\n\tborderInlineStartColor: [\"borderStartColor\"],\n\tborderInlineEndColor: [\"borderEndColor\"],\n\tborderInlineStartWidth: [\"borderStartWidth\"],\n\tborderInlineEndWidth: [\"borderEndWidth\"],\n\tborderInlineStartStyle: [\"borderStartStyle\"],\n\tborderInlineEndStyle: [\"borderEndStyle\"],\n\tmarginInline: [\"marginEnd\", \"marginStart\"],\n\tmarginInlineStart: [\"marginStart\"],\n\tmarginInlineEnd: [\"marginEnd\"],\n\tpaddingInline: [\"paddingEnd\", \"paddingStart\"],\n\tpaddingInlineStart: [\"paddingStart\"],\n\tpaddingInlineEnd: [\"paddingEnd\"],\n\tinsetInlineStart: [\"left\"],\n\tinsetInlineEnd: [\"right\"]\n};\n\nexport { expandStyle };"],"mappings":"AAAA,SAASA,SAAS,EAAEC,KAAK,QAAQ,qBAAqB;AACtD,SAASC,cAAc,QAAQ,qBAAW;AAC1C,SAASC,oBAAoB,QAAQ,kCAAwB;AAC7D,SAASC,qBAAqB,QAAQ,mCAAyB;AAE/D,IAAIC,KAAK,GAAG,SAAAA,CAASC,OAAO,EAAE;EAC7B,IAAIC,KAAK;EACT,IAAIC,WAAW;EACf,IAAIC,MAAM,GAAGH,OAAO,CAACI,KAAK,CAAC,CAAC,EAAE,CAACF,WAAW,GAAG,CAACD,KAAK,GAAG,OAAO,CAACI,IAAI,CAACL,OAAO,CAAC,MAAM,IAAI,IAAIC,KAAK,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,KAAK,CAACK,KAAK,MAAM,IAAI,IAAIJ,WAAW,KAAK,KAAK,CAAC,GAAGA,WAAW,GAAGF,OAAO,CAACO,MAAM,CAAC;EACpMC,UAAU,CAACR,OAAO,CAAC,GAAGQ,UAAU,CAACR,OAAO,CAAC,CAACS,GAAG,CAAC,UAASC,CAAC,EAAE;IACzD,OAAO,GAAGP,MAAM,GAAGO,CAAC,EAAE;EACvB,CAAC,CAAC;AACH,CAAC;AACD,SAASC,WAAWA,CAACC,GAAG,EAAEC,KAAK,EAAE;EAChCC,SAAS,CAACP,MAAM,GAAG,CAAC,IAAIO,SAAS,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,GAAGA,SAAS,CAAC,CAAC,CAAC,GAAGlB,cAAc,CAAC,CAAC;EACjF,IAAIF,SAAS,IAAIkB,GAAG,KAAK,kBAAkB,EAAE,OAAO,CAAC,CAAC,WAAW,EAAEC,KAAK,CAAC,CAAC;EAC1E,QAAQD,GAAG;IACV,KAA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,CAAC,gBAAgB,EAAE,kBAAkB,CAAC;EACzDC,iBAAiB,EAAE,CAAC,gBAAgB,EAAE,kBAAkB,CAAC;EACzDC,sBAAsB,EAAE,CAAC,kBAAkB,CAAC;EAC5CC,oBAAoB,EAAE,CAAC,gBAAgB,CAAC;EACxCC,sBAAsB,EAAE,CAAC,kBAAkB,CAAC;EAC5CC,oBAAoB,EAAE,CAAC,gBAAgB,CAAC;EACxCC,sBAAsB,EAAE,CAAC,kBAAkB,CAAC;EAC5CC,oBAAoB,EAAE,CAAC,gBAAgB,CAAC;EACxCC,YAAY,EAAE,CAAC,WAAW,EAAE,aAAa,CAAC;EAC1CC,iBAAiB,EAAE,CAAC,aAAa,CAAC;EAClCC,eAAe,EAAE,CAAC,WAAW,CAAC;EAC9BC,aAAa,EAAE,CAAC,YAAY,EAAE,cAAc,CAAC;EAC7CC,kBAAkB,EAAE,CAAC,cAAc,CAAC;EACpCC,gBAAgB,EAAE,CAAC,YAAY,CAAC;EAChCC,gBAAgB,EAAE,CAAC,MAAM,CAAC;EAC1BC,cAAc,EAAE,CAAC,OAAO;AACzB,CAAC;AAED,SAAS5E,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["isAndroid","isWeb","getStyleCompat","parseBorderShorthand","parseOutlineShorthand","_loop","parent2","_exec","_exec_index","prefix","slice","exec","index","length","EXPANSIONS","map","k","expandStyle","key","value","arguments","resizeModeMap","verticalAlignMap","parsed","parsed1","nativeInlineExpansions","universalExpansions","fill","none","contain","cover","top","middle","bottom","auto","all","horiz","vert","xy","borderColor","borderRadius","borderWidth","margin","marginHorizontal","marginVertical","padding","paddingHorizontal","paddingVertical","borderStyle","overflow","overscrollBehavior","parent","inset","insetBlock","insetBlockStart","insetBlockEnd","marginBlock","marginBlockStart","marginBlockEnd","paddingBlock","paddingBlockStart","paddingBlockEnd","borderBlockColor","borderBlockWidth","borderBlockStyle","borderBlockStartColor","borderBlockEndColor","borderBlockStartWidth","borderBlockEndWidth","borderBlockStartStyle","borderBlockEndStyle","minBlockSize","maxBlockSize","minInlineSize","maxInlineSize","blockSize","inlineSize","borderInlineColor","borderInlineWidth","borderInlineStyle","borderInlineStartColor","borderInlineEndColor","borderInlineStartWidth","borderInlineEndWidth","borderInlineStartStyle","borderInlineEndStyle","marginInline","marginInlineStart","marginInlineEnd","paddingInline","paddingInlineStart","paddingInlineEnd","insetInlineStart","insetInlineEnd"],"sources":["expandStyle.native.js"],"sourcesContent":["import { isAndroid, isWeb } from \"@hanzogui/constants\";\nimport { getStyleCompat } from \"../config\";\nimport { parseBorderShorthand } from \"./parseBorderShorthand\";\nimport { parseOutlineShorthand } from \"./parseOutlineShorthand\";\n\nvar _loop = function(parent2) {\n\tvar _exec;\n\tvar _exec_index;\n\tvar prefix = parent2.slice(0, (_exec_index = (_exec = /[A-Z]/.exec(parent2)) === null || _exec === void 0 ? void 0 : _exec.index) !== null && _exec_index !== void 0 ? _exec_index : parent2.length);\n\tEXPANSIONS[parent2] = EXPANSIONS[parent2].map(function(k) {\n\t\treturn `${prefix}${k}`;\n\t});\n};\nfunction expandStyle(key, value) {\n\targuments.length > 2 && arguments[2] !== void 0 ? arguments[2] : getStyleCompat();\n\tif (isAndroid && key === \"elevationAndroid\") return [[\"elevation\", value]];\n\tswitch (key) {\n\t\tcase \"objectFit\": return [[\"resizeMode\", resizeModeMap[value] || \"cover\"]];\n\t\tcase \"verticalAlign\": return [[\"textAlignVertical\", verticalAlignMap[value] || \"auto\"]];\n\t\tcase \"position\":\n\t\t\tif (value === \"fixed\" || value === \"sticky\") return [[\"position\", \"absolute\"]];\n\t\t\treturn;\n\t\tcase \"display\":\n\t\t\tif (value === \"grid\" || value === \"inline-grid\") return [[\"display\", \"flex\"]];\n\t\t\tif (value === \"list-item\") return [[\"display\", \"flex\"]];\n\t\t\treturn;\n\t\tcase \"backgroundImage\": return [[\"experimental_backgroundImage\", value]];\n\t\tcase \"border\":\n\t\t\tif (typeof value === \"string\") {\n\t\t\t\tvar parsed = parseBorderShorthand(value);\n\t\t\t\tif (parsed) return parsed;\n\t\t\t}\n\t\t\treturn;\n\t\tcase \"outline\":\n\t\t\tif (typeof value === \"string\") {\n\t\t\t\tvar parsed1 = parseOutlineShorthand(value);\n\t\t\t\tif (parsed1) return parsed1;\n\t\t\t}\n\t\t\treturn;\n\t}\n\tif (key in nativeInlineExpansions) return nativeInlineExpansions[key].map(function(k) {\n\t\treturn [k, value];\n\t});\n\tif (key in universalExpansions) return universalExpansions[key].map(function(k) {\n\t\treturn [k, value];\n\t});\n\tif (key in EXPANSIONS) return EXPANSIONS[key].map(function(k) {\n\t\treturn [k, value];\n\t});\n}\nvar resizeModeMap = {\n\tfill: \"stretch\",\n\tnone: \"center\",\n\t\"scale-down\": \"contain\",\n\tcontain: \"contain\",\n\tcover: \"cover\"\n};\nvar verticalAlignMap = {\n\ttop: \"top\",\n\tmiddle: \"center\",\n\tbottom: \"bottom\",\n\tauto: \"auto\"\n};\nvar all = [\n\t\"Top\",\n\t\"Right\",\n\t\"Bottom\",\n\t\"Left\"\n];\nvar horiz = [\"Right\", \"Left\"];\nvar vert = [\"Top\", \"Bottom\"];\nvar xy = [\"X\", \"Y\"];\nvar EXPANSIONS = {\n\tborderColor: [\n\t\t\"TopColor\",\n\t\t\"RightColor\",\n\t\t\"BottomColor\",\n\t\t\"LeftColor\"\n\t],\n\tborderRadius: [\n\t\t\"TopLeftRadius\",\n\t\t\"TopRightRadius\",\n\t\t\"BottomRightRadius\",\n\t\t\"BottomLeftRadius\"\n\t],\n\tborderWidth: [\n\t\t\"TopWidth\",\n\t\t\"RightWidth\",\n\t\t\"BottomWidth\",\n\t\t\"LeftWidth\"\n\t],\n\tmargin: all,\n\tmarginHorizontal: horiz,\n\tmarginVertical: vert,\n\tpadding: all,\n\tpaddingHorizontal: horiz,\n\tpaddingVertical: vert,\n\t...isWeb && {\n\t\tborderStyle: [\n\t\t\t\"TopStyle\",\n\t\t\t\"RightStyle\",\n\t\t\t\"BottomStyle\",\n\t\t\t\"LeftStyle\"\n\t\t],\n\t\toverflow: xy,\n\t\toverscrollBehavior: xy\n\t}\n};\nfor (var parent in EXPANSIONS) _loop(parent);\nvar universalExpansions = {\n\tinset: [\n\t\t\"top\",\n\t\t\"right\",\n\t\t\"bottom\",\n\t\t\"left\"\n\t],\n\tinsetBlock: [\"top\", \"bottom\"],\n\tinsetBlockStart: [\"top\"],\n\tinsetBlockEnd: [\"bottom\"],\n\tmarginBlock: [\"marginTop\", \"marginBottom\"],\n\tmarginBlockStart: [\"marginTop\"],\n\tmarginBlockEnd: [\"marginBottom\"],\n\tpaddingBlock: [\"paddingTop\", \"paddingBottom\"],\n\tpaddingBlockStart: [\"paddingTop\"],\n\tpaddingBlockEnd: [\"paddingBottom\"],\n\tborderBlockColor: [\"borderTopColor\", \"borderBottomColor\"],\n\tborderBlockWidth: [\"borderTopWidth\", \"borderBottomWidth\"],\n\tborderBlockStyle: [\"borderTopStyle\", \"borderBottomStyle\"],\n\tborderBlockStartColor: [\"borderTopColor\"],\n\tborderBlockEndColor: [\"borderBottomColor\"],\n\tborderBlockStartWidth: [\"borderTopWidth\"],\n\tborderBlockEndWidth: [\"borderBottomWidth\"],\n\tborderBlockStartStyle: [\"borderTopStyle\"],\n\tborderBlockEndStyle: [\"borderBottomStyle\"],\n\tminBlockSize: [\"minHeight\"],\n\tmaxBlockSize: [\"maxHeight\"],\n\tminInlineSize: [\"minWidth\"],\n\tmaxInlineSize: [\"maxWidth\"],\n\tblockSize: [\"height\"],\n\tinlineSize: [\"width\"]\n};\nvar nativeInlineExpansions = {\n\tborderInlineColor: [\"borderEndColor\", \"borderStartColor\"],\n\tborderInlineWidth: [\"borderEndWidth\", \"borderStartWidth\"],\n\tborderInlineStyle: [\"borderEndStyle\", \"borderStartStyle\"],\n\tborderInlineStartColor: [\"borderStartColor\"],\n\tborderInlineEndColor: [\"borderEndColor\"],\n\tborderInlineStartWidth: [\"borderStartWidth\"],\n\tborderInlineEndWidth: [\"borderEndWidth\"],\n\tborderInlineStartStyle: [\"borderStartStyle\"],\n\tborderInlineEndStyle: [\"borderEndStyle\"],\n\tmarginInline: [\"marginEnd\", \"marginStart\"],\n\tmarginInlineStart: [\"marginStart\"],\n\tmarginInlineEnd: [\"marginEnd\"],\n\tpaddingInline: [\"paddingEnd\", \"paddingStart\"],\n\tpaddingInlineStart: [\"paddingStart\"],\n\tpaddingInlineEnd: [\"paddingEnd\"],\n\tinsetInlineStart: [\"left\"],\n\tinsetInlineEnd: [\"right\"]\n};\n\nexport { expandStyle };"],"mappings":"AAAA,SAASA,SAAS,EAAEC,KAAK,QAAQ,qBAAqB;AACtD,SAASC,cAAc,QAAQ,qBAAW;AAC1C,SAASC,oBAAoB,QAAQ,kCAAwB;AAC7D,SAASC,qBAAqB,QAAQ,mCAAyB;AAE/D,IAAIC,KAAK,GAAG,SAAAA,CAASC,OAAO,EAAE;EAC7B,IAAIC,KAAK;EACT,IAAIC,WAAW;EACf,IAAIC,MAAM,GAAGH,OAAO,CAACI,KAAK,CAAC,CAAC,EAAE,CAACF,WAAW,GAAG,CAACD,KAAK,GAAG,OAAO,CAACI,IAAI,CAACL,OAAO,CAAC,MAAM,IAAI,IAAIC,KAAK,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,KAAK,CAACK,KAAK,MAAM,IAAI,IAAIJ,WAAW,KAAK,KAAK,CAAC,GAAGA,WAAW,GAAGF,OAAO,CAACO,MAAM,CAAC;EACpMC,UAAU,CAACR,OAAO,CAAC,GAAGQ,UAAU,CAACR,OAAO,CAAC,CAACS,GAAG,CAAC,UAASC,CAAC,EAAE;IACzD,OAAO,GAAGP,MAAM,GAAGO,CAAC,EAAE;EACvB,CAAC,CAAC;AACH,CAAC;AACD,SAASC,WAAWA,CAACC,GAAG,EAAEC,KAAK,EAAE;EAChCC,SAAS,CAACP,MAAM,GAAG,CAAC,IAAIO,SAAS,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,GAAGA,SAAS,CAAC,CAAC,CAAC,GAAGlB,cAAc,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CAAC,mBAAmB,CAAC;EAC1CC,YAAY,EAAE,CAAC,WAAW,CAAC;EAC3BC,YAAY,EAAE,CAAC,WAAW,CAAC;EAC3BC,aAAa,EAAE,CAAC,UAAU,CAAC;EAC3BC,aAAa,EAAE,CAAC,UAAU,CAAC;EAC3BC,SAAS,EAAE,CAAC,QAAQ,CAAC;EACrBC,UAAU,EAAE,CAAC,OAAO;AACrB,CAAC;AACD,IAAInD,sBAAsB,GAAG;EAC5BoD,iBAAiB,EAAE,CAAC,gBAAgB,EAAE,kBAAkB,CAAC;EACzDC,iBAAiB,EAAE,CAAC,gBAAgB,EAAE,kBAAkB,CAAC;EACzDC,iBAAiB,EAAE,CAAC,gBAAgB,EAAE,kBAAkB,CAAC;EACzDC,sBAAsB,EAAE,CAAC,kBAAkB,CAAC;EAC5CC,oBAAoB,EAAE,CAAC,gBAAgB,CAAC;EACxCC,sBAAsB,EAAE,CAAC,kBAAkB,CAAC;EAC5CC,oBAAoB,EAAE,CAAC,gBAAgB,CAAC;EACxCC,sBAAsB,EAAE,CAAC,kBAAkB,CAAC;EAC5CC,oBAAoB,EAAE,CAAC,gBAAgB,CAAC;EACxCC,YAAY,EAAE,CAAC,WAAW,EAAE,aAAa,CAAC;EAC1CC,iBAAiB,EAAE,CAAC,aAAa,CAAC;EAClCC,eAAe,EAAE,CAAC,WAAW,CAAC;EAC9BC,aAAa,EAAE,CAAC,YAAY,EAAE,cAAc,CAAC;EAC7CC,kBAAkB,EAAE,CAAC,cAAc,CAAC;EACpCC,gBAAgB,EAAE,CAAC,YAAY,CAAC;EAChCC,gBAAgB,EAAE,CAAC,MAAM,CAAC;EAC1BC,cAAc,EAAE,CAAC,OAAO;AACzB,CAAC;AAED,SAAS5E,WAAW","ignoreList":[]}
@@ -1,9 +1,17 @@
1
1
  import { isWeb } from "@hanzogui/constants";
2
2
  import { normalizeShadow } from "./normalizeShadow.mjs";
3
3
  function fixStyles(style) {
4
+ resolveAxis(style);
4
5
  if (style.shadowRadius != null || style.shadowColor || style.shadowOpacity != null || style.shadowOffset) Object.assign(style, normalizeShadow(style));
5
6
  for (const key in borderDefaults) if (key in style) style[borderDefaults[key]] ||= "solid";
6
7
  }
8
+ function resolveAxis(style) {
9
+ if (style.display !== "grid" && style.display !== "inline-grid") return;
10
+ if (style.flexDirection !== "row" && style.flexDirection !== "row-reverse") return;
11
+ if (style.flexWrap === "wrap" || style.flexWrap === "wrap-reverse") return;
12
+ if (style.gridAutoFlow != null || style.grid != null || style.gridTemplate != null || style.gridTemplateAreas != null || style.gridTemplateColumns != null || style.gridTemplateRows != null) return;
13
+ style.gridAutoFlow = "column";
14
+ }
7
15
  const nativeStyle = isWeb ? null : "borderStyle";
8
16
  const borderDefaults = {
9
17
  borderWidth: "borderStyle",
@@ -1 +1 @@
1
- {"version":3,"names":["isWeb","normalizeShadow","fixStyles","style","shadowRadius","shadowColor","shadowOpacity","shadowOffset","Object","assign","key","borderDefaults","nativeStyle","borderWidth","borderBottomWidth","borderTopWidth","borderLeftWidth","borderRightWidth"],"sources":["expandStyles.mjs"],"sourcesContent":["import { isWeb } from \"@hanzogui/constants\";\nimport { normalizeShadow } from \"./normalizeShadow\";\n\nfunction fixStyles(style) {\n\tif (style.shadowRadius != null || style.shadowColor || style.shadowOpacity != null || style.shadowOffset) Object.assign(style, normalizeShadow(style));\n\tfor (const key in borderDefaults) if (key in style) style[borderDefaults[key]] ||= \"solid\";\n}\nconst nativeStyle = isWeb ? null : \"borderStyle\";\nconst borderDefaults = {\n\tborderWidth: \"borderStyle\",\n\tborderBottomWidth: nativeStyle || \"borderBottomStyle\",\n\tborderTopWidth: nativeStyle || \"borderTopStyle\",\n\tborderLeftWidth: nativeStyle || \"borderLeftStyle\",\n\tborderRightWidth: nativeStyle || \"borderRightStyle\"\n};\n\nexport { fixStyles };"],"mappings":"AAAA,SAASA,KAAK,QAAQ,qBAAqB;AAC3C,SAASC,eAAe,QAAQ,uBAAmB;AAEnD,SAASC,SAASA,CAACC,KAAK,EAAE;EACzB,IAAIA,KAAK,CAACC,YAAY,IAAI,IAAI,IAAID,KAAK,CAACE,WAAW,IAAIF,KAAK,CAACG,aAAa,IAAI,IAAI,IAAIH,KAAK,CAACI,YAAY,EAAEC,MAAM,CAACC,MAAM,CAACN,KAAK,EAAEF,eAAe,CAACE,KAAK,CAAC,CAAC;EACtJ,KAAK,MAAMO,GAAG,IAAIC,cAAc,EAAE,IAAID,GAAG,IAAIP,KAAK,EAAEA,KAAK,CAACQ,cAAc,CAACD,GAAG,CAAC,CAAC,KAAK,OAAO;AAC3F;AACA,MAAME,WAAW,GAAGZ,KAAK,GAAG,IAAI,GAAG,aAAa;AAChD,MAAMW,cAAc,GAAG;EACtBE,WAAW,EAAE,aAAa;EAC1BC,iBAAiB,EAAEF,WAAW,IAAI,mBAAmB;EACrDG,cAAc,EAAEH,WAAW,IAAI,gBAAgB;EAC/CI,eAAe,EAAEJ,WAAW,IAAI,iBAAiB;EACjDK,gBAAgB,EAAEL,WAAW,IAAI;AAClC,CAAC;AAED,SAASV,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["isWeb","normalizeShadow","fixStyles","style","resolveAxis","shadowRadius","shadowColor","shadowOpacity","shadowOffset","Object","assign","key","borderDefaults","display","flexDirection","flexWrap","gridAutoFlow","grid","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","nativeStyle","borderWidth","borderBottomWidth","borderTopWidth","borderLeftWidth","borderRightWidth"],"sources":["expandStyles.mjs"],"sourcesContent":["import { isWeb } from \"@hanzogui/constants\";\nimport { normalizeShadow } from \"./normalizeShadow\";\n\nfunction fixStyles(style) {\n\tresolveAxis(style);\n\tif (style.shadowRadius != null || style.shadowColor || style.shadowOpacity != null || style.shadowOffset) Object.assign(style, normalizeShadow(style));\n\tfor (const key in borderDefaults) if (key in style) style[borderDefaults[key]] ||= \"solid\";\n}\nfunction resolveAxis(style) {\n\tif (style.display !== \"grid\" && style.display !== \"inline-grid\") return;\n\tif (style.flexDirection !== \"row\" && style.flexDirection !== \"row-reverse\") return;\n\tif (style.flexWrap === \"wrap\" || style.flexWrap === \"wrap-reverse\") return;\n\tif (style.gridAutoFlow != null || style.grid != null || style.gridTemplate != null || style.gridTemplateAreas != null || style.gridTemplateColumns != null || style.gridTemplateRows != null) return;\n\tstyle.gridAutoFlow = \"column\";\n}\nconst nativeStyle = isWeb ? null : \"borderStyle\";\nconst borderDefaults = {\n\tborderWidth: \"borderStyle\",\n\tborderBottomWidth: nativeStyle || \"borderBottomStyle\",\n\tborderTopWidth: nativeStyle || \"borderTopStyle\",\n\tborderLeftWidth: nativeStyle || \"borderLeftStyle\",\n\tborderRightWidth: nativeStyle || \"borderRightStyle\"\n};\n\nexport { fixStyles };"],"mappings":"AAAA,SAASA,KAAK,QAAQ,qBAAqB;AAC3C,SAASC,eAAe,QAAQ,uBAAmB;AAEnD,SAASC,SAASA,CAACC,KAAK,EAAE;EACzBC,WAAW,CAACD,KAAK,CAAC;EAClB,IAAIA,KAAK,CAACE,YAAY,IAAI,IAAI,IAAIF,KAAK,CAACG,WAAW,IAAIH,KAAK,CAACI,aAAa,IAAI,IAAI,IAAIJ,KAAK,CAACK,YAAY,EAAEC,MAAM,CAACC,MAAM,CAACP,KAAK,EAAEF,eAAe,CAACE,KAAK,CAAC,CAAC;EACtJ,KAAK,MAAMQ,GAAG,IAAIC,cAAc,EAAE,IAAID,GAAG,IAAIR,KAAK,EAAEA,KAAK,CAACS,cAAc,CAACD,GAAG,CAAC,CAAC,KAAK,OAAO;AAC3F;AACA,SAASP,WAAWA,CAACD,KAAK,EAAE;EAC3B,IAAIA,KAAK,CAACU,OAAO,KAAK,MAAM,IAAIV,KAAK,CAACU,OAAO,KAAK,aAAa,EAAE;EACjE,IAAIV,KAAK,CAACW,aAAa,KAAK,KAAK,IAAIX,KAAK,CAACW,aAAa,KAAK,aAAa,EAAE;EAC5E,IAAIX,KAAK,CAACY,QAAQ,KAAK,MAAM,IAAIZ,KAAK,CAACY,QAAQ,KAAK,cAAc,EAAE;EACpE,IAAIZ,KAAK,CAACa,YAAY,IAAI,IAAI,IAAIb,KAAK,CAACc,IAAI,IAAI,IAAI,IAAId,KAAK,CAACe,YAAY,IAAI,IAAI,IAAIf,KAAK,CAACgB,iBAAiB,IAAI,IAAI,IAAIhB,KAAK,CAACiB,mBAAmB,IAAI,IAAI,IAAIjB,KAAK,CAACkB,gBAAgB,IAAI,IAAI,EAAE;EAC9LlB,KAAK,CAACa,YAAY,GAAG,QAAQ;AAC9B;AACA,MAAMM,WAAW,GAAGtB,KAAK,GAAG,IAAI,GAAG,aAAa;AAChD,MAAMY,cAAc,GAAG;EACtBW,WAAW,EAAE,aAAa;EAC1BC,iBAAiB,EAAEF,WAAW,IAAI,mBAAmB;EACrDG,cAAc,EAAEH,WAAW,IAAI,gBAAgB;EAC/CI,eAAe,EAAEJ,WAAW,IAAI,iBAAiB;EACjDK,gBAAgB,EAAEL,WAAW,IAAI;AAClC,CAAC;AAED,SAASpB,SAAS","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzogui/web",
3
- "version": "8.1.1",
3
+ "version": "8.2.1",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Nate Wienert"
@@ -65,20 +65,20 @@
65
65
  "test:web": "vitest --typecheck --run"
66
66
  },
67
67
  "dependencies": {
68
- "@hanzogui/compose-refs": "8.1.1",
69
- "@hanzogui/constants": "8.1.1",
70
- "@hanzogui/helpers": "8.1.1",
71
- "@hanzogui/is-equal-shallow": "8.1.1",
72
- "@hanzogui/native": "8.1.1",
73
- "@hanzogui/normalize-css-color": "8.1.1",
74
- "@hanzogui/timer": "8.1.1",
75
- "@hanzogui/types": "8.1.1",
76
- "@hanzogui/use-did-finish-ssr": "8.1.1",
77
- "@hanzogui/use-event": "8.1.1",
78
- "@hanzogui/use-force-update": "8.1.1"
68
+ "@hanzogui/compose-refs": "8.2.1",
69
+ "@hanzogui/constants": "8.2.1",
70
+ "@hanzogui/helpers": "8.2.1",
71
+ "@hanzogui/is-equal-shallow": "8.2.1",
72
+ "@hanzogui/native": "8.2.1",
73
+ "@hanzogui/normalize-css-color": "8.2.1",
74
+ "@hanzogui/timer": "8.2.1",
75
+ "@hanzogui/types": "8.2.1",
76
+ "@hanzogui/use-did-finish-ssr": "8.2.1",
77
+ "@hanzogui/use-event": "8.2.1",
78
+ "@hanzogui/use-force-update": "8.2.1"
79
79
  },
80
80
  "devDependencies": {
81
- "@hanzogui/build": "8.1.1",
81
+ "@hanzogui/build": "8.2.1",
82
82
  "@testing-library/react": "^16.1.0",
83
83
  "csstype": "^3.0.10",
84
84
  "react": ">=19",
@@ -113,6 +113,32 @@ export function expandStyle(
113
113
  }
114
114
  return
115
115
  }
116
+ case 'display': {
117
+ // display: grid|inline-grid -> flex on native, which has no grid
118
+ // engine (Yoga's Display enum is Flex, None, Contents).
119
+ //
120
+ // A grid with no template has one implicit column and fills it top to
121
+ // bottom, which is what a flex column already does — measured in
122
+ // Chromium, the same three children land at the same three offsets
123
+ // under both. So a one-dimensional grid arrives on native intact, and
124
+ // it arrives via the flex properties the element already carries: an
125
+ // XStack keeps its flexDirection 'row' and stays horizontal.
126
+ //
127
+ // Nothing else about grid crosses, and nothing pretends to. Every other
128
+ // grid property is web-only (gridProps in @hanzogui/helpers) and is
129
+ // stripped rather than handed to a layout pass that cannot read it.
130
+ if (value === 'grid' || value === 'inline-grid') {
131
+ return [['display', 'flex']]
132
+ }
133
+ // list-item crosses the same way and for the same reason: native has no
134
+ // marker box, and a bare <li> there already laid out as a flex column.
135
+ // Left untouched it warns in dev and lays out as flex regardless, so the
136
+ // degradation is identical and only the warning would be new.
137
+ if (value === 'list-item') {
138
+ return [['display', 'flex']]
139
+ }
140
+ return
141
+ }
116
142
  case 'backgroundImage': {
117
143
  // RN 0.76+ uses experimental_backgroundImage
118
144
  // value may be a parsed array (from parseNativeStyle) or a plain string
@@ -2,6 +2,10 @@ import { isWeb } from '@hanzogui/constants'
2
2
  import { normalizeShadow } from './normalizeShadow'
3
3
 
4
4
  export function fixStyles(style: Record<string, any>) {
5
+ if (process.env.GUI_TARGET === 'web') {
6
+ resolveAxis(style)
7
+ }
8
+
5
9
  if (process.env.GUI_TARGET === 'native') {
6
10
  if ('elevationAndroid' in style) {
7
11
  // @ts-ignore
@@ -30,6 +34,51 @@ export function fixStyles(style: Record<string, any>) {
30
34
  }
31
35
  }
32
36
 
37
+ /**
38
+ * A stack asked for grid is still a stack.
39
+ *
40
+ * flex-direction is inert under `display: grid`, so a component that names its
41
+ * axis the flex way lays out along grid's default axis instead — which runs the
42
+ * other way, because the two vocabularies invert: flex `row` runs across, grid
43
+ * `row` fills rows and so runs down. An XStack asked for grid came out vertical.
44
+ *
45
+ * That is not an XStack problem. `flexDirection: 'row'` is a base style on
46
+ * seven more components in pkgs/ui — Card, ListItem, RadioGroup, Button,
47
+ * Fieldset, MenuPredefined, Tabs — and on every `styled(View, ...)` an author
48
+ * writes, which is the pattern the docs teach. So the axis is restated here,
49
+ * once, rather than in any component's variant table.
50
+ *
51
+ * Here is also the only place the REST of the style is visible, and that is
52
+ * what makes the restatement safe to skip. Naming tracks or areas is the author
53
+ * describing the grid themselves; forcing column flow on top would push items
54
+ * into implicit tracks — `repeat(3, 1fr)` became six columns, three of them 7px
55
+ * slivers — and transpose named areas into the right geometry with the wrong
56
+ * items in it. Being visible to the whole style is also what makes it
57
+ * order-independent: as a variant, `gridAutoFlow` before `display` and after it
58
+ * gave different layouts.
59
+ *
60
+ * flexWrap bails out for the same reason and a blunter one: grid has no
61
+ * equivalent, and column flow plus wrap does not wrap — it lays an eighth
62
+ * 120px child 360px outside a 600px box. Leaving grid's own row flow gives a
63
+ * single column, which is a degradation you can see rather than one off-screen.
64
+ */
65
+ function resolveAxis(style: Record<string, any>) {
66
+ if (style.display !== 'grid' && style.display !== 'inline-grid') return
67
+ if (style.flexDirection !== 'row' && style.flexDirection !== 'row-reverse') return
68
+ if (style.flexWrap === 'wrap' || style.flexWrap === 'wrap-reverse') return
69
+ if (
70
+ style.gridAutoFlow != null ||
71
+ style.grid != null ||
72
+ style.gridTemplate != null ||
73
+ style.gridTemplateAreas != null ||
74
+ style.gridTemplateColumns != null ||
75
+ style.gridTemplateRows != null
76
+ ) {
77
+ return
78
+ }
79
+ style.gridAutoFlow = 'column'
80
+ }
81
+
33
82
  // native doesn't support specific border edge style
34
83
  const nativeStyle = isWeb ? null : 'borderStyle'
35
84
  const borderDefaults = {
package/src/types.tsx CHANGED
@@ -2380,10 +2380,6 @@ interface ExtraStyleProps {
2380
2380
  * Web-only style property. Will be omitted on native.
2381
2381
  */
2382
2382
  gridRowEnd?: Properties['gridRowEnd']
2383
- /**
2384
- * Web-only style property. Will be omitted on native.
2385
- */
2386
- gridRowGap?: Properties['gridRowGap']
2387
2383
  /**
2388
2384
  * Web-only style property. Will be omitted on native.
2389
2385
  */
@@ -2399,19 +2395,63 @@ interface ExtraStyleProps {
2399
2395
  /**
2400
2396
  * Web-only style property. Will be omitted on native.
2401
2397
  */
2402
- gridColumnGap?: Properties['gridColumnGap']
2398
+ gridColumnStart?: Properties['gridColumnStart']
2403
2399
  /**
2404
2400
  * Web-only style property. Will be omitted on native.
2405
2401
  */
2406
- gridColumnStart?: Properties['gridColumnStart']
2402
+ gridTemplateColumns?: Properties['gridTemplateColumns']
2407
2403
  /**
2408
2404
  * Web-only style property. Will be omitted on native.
2409
2405
  */
2410
- gridTemplateColumns?: Properties['gridTemplateColumns']
2406
+ gridTemplateRows?: Properties['gridTemplateRows']
2411
2407
  /**
2412
2408
  * Web-only style property. Will be omitted on native.
2413
2409
  */
2414
2410
  gridTemplateAreas?: Properties['gridTemplateAreas']
2411
+ /**
2412
+ * Web-only style property. Will be omitted on native.
2413
+ */
2414
+ gridTemplate?: Properties['gridTemplate']
2415
+ /**
2416
+ * Web-only style property. Will be omitted on native.
2417
+ */
2418
+ grid?: Properties['grid']
2419
+ /**
2420
+ * Web-only style property. Will be omitted on native.
2421
+ */
2422
+ gridArea?: Properties['gridArea']
2423
+ /**
2424
+ * Web-only style property. Will be omitted on native.
2425
+ */
2426
+ gridAutoFlow?: Properties['gridAutoFlow']
2427
+ /**
2428
+ * Web-only style property. Will be omitted on native.
2429
+ */
2430
+ gridAutoColumns?: Properties['gridAutoColumns']
2431
+ /**
2432
+ * Web-only style property. Will be omitted on native.
2433
+ */
2434
+ gridAutoRows?: Properties['gridAutoRows']
2435
+ /**
2436
+ * Web-only style property. Will be omitted on native.
2437
+ */
2438
+ justifyItems?: Properties['justifyItems']
2439
+ /**
2440
+ * Web-only style property. Will be omitted on native.
2441
+ */
2442
+ justifySelf?: Properties['justifySelf']
2443
+ /**
2444
+ * Web-only style property. Will be omitted on native.
2445
+ */
2446
+ placeItems?: Properties['placeItems']
2447
+ /**
2448
+ * Web-only style property. Will be omitted on native.
2449
+ */
2450
+ placeContent?: Properties['placeContent']
2451
+ /**
2452
+ * Web-only style property. Will be omitted on native.
2453
+ */
2454
+ placeSelf?: Properties['placeSelf']
2415
2455
 
2416
2456
  /**
2417
2457
  * Web-only style property. Will be omitted on native.
@@ -2527,6 +2567,52 @@ interface ExtraBaseProps {
2527
2567
  passThrough?: boolean
2528
2568
  }
2529
2569
 
2570
+ /**
2571
+ * Which layout algorithm runs. CSS's own selector, and the one place a layout
2572
+ * mode is named — there is no second prop and no component that means `grid`
2573
+ * by existing.
2574
+ *
2575
+ * On web every value is the browser's. On native, Yoga has Flex, None and
2576
+ * Contents and nothing else, so `grid` and `inline-grid` cross as `flex`
2577
+ * (expandStyle.ts): a grid with no template fills one implicit column top to
2578
+ * bottom, which is what a flex column does, so a one-dimensional grid arrives
2579
+ * intact. Two-dimensional placement has no flex equivalent and does not cross —
2580
+ * the properties that express it are web-only and are stripped there.
2581
+ *
2582
+ * The mode does NOT narrow which properties are accepted, and that was tried
2583
+ * rather than assumed. A discriminated union on `display` — grid properties
2584
+ * `never` unless display is grid, flexDirection `never` when it is — narrows
2585
+ * exactly right and rejects exactly the six cases it should. It is not
2586
+ * affordable here. These props are ~380 wide and already near TypeScript's
2587
+ * ceiling, and any union intersected into them distributes across all of it:
2588
+ * placed in GetFinalProps it took @hanzogui/form to TS2590 "union type too
2589
+ * complex to represent", and placed on View alone it took @hanzogui/collapsible
2590
+ * to the same error. `interface X extends ViewProps` also stops compiling
2591
+ * (TS2312), and that is a published idiom.
2592
+ *
2593
+ * What it would have bought is small: naming a track list without `display:
2594
+ * grid` renders a flex column instead of a grid, which you see immediately. The
2595
+ * failures worth catching here were the ones you cannot see, and those are
2596
+ * closed at runtime instead — grid properties are stripped on native rather
2597
+ * than handed to an engine with no grid, and XStack resolves its axis against
2598
+ * the mode instead of laying out backwards.
2599
+ */
2600
+ export type Display =
2601
+ | 'inherit'
2602
+ | 'none'
2603
+ | 'inline'
2604
+ | 'block'
2605
+ | 'contents'
2606
+ | 'flex'
2607
+ | 'inline-flex'
2608
+ | 'grid'
2609
+ | 'inline-grid'
2610
+ // A list item without it has no marker, and a list that does not look like a
2611
+ // list is not read as one — by a person or by a screen reader. Native has no
2612
+ // list-item either, so it degrades the way grid does: to 'flex', which is
2613
+ // what a bare <li> already laid out as there.
2614
+ | 'list-item'
2615
+
2530
2616
  interface ExtendedBaseProps
2531
2617
  extends
2532
2618
  TransformStyleProps,
@@ -2534,7 +2620,7 @@ interface ExtendedBaseProps
2534
2620
  ExtendBaseStackProps,
2535
2621
  ExtraStyleProps,
2536
2622
  ExtraBaseProps {
2537
- display?: 'inherit' | 'none' | 'inline' | 'block' | 'contents' | 'flex' | 'inline-flex'
2623
+ display?: Display
2538
2624
  // extends RN's position to include 'fixed' (converted to 'absolute' on native)
2539
2625
  position?: 'absolute' | 'relative' | 'fixed' | 'static' | 'sticky'
2540
2626
  }
@@ -1 +1 @@
1
- {"version":3,"file":"expandStyle.d.ts","sourceRoot":"","sources":["../../src/helpers/expandStyle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,WAAW,CAAA;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AA8D/C,wBAAgB,WAAW,CACzB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,GAAG,EACV,WAAW,GAAE,WAA8B,GAC1C,eAAe,CAsFjB"}
1
+ {"version":3,"file":"expandStyle.d.ts","sourceRoot":"","sources":["../../src/helpers/expandStyle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,WAAW,CAAA;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AA8D/C,wBAAgB,WAAW,CACzB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,GAAG,EACV,WAAW,GAAE,WAA8B,GAC1C,eAAe,CAgHjB"}
@@ -1 +1 @@
1
- {"version":3,"file":"expandStyles.d.ts","sourceRoot":"","sources":["../../src/helpers/expandStyles.ts"],"names":[],"mappings":"AAGA,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QA2BnD"}
1
+ {"version":3,"file":"expandStyles.d.ts","sourceRoot":"","sources":["../../src/helpers/expandStyles.ts"],"names":[],"mappings":"AAGA,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QA+BnD"}
@@ -100,5 +100,25 @@ export declare const webPropsToSkip: {
100
100
  touchAction: boolean;
101
101
  transformStyle: boolean;
102
102
  willChange: boolean;
103
+ grid: boolean;
104
+ gridArea: boolean;
105
+ gridAutoFlow: boolean;
106
+ gridColumn: boolean;
107
+ gridColumnEnd: boolean;
108
+ gridColumnStart: boolean;
109
+ gridRow: boolean;
110
+ gridRowEnd: boolean;
111
+ gridRowStart: boolean;
112
+ gridTemplate: boolean;
113
+ gridTemplateAreas: boolean;
114
+ justifyItems: boolean;
115
+ justifySelf: boolean;
116
+ placeContent: boolean;
117
+ placeItems: boolean;
118
+ placeSelf: boolean;
119
+ gridAutoColumns: boolean;
120
+ gridAutoRows: boolean;
121
+ gridTemplateColumns: boolean;
122
+ gridTemplateRows: boolean;
103
123
  };
104
124
  //# sourceMappingURL=webPropsToSkip.native.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"webPropsToSkip.native.d.ts","sourceRoot":"","sources":["../../src/helpers/webPropsToSkip.native.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4C1B,CAAA"}
1
+ {"version":3,"file":"webPropsToSkip.native.d.ts","sourceRoot":"","sources":["../../src/helpers/webPropsToSkip.native.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4C1B,CAAA"}
package/types/types.d.ts CHANGED
@@ -1340,10 +1340,6 @@ interface ExtraStyleProps {
1340
1340
  * Web-only style property. Will be omitted on native.
1341
1341
  */
1342
1342
  gridRowEnd?: Properties['gridRowEnd'];
1343
- /**
1344
- * Web-only style property. Will be omitted on native.
1345
- */
1346
- gridRowGap?: Properties['gridRowGap'];
1347
1343
  /**
1348
1344
  * Web-only style property. Will be omitted on native.
1349
1345
  */
@@ -1359,19 +1355,63 @@ interface ExtraStyleProps {
1359
1355
  /**
1360
1356
  * Web-only style property. Will be omitted on native.
1361
1357
  */
1362
- gridColumnGap?: Properties['gridColumnGap'];
1358
+ gridColumnStart?: Properties['gridColumnStart'];
1363
1359
  /**
1364
1360
  * Web-only style property. Will be omitted on native.
1365
1361
  */
1366
- gridColumnStart?: Properties['gridColumnStart'];
1362
+ gridTemplateColumns?: Properties['gridTemplateColumns'];
1367
1363
  /**
1368
1364
  * Web-only style property. Will be omitted on native.
1369
1365
  */
1370
- gridTemplateColumns?: Properties['gridTemplateColumns'];
1366
+ gridTemplateRows?: Properties['gridTemplateRows'];
1371
1367
  /**
1372
1368
  * Web-only style property. Will be omitted on native.
1373
1369
  */
1374
1370
  gridTemplateAreas?: Properties['gridTemplateAreas'];
1371
+ /**
1372
+ * Web-only style property. Will be omitted on native.
1373
+ */
1374
+ gridTemplate?: Properties['gridTemplate'];
1375
+ /**
1376
+ * Web-only style property. Will be omitted on native.
1377
+ */
1378
+ grid?: Properties['grid'];
1379
+ /**
1380
+ * Web-only style property. Will be omitted on native.
1381
+ */
1382
+ gridArea?: Properties['gridArea'];
1383
+ /**
1384
+ * Web-only style property. Will be omitted on native.
1385
+ */
1386
+ gridAutoFlow?: Properties['gridAutoFlow'];
1387
+ /**
1388
+ * Web-only style property. Will be omitted on native.
1389
+ */
1390
+ gridAutoColumns?: Properties['gridAutoColumns'];
1391
+ /**
1392
+ * Web-only style property. Will be omitted on native.
1393
+ */
1394
+ gridAutoRows?: Properties['gridAutoRows'];
1395
+ /**
1396
+ * Web-only style property. Will be omitted on native.
1397
+ */
1398
+ justifyItems?: Properties['justifyItems'];
1399
+ /**
1400
+ * Web-only style property. Will be omitted on native.
1401
+ */
1402
+ justifySelf?: Properties['justifySelf'];
1403
+ /**
1404
+ * Web-only style property. Will be omitted on native.
1405
+ */
1406
+ placeItems?: Properties['placeItems'];
1407
+ /**
1408
+ * Web-only style property. Will be omitted on native.
1409
+ */
1410
+ placeContent?: Properties['placeContent'];
1411
+ /**
1412
+ * Web-only style property. Will be omitted on native.
1413
+ */
1414
+ placeSelf?: Properties['placeSelf'];
1375
1415
  /**
1376
1416
  * Web-only style property. Will be omitted on native.
1377
1417
  */
@@ -1480,8 +1520,39 @@ interface ExtraBaseProps {
1480
1520
  */
1481
1521
  passThrough?: boolean;
1482
1522
  }
1523
+ /**
1524
+ * Which layout algorithm runs. CSS's own selector, and the one place a layout
1525
+ * mode is named — there is no second prop and no component that means `grid`
1526
+ * by existing.
1527
+ *
1528
+ * On web every value is the browser's. On native, Yoga has Flex, None and
1529
+ * Contents and nothing else, so `grid` and `inline-grid` cross as `flex`
1530
+ * (expandStyle.ts): a grid with no template fills one implicit column top to
1531
+ * bottom, which is what a flex column does, so a one-dimensional grid arrives
1532
+ * intact. Two-dimensional placement has no flex equivalent and does not cross —
1533
+ * the properties that express it are web-only and are stripped there.
1534
+ *
1535
+ * The mode does NOT narrow which properties are accepted, and that was tried
1536
+ * rather than assumed. A discriminated union on `display` — grid properties
1537
+ * `never` unless display is grid, flexDirection `never` when it is — narrows
1538
+ * exactly right and rejects exactly the six cases it should. It is not
1539
+ * affordable here. These props are ~380 wide and already near TypeScript's
1540
+ * ceiling, and any union intersected into them distributes across all of it:
1541
+ * placed in GetFinalProps it took @hanzogui/form to TS2590 "union type too
1542
+ * complex to represent", and placed on View alone it took @hanzogui/collapsible
1543
+ * to the same error. `interface X extends ViewProps` also stops compiling
1544
+ * (TS2312), and that is a published idiom.
1545
+ *
1546
+ * What it would have bought is small: naming a track list without `display:
1547
+ * grid` renders a flex column instead of a grid, which you see immediately. The
1548
+ * failures worth catching here were the ones you cannot see, and those are
1549
+ * closed at runtime instead — grid properties are stripped on native rather
1550
+ * than handed to an engine with no grid, and XStack resolves its axis against
1551
+ * the mode instead of laying out backwards.
1552
+ */
1553
+ export type Display = 'inherit' | 'none' | 'inline' | 'block' | 'contents' | 'flex' | 'inline-flex' | 'grid' | 'inline-grid' | 'list-item';
1483
1554
  interface ExtendedBaseProps extends TransformStyleProps, ExtendBaseTextProps, ExtendBaseStackProps, ExtraStyleProps, ExtraBaseProps {
1484
- display?: 'inherit' | 'none' | 'inline' | 'block' | 'contents' | 'flex' | 'inline-flex';
1555
+ display?: Display;
1485
1556
  position?: 'absolute' | 'relative' | 'fixed' | 'static' | 'sticky';
1486
1557
  }
1487
1558
  export interface StackStyleBase extends Omit<ViewStyle, keyof ExtendedBaseProps | 'elevation'>, ExtendedBaseProps {