Socket
Socket
Sign inDemoInstall

@tamagui/web

Package Overview
Dependencies
Maintainers
2
Versions
799
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tamagui/web - npm Package Compare versions

Comparing version 1.16.6 to 1.17.0

16

dist/cjs/helpers/getThemeCSSRules.js

@@ -49,7 +49,4 @@ "use strict";

const isDarkOrLightBase = themeName === "dark" || themeName === "light";
const selectorsSet = new Set(
names.map((name) => {
return `${CNP}${name}`;
})
);
const baseSelectors = names.map((name) => `${CNP}${name}`);
const selectorsSet = new Set(baseSelectors);
if (hasDarkLight) {

@@ -120,2 +117,11 @@ for (const subName of names) {

}
if (config.selectionStyles) {
const selectionSelectors = baseSelectors.map((s) => `${s} ::selection`).join(", ");
const rules = config.selectionStyles(theme);
const styles = Object.entries(rules).map(
([k, v]) => `${k === "backgroundColor" ? "background" : k}:${(0, import_createVariable.variableToString)(v)}`
).join(";");
const css2 = `${selectionSelectors} {${styles}}`;
cssRuleSets.push(css2);
}
return cssRuleSets;

@@ -122,0 +128,0 @@ }

@@ -26,7 +26,4 @@ import { simpleHash } from "@tamagui/helpers";

const isDarkOrLightBase = themeName === "dark" || themeName === "light";
const selectorsSet = new Set(
names.map((name) => {
return `${CNP}${name}`;
})
);
const baseSelectors = names.map((name) => `${CNP}${name}`);
const selectorsSet = new Set(baseSelectors);
if (hasDarkLight) {

@@ -97,2 +94,11 @@ for (const subName of names) {

}
if (config.selectionStyles) {
const selectionSelectors = baseSelectors.map((s) => `${s} ::selection`).join(", ");
const rules = config.selectionStyles(theme);
const styles = Object.entries(rules).map(
([k, v]) => `${k === "backgroundColor" ? "background" : k}:${variableToString(v)}`
).join(";");
const css2 = `${selectionSelectors} {${styles}}`;
cssRuleSets.push(css2);
}
return cssRuleSets;

@@ -99,0 +105,0 @@ }

{
"name": "@tamagui/web",
"version": "1.16.6",
"version": "1.17.0",
"source": "src/index.ts",

@@ -30,9 +30,9 @@ "main": "dist/cjs",

"dependencies": {
"@tamagui/compose-refs": "1.16.6",
"@tamagui/constants": "1.16.6",
"@tamagui/helpers": "1.16.6",
"@tamagui/normalize-css-color": "1.16.6",
"@tamagui/use-did-finish-ssr": "1.16.6",
"@tamagui/use-event": "1.16.6",
"@tamagui/use-force-update": "1.16.6"
"@tamagui/compose-refs": "1.17.0",
"@tamagui/constants": "1.17.0",
"@tamagui/helpers": "1.17.0",
"@tamagui/normalize-css-color": "1.17.0",
"@tamagui/use-did-finish-ssr": "1.17.0",
"@tamagui/use-event": "1.17.0",
"@tamagui/use-force-update": "1.17.0"
},

@@ -43,3 +43,3 @@ "peerDependencies": {

"devDependencies": {
"@tamagui/build": "1.16.6",
"@tamagui/build": "1.17.0",
"@testing-library/react": "^13.4.0",

@@ -46,0 +46,0 @@ "csstype": "^3.0.10",

@@ -44,7 +44,4 @@ import { simpleHash } from '@tamagui/helpers'

const isDarkOrLightBase = themeName === 'dark' || themeName === 'light'
const selectorsSet = new Set(
names.map((name) => {
return `${CNP}${name}`
})
)
const baseSelectors = names.map((name) => `${CNP}${name}`)
const selectorsSet = new Set(baseSelectors)

@@ -145,2 +142,14 @@ // since we dont specify dark/light in classnames we have to do an awkward specificity war

if (config.selectionStyles) {
const selectionSelectors = baseSelectors.map((s) => `${s} ::selection`).join(', ')
const rules = config.selectionStyles(theme)
const styles = Object.entries(rules)
.map(
([k, v]) => `${k === 'backgroundColor' ? 'background' : k}:${variableToString(v)}`
)
.join(';')
const css = `${selectionSelectors} {${styles}}`
cssRuleSets.push(css)
}
return cssRuleSets

@@ -147,0 +156,0 @@ }

@@ -250,2 +250,9 @@ import type { StyleObject } from '@tamagui/helpers';

/**
* Web-only: define text-selection CSS
*/
selectionStyles?: (theme: ThemeParsed) => {
backgroundColor?: ColorStyleProp;
color?: ColorStyleProp;
};
/**
* *Advanced use case* For all CSS extracted views, this has no effect.

@@ -252,0 +259,0 @@ *

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

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