@tamagui/core 1.0.1-beta.86 → 1.0.1-beta.89

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 (75) hide show
  1. package/dist/cjs/assignNativePropsToWeb.js +187 -0
  2. package/dist/cjs/assignNativePropsToWeb.js.map +7 -0
  3. package/dist/cjs/constants/platform.js +2 -2
  4. package/dist/cjs/constants/platform.js.map +2 -2
  5. package/dist/cjs/constants/rnw.js +7 -5
  6. package/dist/cjs/constants/rnw.js.map +2 -2
  7. package/dist/cjs/createComponent.js +61 -205
  8. package/dist/cjs/createComponent.js.map +2 -2
  9. package/dist/cjs/helpers/assignNativePropsToWeb.js +187 -0
  10. package/dist/cjs/helpers/assignNativePropsToWeb.js.map +7 -0
  11. package/dist/cjs/helpers/assignNativePropsToWeb.native.js +29 -0
  12. package/dist/cjs/helpers/assignNativePropsToWeb.native.js.map +7 -0
  13. package/dist/cjs/helpers/createPropMapper.js +6 -1
  14. package/dist/cjs/helpers/createPropMapper.js.map +2 -2
  15. package/dist/cjs/helpers/extendStaticConfig.js +4 -2
  16. package/dist/cjs/helpers/extendStaticConfig.js.map +2 -2
  17. package/dist/cjs/helpers/getSplitStyles.js +15 -14
  18. package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
  19. package/dist/cjs/helpers/getStylesAtomic.js +4 -5
  20. package/dist/cjs/helpers/getStylesAtomic.js.map +2 -2
  21. package/dist/cjs/helpers/mergeProps.js +14 -4
  22. package/dist/cjs/helpers/mergeProps.js.map +2 -2
  23. package/dist/cjs/styled.js +0 -5
  24. package/dist/cjs/styled.js.map +2 -2
  25. package/dist/cjs/types.js.map +1 -1
  26. package/dist/esm/assignNativePropsToWeb.js +164 -0
  27. package/dist/esm/assignNativePropsToWeb.js.map +7 -0
  28. package/dist/esm/constants/platform.js +2 -2
  29. package/dist/esm/constants/platform.js.map +2 -2
  30. package/dist/esm/constants/rnw.js +7 -2
  31. package/dist/esm/constants/rnw.js.map +2 -2
  32. package/dist/esm/createComponent.js +58 -203
  33. package/dist/esm/createComponent.js.map +2 -2
  34. package/dist/esm/helpers/assignNativePropsToWeb.js +164 -0
  35. package/dist/esm/helpers/assignNativePropsToWeb.js.map +7 -0
  36. package/dist/esm/helpers/assignNativePropsToWeb.native.js +6 -0
  37. package/dist/esm/helpers/assignNativePropsToWeb.native.js.map +7 -0
  38. package/dist/esm/helpers/createPropMapper.js +6 -1
  39. package/dist/esm/helpers/createPropMapper.js.map +2 -2
  40. package/dist/esm/helpers/extendStaticConfig.js +4 -2
  41. package/dist/esm/helpers/extendStaticConfig.js.map +2 -2
  42. package/dist/esm/helpers/getSplitStyles.js +15 -14
  43. package/dist/esm/helpers/getSplitStyles.js.map +2 -2
  44. package/dist/esm/helpers/getStylesAtomic.js +4 -5
  45. package/dist/esm/helpers/getStylesAtomic.js.map +2 -2
  46. package/dist/esm/helpers/mergeProps.js +14 -4
  47. package/dist/esm/helpers/mergeProps.js.map +2 -2
  48. package/dist/esm/styled.js +0 -5
  49. package/dist/esm/styled.js.map +2 -2
  50. package/package.json +6 -6
  51. package/types/assignNativePropsToWeb.d.ts +2 -0
  52. package/types/assignNativePropsToWeb.d.ts.map +1 -0
  53. package/types/constants/platform.d.ts.map +1 -1
  54. package/types/constants/rnw.d.ts.map +1 -1
  55. package/types/createComponent.d.ts +15 -1
  56. package/types/createComponent.d.ts.map +1 -1
  57. package/types/helpers/assignNativePropsToWeb.d.ts +2 -0
  58. package/types/helpers/assignNativePropsToWeb.d.ts.map +1 -0
  59. package/types/helpers/assignNativePropsToWeb.native.d.ts +2 -0
  60. package/types/helpers/assignNativePropsToWeb.native.d.ts.map +1 -0
  61. package/types/helpers/createPropMapper.d.ts.map +1 -1
  62. package/types/helpers/extendStaticConfig.d.ts.map +1 -1
  63. package/types/helpers/getSplitStyles.d.ts +1 -4
  64. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  65. package/types/helpers/getStylesAtomic.d.ts +2 -6
  66. package/types/helpers/getStylesAtomic.d.ts.map +1 -1
  67. package/types/helpers/mergeProps.d.ts +1 -1
  68. package/types/helpers/mergeProps.d.ts.map +1 -1
  69. package/types/styled.d.ts.map +1 -1
  70. package/types/types.d.ts +3 -1
  71. package/types/types.d.ts.map +1 -1
  72. package/types/views/ThemeInverse.d.ts +1 -0
  73. package/types/views/ThemeInverse.d.ts.map +1 -1
  74. package/types/views/ThemeProvider.d.ts +1 -0
  75. package/types/views/ThemeProvider.d.ts.map +1 -1
@@ -52,9 +52,10 @@ __export(createComponent_exports, {
52
52
  AbsoluteFill: () => AbsoluteFill,
53
53
  Spacer: () => Spacer,
54
54
  Unspaced: () => Unspaced,
55
- assignNativePropsToWeb: () => assignNativePropsToWeb,
55
+ accessibilityRoleToWebRole: () => accessibilityRoleToWebRole,
56
56
  createComponent: () => createComponent,
57
57
  mouseUps: () => mouseUps,
58
+ processIDRefList: () => processIDRefList,
58
59
  spacedChildren: () => spacedChildren
59
60
  });
60
61
  module.exports = __toCommonJS(createComponent_exports);
@@ -66,6 +67,7 @@ var import_conf = require("./conf");
66
67
  var import_constants = require("./constants/constants");
67
68
  var import_platform = require("./constants/platform");
68
69
  var import_rnw = require("./constants/rnw");
70
+ var import_assignNativePropsToWeb = require("./helpers/assignNativePropsToWeb");
69
71
  var import_createPropMapper = require("./helpers/createPropMapper");
70
72
  var import_createShallowUpdate = require("./helpers/createShallowUpdate");
71
73
  var import_extendStaticConfig = require("./helpers/extendStaticConfig");
@@ -134,14 +136,14 @@ function createComponent(configIn, ParentComponent) {
134
136
  var _a, _d, _e, _f;
135
137
  let props;
136
138
  if (tamaguiDefaultProps && !propsIn.asChild) {
137
- props = (0, import_mergeProps.mergeProps)(tamaguiDefaultProps, propsIn);
139
+ props = (0, import_mergeProps.mergeProps)(tamaguiDefaultProps, propsIn)[0];
138
140
  } else {
139
141
  props = propsIn;
140
142
  }
141
143
  const { Component, isText, isZStack } = staticConfig;
142
144
  const componentName = props.componentName || staticConfig.componentName;
143
145
  const componentClassName = props.asChild ? "" : props.componentName ? `is_${props.componentName}` : defaultComponentClassName;
144
- if (true) {
146
+ if (process.env.NODE_ENV === "development") {
145
147
  if (props["debug"]) {
146
148
  console.log("\u26A0\uFE0F", componentName || (Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "[Unnamed Component]", "debug on");
147
149
  console.log("props in:", {
@@ -149,8 +151,9 @@ function createComponent(configIn, ParentComponent) {
149
151
  props,
150
152
  ordered: Object.keys(props)
151
153
  });
152
- if (props["debug"] === "break")
154
+ if (props["debug"] === "break") {
153
155
  debugger;
156
+ }
154
157
  }
155
158
  }
156
159
  const forceUpdate = (0, import_use_force_update.useForceUpdate)();
@@ -393,7 +396,7 @@ function createComponent(configIn, ParentComponent) {
393
396
  "onLayout"
394
397
  ]);
395
398
  viewProps = webProps;
396
- assignNativePropsToWeb(elementType, viewProps, nonTamaguiProps);
399
+ (0, import_assignNativePropsToWeb.assignNativePropsToWeb)(elementType, viewProps, nonTamaguiProps);
397
400
  if (!asChild) {
398
401
  import_rnw.rnw.useElementLayout(hostRef, onLayout);
399
402
  import_rnw.rnw.useResponderEvents(hostRef, {
@@ -438,9 +441,6 @@ function createComponent(configIn, ParentComponent) {
438
441
  }
439
442
  const _focusable = focusable != void 0 ? focusable : accessible;
440
443
  const role = viewProps.role;
441
- if (props["debug"]) {
442
- console.log("_focusable", focusable);
443
- }
444
444
  if (_focusable === false) {
445
445
  viewProps.tabIndex = "-1";
446
446
  }
@@ -462,7 +462,7 @@ function createComponent(configIn, ParentComponent) {
462
462
  viewProps.ref = forwardedRef;
463
463
  }
464
464
  }
465
- if (props["debug"]) {
465
+ if (process.env.NODE_ENV === "development" && props["debug"]) {
466
466
  console.log("viewProps", elementType, viewProps.role, viewProps.tabIndex);
467
467
  }
468
468
  if (!isText && import_platform.isWeb) {
@@ -745,9 +745,11 @@ function createComponent(configIn, ParentComponent) {
745
745
  }
746
746
  return content;
747
747
  });
748
- component.displayName = staticConfig.componentName;
748
+ if (staticConfig.componentName) {
749
+ component.displayName = staticConfig.componentName;
750
+ }
749
751
  (0, import_conf.onConfiguredOnce)((conf) => {
750
- var _a, _b, _c, _d;
752
+ var _a, _b, _c;
751
753
  if (process.env.IS_STATIC === "is_static") {
752
754
  return;
753
755
  }
@@ -758,38 +760,17 @@ function createComponent(configIn, ParentComponent) {
758
760
  AnimatedView = (_c = tamaguiConfig == null ? void 0 : tamaguiConfig.animations) == null ? void 0 : _c.View;
759
761
  initialTheme = initialTheme || (0, import_proxyThemeVariables.proxyThemeVariables)(conf.themes[conf.defaultTheme || Object.keys(conf.themes)[0]]);
760
762
  const config = (0, import_conf.getConfig)();
761
- let defaultPropsIn = staticConfig.defaultProps;
763
+ let defaultPropsIn = staticConfig.defaultProps || {};
762
764
  const parentNames = [...staticConfig.parentNames || [], staticConfig.componentName];
763
- if (config.defaultProps && parentNames) {
764
- const len = parentNames.length;
765
- let prev;
766
- for (let i = 0; i < len; i++) {
767
- const n = parentNames[i];
768
- if (!n)
769
- continue;
770
- if (DefaultProps.has(n)) {
771
- prev = DefaultProps.get(n);
772
- continue;
773
- }
774
- const props = config.defaultProps[n];
775
- if (!props) {
776
- if (prev) {
777
- DefaultProps.set(n, prev);
778
- }
779
- continue;
780
- }
781
- prev = (0, import_mergeProps.mergeProps)(prev || {}, props);
782
- DefaultProps.set(n, prev);
783
- }
784
- const ourDefaultsMerged = DefaultProps.get(staticConfig.componentName);
785
- if (ourDefaultsMerged) {
786
- defaultPropsIn = (0, import_mergeProps.mergeProps)(defaultPropsIn, ourDefaultsMerged);
787
- }
765
+ if (config.defaultProps && parentNames && staticConfig.componentName) {
766
+ defaultPropsIn = mergeConfigDefaultProps(staticConfig.componentName, defaultPropsIn, config.defaultProps, parentNames);
788
767
  }
789
- if (process.env.NODE_ENV === "development" && defaultPropsIn["debug"] === "break") {
768
+ const debug = process.env.NODE_ENV === "development" ? defaultPropsIn["debug"] : false;
769
+ if (process.env.NODE_ENV === "development" && debug === "break") {
790
770
  debugger;
791
771
  }
792
- initialSplitStyles = (0, import_getSplitStyles.insertSplitStyles)(defaultPropsIn, staticConfig, initialTheme, {
772
+ const [parentProps, parentClassNames] = (0, import_mergeProps.mergeProps)(defaultPropsIn, {}, true);
773
+ initialSplitStyles = (0, import_getSplitStyles.insertSplitStyles)(parentProps, staticConfig, initialTheme, {
793
774
  mounted: true,
794
775
  hover: false,
795
776
  press: false,
@@ -797,14 +778,18 @@ function createComponent(configIn, ParentComponent) {
797
778
  focus: false,
798
779
  resolveVariablesAs: "both",
799
780
  keepVariantsAsProps: true
800
- }, void 0, staticConfig.defaultProps["debug"]);
801
- const defaults = (0, import_mergeProps.mergeProps)(component.defaultProps, initialSplitStyles.viewProps);
781
+ }, void 0, debug);
782
+ const [defaults, defaultsClassnames] = (0, import_mergeProps.mergeProps)(component.defaultProps, initialSplitStyles.viewProps, true);
783
+ if (debug) {
784
+ console.warn(defaults, component.defaultProps, initialSplitStyles);
785
+ }
786
+ initialSplitStyles.classNames = __spreadValues(__spreadValues(__spreadValues({}, parentClassNames), defaultsClassnames), initialSplitStyles.classNames);
802
787
  defaultNativeStyle = {};
803
788
  const validStyles2 = staticConfig.validStyles || import_helpers.stylePropsView;
804
789
  if (!import_platform.isWeb) {
805
790
  for (const key in staticConfig.defaultProps) {
806
791
  const val = staticConfig.defaultProps[key];
807
- if (typeof val === "string" && val[0] === "$" || !validStyles2[key] || val[0] === "_") {
792
+ if (typeof val === "string" && val[0] === "$" || !validStyles2[key]) {
808
793
  defaults[key] = val;
809
794
  } else {
810
795
  defaultNativeStyle[key] = val;
@@ -817,14 +802,15 @@ function createComponent(configIn, ParentComponent) {
817
802
  if (Object.keys(defaults).length) {
818
803
  tamaguiDefaultProps = defaults;
819
804
  }
820
- if (process.env.NODE_ENV === "development" && ((_d = staticConfig.defaultProps) == null ? void 0 : _d.debug)) {
805
+ if (process.env.NODE_ENV === "development" && debug) {
821
806
  if (process.env.IS_STATIC !== "is_static") {
822
807
  console.log(`\u{1F41B} [${staticConfig.componentName || "Component"}]`, {
823
808
  staticConfig,
824
809
  initialSplitStyles,
825
810
  tamaguiDefaultProps,
826
811
  defaultNativeStyle,
827
- defaults
812
+ defaults,
813
+ defaultPropsIn
828
814
  });
829
815
  }
830
816
  }
@@ -848,7 +834,6 @@ function createComponent(configIn, ParentComponent) {
848
834
  };
849
835
  return res;
850
836
  }
851
- const DefaultProps = /* @__PURE__ */ new Map();
852
837
  const Unspaced = (props) => {
853
838
  return props.children;
854
839
  };
@@ -995,165 +980,6 @@ const accessibilityRoleToWebRole = {
995
980
  summary: "region",
996
981
  text: null
997
982
  };
998
- function assignNativePropsToWeb(elementType, viewProps, nativeProps) {
999
- if (!viewProps.role && nativeProps.accessibilityRole) {
1000
- if (nativeProps.accessibilityRole === "none") {
1001
- viewProps.role = "presentation";
1002
- } else {
1003
- const webRole = accessibilityRoleToWebRole[nativeProps.accessibilityRole];
1004
- if (webRole != null) {
1005
- viewProps.role = webRole || nativeProps.accessibilityRole;
1006
- }
1007
- }
1008
- }
1009
- if (nativeProps.accessibilityActiveDescendant != null) {
1010
- viewProps["aria-activedescendant"] = nativeProps.accessibilityActiveDescendant;
1011
- }
1012
- if (nativeProps.accessibilityAtomic != null) {
1013
- viewProps["aria-atomic"] = nativeProps.accessibilityAtomic;
1014
- }
1015
- if (nativeProps.accessibilityAutoComplete != null) {
1016
- viewProps["aria-autocomplete"] = nativeProps.accessibilityAutoComplete;
1017
- }
1018
- if (nativeProps.accessibilityBusy != null) {
1019
- viewProps["aria-busy"] = nativeProps.accessibilityBusy;
1020
- }
1021
- if (nativeProps.accessibilityChecked != null) {
1022
- viewProps["aria-checked"] = nativeProps.accessibilityChecked;
1023
- }
1024
- if (nativeProps.accessibilityColumnCount != null) {
1025
- viewProps["aria-colcount"] = nativeProps.accessibilityColumnCount;
1026
- }
1027
- if (nativeProps.accessibilityColumnIndex != null) {
1028
- viewProps["aria-colindex"] = nativeProps.accessibilityColumnIndex;
1029
- }
1030
- if (nativeProps.accessibilityColumnSpan != null) {
1031
- viewProps["aria-colspan"] = nativeProps.accessibilityColumnSpan;
1032
- }
1033
- if (nativeProps.accessibilityControls != null) {
1034
- viewProps["aria-controls"] = processIDRefList(nativeProps.accessibilityControls);
1035
- }
1036
- if (nativeProps.accessibilityCurrent != null) {
1037
- viewProps["aria-current"] = nativeProps.accessibilityCurrent;
1038
- }
1039
- if (nativeProps.accessibilityDescribedBy != null) {
1040
- viewProps["aria-describedby"] = processIDRefList(nativeProps.accessibilityDescribedBy);
1041
- }
1042
- if (nativeProps.accessibilityDetails != null) {
1043
- viewProps["aria-details"] = nativeProps.accessibilityDetails;
1044
- }
1045
- if (nativeProps.disabled === true) {
1046
- viewProps["aria-disabled"] = true;
1047
- if (elementType === "button" || elementType === "form" || elementType === "input" || elementType === "select" || elementType === "textarea") {
1048
- viewProps.disabled = true;
1049
- }
1050
- }
1051
- if (nativeProps.accessibilityErrorMessage != null) {
1052
- viewProps["aria-errormessage"] = nativeProps.accessibilityErrorMessage;
1053
- }
1054
- if (nativeProps.accessibilityExpanded != null) {
1055
- viewProps["aria-expanded"] = nativeProps.accessibilityExpanded;
1056
- }
1057
- if (nativeProps.accessibilityFlowTo != null) {
1058
- viewProps["aria-flowto"] = processIDRefList(nativeProps.accessibilityFlowTo);
1059
- }
1060
- if (nativeProps.accessibilityHasPopup != null) {
1061
- viewProps["aria-haspopup"] = nativeProps.accessibilityHasPopup;
1062
- }
1063
- if (nativeProps.accessibilityHidden === true) {
1064
- viewProps["aria-hidden"] = nativeProps.accessibilityHidden;
1065
- }
1066
- if (nativeProps.accessibilityInvalid != null) {
1067
- viewProps["aria-invalid"] = nativeProps.accessibilityInvalid;
1068
- }
1069
- if (nativeProps.accessibilityKeyShortcuts != null && Array.isArray(nativeProps.accessibilityKeyShortcuts)) {
1070
- viewProps["aria-keyshortcuts"] = nativeProps.accessibilityKeyShortcuts.join(" ");
1071
- }
1072
- if (nativeProps.accessibilityLabel != null) {
1073
- viewProps["aria-label"] = nativeProps.accessibilityLabel;
1074
- }
1075
- if (nativeProps.accessibilityLabelledBy != null) {
1076
- viewProps["aria-labelledby"] = processIDRefList(nativeProps.accessibilityLabelledBy);
1077
- }
1078
- if (nativeProps.accessibilityLevel != null) {
1079
- viewProps["aria-level"] = nativeProps.accessibilityLevel;
1080
- }
1081
- if (nativeProps.accessibilityLiveRegion != null) {
1082
- viewProps["aria-live"] = nativeProps.accessibilityLiveRegion === "none" ? "off" : nativeProps.accessibilityLiveRegion;
1083
- }
1084
- if (nativeProps.accessibilityModal != null) {
1085
- viewProps["aria-modal"] = nativeProps.accessibilityModal;
1086
- }
1087
- if (nativeProps.accessibilityMultiline != null) {
1088
- viewProps["aria-multiline"] = nativeProps.accessibilityMultiline;
1089
- }
1090
- if (nativeProps.accessibilityMultiSelectable != null) {
1091
- viewProps["aria-multiselectable"] = nativeProps.accessibilityMultiSelectable;
1092
- }
1093
- if (nativeProps.accessibilityOrientation != null) {
1094
- viewProps["aria-orientation"] = nativeProps.accessibilityOrientation;
1095
- }
1096
- if (nativeProps.accessibilityOwns != null) {
1097
- viewProps["aria-owns"] = processIDRefList(nativeProps.accessibilityOwns);
1098
- }
1099
- if (nativeProps.accessibilityPlaceholder != null) {
1100
- viewProps["aria-placeholder"] = nativeProps.accessibilityPlaceholder;
1101
- }
1102
- if (nativeProps.accessibilityPosInSet != null) {
1103
- viewProps["aria-posinset"] = nativeProps.accessibilityPosInSet;
1104
- }
1105
- if (nativeProps.accessibilityPressed != null) {
1106
- viewProps["aria-pressed"] = nativeProps.accessibilityPressed;
1107
- }
1108
- if (nativeProps.accessibilityReadOnly != null) {
1109
- viewProps["aria-readonly"] = nativeProps.accessibilityReadOnly;
1110
- if (elementType === "input" || elementType === "select" || elementType === "textarea") {
1111
- viewProps.readOnly = true;
1112
- }
1113
- }
1114
- if (nativeProps.accessibilityRequired != null) {
1115
- viewProps["aria-required"] = nativeProps.accessibilityRequired;
1116
- if (elementType === "input" || elementType === "select" || elementType === "textarea") {
1117
- viewProps.required = true;
1118
- }
1119
- }
1120
- if (nativeProps.accessibilityRoleDescription != null) {
1121
- viewProps["aria-roledescription"] = nativeProps.accessibilityRoleDescription;
1122
- }
1123
- if (nativeProps.accessibilityRowCount != null) {
1124
- viewProps["aria-rowcount"] = nativeProps.accessibilityRowCount;
1125
- }
1126
- if (nativeProps.accessibilityRowIndex != null) {
1127
- viewProps["aria-rowindex"] = nativeProps.accessibilityRowIndex;
1128
- }
1129
- if (nativeProps.accessibilityRowSpan != null) {
1130
- viewProps["aria-rowspan"] = nativeProps.accessibilityRowSpan;
1131
- }
1132
- if (nativeProps.accessibilitySelected != null) {
1133
- viewProps["aria-selected"] = nativeProps.accessibilitySelected;
1134
- }
1135
- if (nativeProps.accessibilitySetSize != null) {
1136
- viewProps["aria-setsize"] = nativeProps.accessibilitySetSize;
1137
- }
1138
- if (nativeProps.accessibilitySort != null) {
1139
- viewProps["aria-sort"] = nativeProps.accessibilitySort;
1140
- }
1141
- if (nativeProps.accessibilityValueMax != null) {
1142
- viewProps["aria-valuemax"] = nativeProps.accessibilityValueMax;
1143
- }
1144
- if (nativeProps.accessibilityValueMin != null) {
1145
- viewProps["aria-valuemin"] = nativeProps.accessibilityValueMin;
1146
- }
1147
- if (nativeProps.accessibilityValueNow != null) {
1148
- viewProps["aria-valuenow"] = nativeProps.accessibilityValueNow;
1149
- }
1150
- if (nativeProps.accessibilityValueText != null) {
1151
- viewProps["aria-valuetext"] = nativeProps.accessibilityValueText;
1152
- }
1153
- if (nativeProps.nativeID) {
1154
- viewProps.id = nativeProps.nativeID;
1155
- }
1156
- }
1157
983
  function addPseudoToStyles(styles, initialPseudos, pseudos, name, force = false) {
1158
984
  const pseudoStyle = pseudos[name];
1159
985
  const shouldNestObject = import_platform.isWeb && name !== "enterStyle" && name !== "exitStyle";
@@ -1163,14 +989,44 @@ function addPseudoToStyles(styles, initialPseudos, pseudos, name, force = false)
1163
989
  styles.push(shouldNestObject && !force ? { [name]: style } : style);
1164
990
  }
1165
991
  }
992
+ const DefaultProps = /* @__PURE__ */ new Map();
993
+ function mergeConfigDefaultProps(name, props, configDefaults, parentNames) {
994
+ const len = parentNames.length;
995
+ let prev;
996
+ for (let i = 0; i < len; i++) {
997
+ const n = parentNames[i];
998
+ if (!n)
999
+ continue;
1000
+ if (DefaultProps.has(n)) {
1001
+ prev = DefaultProps.get(n);
1002
+ continue;
1003
+ }
1004
+ const props2 = configDefaults[n];
1005
+ if (!props2) {
1006
+ if (prev) {
1007
+ DefaultProps.set(n, prev);
1008
+ }
1009
+ continue;
1010
+ }
1011
+ prev = (0, import_mergeProps.mergeProps)(prev || {}, props2)[0];
1012
+ console.log("set prev", prev);
1013
+ DefaultProps.set(n, prev);
1014
+ }
1015
+ const ourDefaultsMerged = DefaultProps.get(name);
1016
+ if (ourDefaultsMerged) {
1017
+ return (0, import_mergeProps.mergeProps)(props, ourDefaultsMerged)[0];
1018
+ }
1019
+ return props;
1020
+ }
1166
1021
  // Annotate the CommonJS export names for ESM import in node:
1167
1022
  0 && (module.exports = {
1168
1023
  AbsoluteFill,
1169
1024
  Spacer,
1170
1025
  Unspaced,
1171
- assignNativePropsToWeb,
1026
+ accessibilityRoleToWebRole,
1172
1027
  createComponent,
1173
1028
  mouseUps,
1029
+ processIDRefList,
1174
1030
  spacedChildren
1175
1031
  });
1176
1032
  //# sourceMappingURL=createComponent.js.map