@tamagui/core 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
@@ -1241,7 +1241,7 @@ var require_config_native = __commonJS({
1241
1241
  });
1242
1242
  module2.exports = __toCommonJS2(config_exports);
1243
1243
  var import_constants3 = require_index_native3(), conf, setConfig = (next) => {
1244
- conf = next, configListeners.forEach((cb) => cb(next));
1244
+ conf = next;
1245
1245
  }, setConfigFont = (name, font, fontParsed) => {
1246
1246
  if (process.env.NODE_ENV === "development" && !conf)
1247
1247
  throw new Error("Haven't called createTamagui yet");
@@ -4827,9 +4827,14 @@ var require_createComponent_native = __commonJS({
4827
4827
  var BaseText, BaseView, hasSetupBaseViews = !1;
4828
4828
  function createComponent(staticConfig) {
4829
4829
  var _a;
4830
- let config = null;
4830
+ let config = null, defaultProps = staticConfig.defaultProps;
4831
4831
  (0, import_config.onConfiguredOnce)((conf) => {
4832
- if (config = conf, !tamaguiConfig && (tamaguiConfig = conf, !initialTheme)) {
4832
+ var _a2;
4833
+ if (config = conf, staticConfig.componentName) {
4834
+ let defaultForComponent = (_a2 = conf.defaultProps) == null ? void 0 : _a2[staticConfig.componentName];
4835
+ defaultForComponent && (defaultProps = { ...defaultForComponent, ...defaultProps });
4836
+ }
4837
+ if (!tamaguiConfig && (tamaguiConfig = conf, !initialTheme)) {
4833
4838
  let next = conf.themes[Object.keys(conf.themes)[0]];
4834
4839
  initialTheme = (0, import_proxyThemeVariables.proxyThemeVariables)(next), process.env.NODE_ENV === "development" && (initialTheme || (0, import_log.log)("Warning: Missing theme"));
4835
4840
  }
@@ -4841,7 +4846,7 @@ var require_createComponent_native = __commonJS({
4841
4846
  isHOC,
4842
4847
  validStyles: validStyles2 = {},
4843
4848
  variants = {}
4844
- } = staticConfig, defaultComponentClassName = `is_${staticConfig.componentName}`, defaultProps = staticConfig.defaultProps;
4849
+ } = staticConfig, defaultComponentClassName = `is_${staticConfig.componentName}`;
4845
4850
  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"}]`, {
4846
4851
  staticConfig,
4847
4852
  defaultProps,
@@ -5947,7 +5952,7 @@ ${runtimeStyles}`;
5947
5952
  // const tokens = [...getToken(tokens.size[0])]
5948
5953
  // .spacer-sm + ._dsp_contents._dsp-sm-hidden { margin-left: -var(--${}) }
5949
5954
  };
5950
- 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;
5955
+ 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;
5951
5956
  }
5952
5957
  function getThemesDeduped(themes) {
5953
5958
  let dedupedThemes = [], existing = /* @__PURE__ */ new Map();