Socket
Socket
Sign inDemoInstall

@tamagui/core

Package Overview
Dependencies
Maintainers
1
Versions
1121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tamagui/core - npm Package Compare versions

Comparing version 1.108.0 to 1.108.1

18

dist/cjs/createOptimizedView.native.js
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -15,3 +16,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var createOptimizedView_native_exports = {};

@@ -23,3 +31,3 @@ __export(createOptimizedView_native_exports, {

module.exports = __toCommonJS(createOptimizedView_native_exports);
var import_react = require("react");
var import_react = __toESM(require("react"));
function createOptimizedView(children, viewProps, baseViews) {

@@ -60,4 +68,4 @@ var TextAncestor = baseViews.TextAncestor, ViewNativeComponent = baseViews.View, accessibilityElementsHidden = (

extras[key] != null && (finalProps[key] = extras[key]);
var isInText = (0, import_react.useContext)(TextAncestor), finalElement = /* @__PURE__ */ (0, import_react.createElement)(ViewNativeComponent, finalProps, children);
return isInText ? /* @__PURE__ */ (0, import_react.createElement)(TextAncestor.Provider, {
var isInText = import_react.default.useContext(TextAncestor), finalElement = /* @__PURE__ */ import_react.default.createElement(ViewNativeComponent, finalProps, children);
return isInText ? /* @__PURE__ */ import_react.default.createElement(TextAncestor.Provider, {
value: !1

@@ -64,0 +72,0 @@ }, finalElement) : finalElement;

@@ -0,5 +1,6 @@

var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -13,4 +14,10 @@ for (var name in all)

return to;
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")), __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var src_exports = {};

@@ -23,3 +30,3 @@ __export(src_exports, {

module.exports = __toCommonJS(src_exports);
var import_react_native_use_responder_events = require("@tamagui/react-native-use-responder-events"), import_web = require("@tamagui/web"), import_react = require("react"), import_createOptimizedView = require("./createOptimizedView"), import_getBaseViews = require("./getBaseViews"), import_useElementLayout = require("./hooks/useElementLayout"), import_usePlatformMethods = require("./hooks/usePlatformMethods"), import_Pressability = require("./vendor/Pressability");
var import_react = __toESM(require("react")), import_react_native_use_responder_events = require("@tamagui/react-native-use-responder-events"), import_web = require("@tamagui/web"), import_createOptimizedView = require("./createOptimizedView"), import_getBaseViews = require("./getBaseViews"), import_useElementLayout = require("./hooks/useElementLayout"), import_usePlatformMethods = require("./hooks/usePlatformMethods"), import_Pressability = require("./vendor/Pressability");
__reExport(src_exports, require("@tamagui/web"), module.exports);

@@ -61,3 +68,3 @@ __reExport(src_exports, require("./reactNativeTypes"), module.exports);

if (willHydrate || isDOM) {
const hostRef = (0, import_react.useMemo)(
const hostRef = import_react.default.useMemo(
() => ({

@@ -64,0 +71,0 @@ get current() {

"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -14,4 +15,10 @@ for (var name in all)

return to;
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")), __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var src_exports = {};

@@ -24,3 +31,3 @@ __export(src_exports, {

module.exports = __toCommonJS(src_exports);
var import_react_native_use_responder_events = require("@tamagui/react-native-use-responder-events"), import_web = require("@tamagui/web"), import_react = require("react"), import_createOptimizedView = require("./createOptimizedView"), import_getBaseViews = require("./getBaseViews"), import_useElementLayout = require("./hooks/useElementLayout"), import_usePlatformMethods = require("./hooks/usePlatformMethods"), import_Pressability = require("./vendor/Pressability");
var import_react = __toESM(require("react")), import_react_native_use_responder_events = require("@tamagui/react-native-use-responder-events"), import_web = require("@tamagui/web"), import_createOptimizedView = require("./createOptimizedView"), import_getBaseViews = require("./getBaseViews"), import_useElementLayout = require("./hooks/useElementLayout"), import_usePlatformMethods = require("./hooks/usePlatformMethods"), import_Pressability = require("./vendor/Pressability");
__reExport(src_exports, require("@tamagui/web"), module.exports);

@@ -87,3 +94,3 @@ __reExport(src_exports, require("./reactNativeTypes"), module.exports);

if (process.env.TAMAGUI_OPTIMIZE_NATIVE_VIEWS && elementType === baseViews.Text)
return viewProps.children = children, /* @__PURE__ */ (0, import_react.createElement)("RCTText", viewProps);
return viewProps.children = children, /* @__PURE__ */ import_react.default.createElement("RCTText", viewProps);
}

@@ -90,0 +97,0 @@ }

@@ -1,2 +0,2 @@

import { createElement, useContext } from "react";
import React from "react";
function createOptimizedView(children, viewProps, baseViews) {

@@ -37,4 +37,4 @@ var TextAncestor = baseViews.TextAncestor, ViewNativeComponent = baseViews.View, accessibilityElementsHidden = (

extras[key] != null && (finalProps[key] = extras[key]);
var isInText = useContext(TextAncestor), finalElement = /* @__PURE__ */ createElement(ViewNativeComponent, finalProps, children);
return isInText ? /* @__PURE__ */ createElement(TextAncestor.Provider, {
var isInText = React.useContext(TextAncestor), finalElement = /* @__PURE__ */ React.createElement(ViewNativeComponent, finalProps, children);
return isInText ? /* @__PURE__ */ React.createElement(TextAncestor.Provider, {
value: !1

@@ -41,0 +41,0 @@ }, finalElement) : finalElement;

@@ -0,1 +1,2 @@

import React from "react";
import { useResponderEvents } from "@tamagui/react-native-use-responder-events";

@@ -8,3 +9,2 @@ import {

} from "@tamagui/web";
import { useMemo } from "react";
import "./createOptimizedView";

@@ -51,3 +51,3 @@ import { getBaseViews } from "./getBaseViews";

if (willHydrate || isDOM) {
const hostRef = useMemo(
const hostRef = React.useMemo(
() => ({

@@ -54,0 +54,0 @@ get current() {

@@ -0,4 +1,4 @@

import React from "react";
import "@tamagui/react-native-use-responder-events";
import { Stack as WebStack, Text as WebText, View as WebView, composeEventHandlers, setupHooks } from "@tamagui/web";
import { createElement } from "react";
import { createOptimizedView } from "./createOptimizedView";

@@ -70,3 +70,3 @@ import { getBaseViews } from "./getBaseViews";

if (process.env.TAMAGUI_OPTIMIZE_NATIVE_VIEWS && elementType === baseViews.Text)
return viewProps.children = children, /* @__PURE__ */ createElement("RCTText", viewProps);
return viewProps.children = children, /* @__PURE__ */ React.createElement("RCTText", viewProps);
}

@@ -73,0 +73,0 @@ }

{
"name": "@tamagui/core",
"version": "1.108.0",
"version": "1.108.1",
"source": "src/index.tsx",

@@ -38,10 +38,10 @@ "main": "dist/cjs",

"dependencies": {
"@tamagui/react-native-use-pressable": "1.108.0",
"@tamagui/react-native-use-responder-events": "1.108.0",
"@tamagui/use-event": "1.108.0",
"@tamagui/web": "1.108.0"
"@tamagui/react-native-use-pressable": "1.108.1",
"@tamagui/react-native-use-responder-events": "1.108.1",
"@tamagui/use-event": "1.108.1",
"@tamagui/web": "1.108.1"
},
"devDependencies": {
"@tamagui/build": "1.108.0",
"@testing-library/react": "^14.0.0",
"@tamagui/build": "1.108.1",
"@testing-library/react": "^16.0.0",
"csstype": "^3.0.10",

@@ -48,0 +48,0 @@ "typescript": "^5.5.2",

@@ -0,1 +1,2 @@

import React from 'react';
/**

@@ -10,5 +11,5 @@ * Copyright (c) Meta Platforms, Inc. and affiliates.

*/
export declare function createOptimizedView(children: any, viewProps: Record<string, any>, baseViews: any): import("react").DetailedReactHTMLElement<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> | import("react").CElement<{
export declare function createOptimizedView(children: any, viewProps: Record<string, any>, baseViews: any): React.DetailedReactHTMLElement<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> | React.CElement<{
value: boolean;
}, import("react").Component<{
}, React.Component<{
value: boolean;

@@ -15,0 +16,0 @@ }, any, any>>;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc