tamagui 1.79.18 → 1.79.19

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.
package/dist/native.js CHANGED
@@ -1105,7 +1105,7 @@ var require_config_native = __commonJS({
1105
1105
  });
1106
1106
  module2.exports = __toCommonJS2(config_exports);
1107
1107
  var import_constants4 = require_index_native(), conf, setConfig = (next) => {
1108
- conf = next, configListeners.forEach((cb) => cb(next));
1108
+ conf = next;
1109
1109
  }, setConfigFont = (name, font, fontParsed) => {
1110
1110
  if (process.env.NODE_ENV === "development" && !conf)
1111
1111
  throw new Error("Haven't called createTamagui yet");
@@ -4663,9 +4663,14 @@ var require_createComponent_native = __commonJS({
4663
4663
  var BaseText, BaseView, hasSetupBaseViews = !1;
4664
4664
  function createComponent2(staticConfig) {
4665
4665
  var _a;
4666
- let config = null;
4666
+ let config = null, defaultProps = staticConfig.defaultProps;
4667
4667
  (0, import_config.onConfiguredOnce)((conf) => {
4668
- if (config = conf, !tamaguiConfig && (tamaguiConfig = conf, !initialTheme)) {
4668
+ var _a2;
4669
+ if (config = conf, staticConfig.componentName) {
4670
+ let defaultForComponent = (_a2 = conf.defaultProps) == null ? void 0 : _a2[staticConfig.componentName];
4671
+ defaultForComponent && (defaultProps = { ...defaultForComponent, ...defaultProps });
4672
+ }
4673
+ if (!tamaguiConfig && (tamaguiConfig = conf, !initialTheme)) {
4669
4674
  let next = conf.themes[Object.keys(conf.themes)[0]];
4670
4675
  initialTheme = (0, import_proxyThemeVariables.proxyThemeVariables)(next), process.env.NODE_ENV === "development" && (initialTheme || (0, import_log.log)("Warning: Missing theme"));
4671
4676
  }
@@ -4677,7 +4682,7 @@ var require_createComponent_native = __commonJS({
4677
4682
  isHOC,
4678
4683
  validStyles: validStyles2 = {},
4679
4684
  variants = {}
4680
- } = staticConfig, defaultComponentClassName = `is_${staticConfig.componentName}`, defaultProps = staticConfig.defaultProps;
4685
+ } = staticConfig, defaultComponentClassName = `is_${staticConfig.componentName}`;
4681
4686
  process.env.NODE_ENV === "development" && (_a = staticConfig.defaultProps) != null && _a.debug && process.env.IS_STATIC !== "is_static" && (0, import_log.log)(`\u{1F41B} [${staticConfig.componentName || "Component"}]`, {
4682
4687
  staticConfig,
4683
4688
  defaultProps,
@@ -5783,7 +5788,7 @@ ${runtimeStyles}`;
5783
5788
  // const tokens = [...getToken(tokens.size[0])]
5784
5789
  // .spacer-sm + ._dsp_contents._dsp-sm-hidden { margin-left: -var(--${}) }
5785
5790
  };
5786
- return (0, import_useMedia.configureMedia)(config), (0, import_config.setConfig)(config), import_config.configListeners.size && (import_config.configListeners.forEach((cb) => cb(config)), import_config.configListeners.clear()), createdConfigs.set(config, !0), process.env.NODE_ENV === "development" && ((_a = process.env.DEBUG) != null && _a.startsWith("tamagui") && console.info("Tamagui config:", config), globalThis.Tamagui || (globalThis.Tamagui = import_Tamagui.Tamagui)), config;
5791
+ return (0, import_useMedia.configureMedia)(config), (0, import_config.setConfig)(config), createdConfigs.set(config, !0), import_config.configListeners.size && (import_config.configListeners.forEach((cb) => cb(config)), import_config.configListeners.clear()), process.env.NODE_ENV === "development" && ((_a = process.env.DEBUG) != null && _a.startsWith("tamagui") && console.info("Tamagui config:", config), globalThis.Tamagui || (globalThis.Tamagui = import_Tamagui.Tamagui)), config;
5787
5792
  }
5788
5793
  function getThemesDeduped(themes) {
5789
5794
  let dedupedThemes = [], existing = /* @__PURE__ */ new Map();