@vanilla-extract/css
Advanced tools
Comparing version 0.0.0-package-json-types-field-20240521234503 to 0.0.0-perf-dev-prefix-20240820014053
@@ -6,3 +6,3 @@ 'use strict'; | ||
var injectStyles_dist_vanillaExtractCssInjectStyles = require('../injectStyles/dist/vanilla-extract-css-injectStyles.browser.cjs.js'); | ||
var transformCss_dist_vanillaExtractCssTransformCss = require('./transformCss-70acc188.browser.cjs.js'); | ||
var transformCss_dist_vanillaExtractCssTransformCss = require('./transformCss-80eb10a6.browser.cjs.js'); | ||
var adapter_dist_vanillaExtractCssAdapter = require('../adapter/dist/vanilla-extract-css-adapter.browser.cjs.js'); | ||
@@ -62,75 +62,42 @@ var hash = require('@emotion/hash'); | ||
function _setPrototypeOf(o, p) { | ||
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { | ||
o.__proto__ = p; | ||
return o; | ||
}; | ||
return _setPrototypeOf(o, p); | ||
} | ||
function _inherits(subClass, superClass) { | ||
if (typeof superClass !== "function" && superClass !== null) { | ||
throw new TypeError("Super expression must either be null or a function"); | ||
} | ||
subClass.prototype = Object.create(superClass && superClass.prototype, { | ||
constructor: { | ||
value: subClass, | ||
writable: true, | ||
configurable: true | ||
var forwardSlash = 47; | ||
var backSlash = 92; | ||
var getLastSlashBeforeIndex = (path, index) => { | ||
var i = index; | ||
while (i >= 0) { | ||
var codeUnit = path.charCodeAt(i); | ||
if (codeUnit === forwardSlash || codeUnit === backSlash) { | ||
return i; | ||
} | ||
}); | ||
Object.defineProperty(subClass, "prototype", { | ||
writable: false | ||
}); | ||
if (superClass) _setPrototypeOf(subClass, superClass); | ||
} | ||
function _wrapRegExp() { | ||
_wrapRegExp = function (e, r) { | ||
return new BabelRegExp(e, void 0, r); | ||
}; | ||
var e = RegExp.prototype, | ||
r = new WeakMap(); | ||
function BabelRegExp(e, t, p) { | ||
var o = new RegExp(e, t); | ||
return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); | ||
} | ||
function buildGroups(e, t) { | ||
var p = r.get(t); | ||
return Object.keys(p).reduce(function (r, t) { | ||
var o = p[t]; | ||
if ("number" == typeof o) r[t] = e[o];else { | ||
for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; | ||
r[t] = e[o[i]]; | ||
// Check if codeUnit is a low surrogate | ||
if (codeUnit >= 0xdc00 && codeUnit <= 0xdfff) { | ||
// Ensure there's a previous character | ||
if (i > 0) { | ||
var maybeHighSurrogate = path.charCodeAt(i - 1); | ||
// Check if the previous code unit is a high surrogate | ||
if (maybeHighSurrogate >= 0xd800 && maybeHighSurrogate <= 0xdbff) { | ||
// Move past the high surrogate and continue | ||
i -= 2; | ||
continue; | ||
} | ||
} | ||
return r; | ||
}, Object.create(null)); | ||
} | ||
i--; | ||
} | ||
return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { | ||
var t = e.exec.call(this, r); | ||
if (t) { | ||
t.groups = buildGroups(t, this); | ||
var p = t.indices; | ||
p && (p.groups = buildGroups(p, this)); | ||
} | ||
return t; | ||
}, BabelRegExp.prototype[Symbol.replace] = function (t, p) { | ||
if ("string" == typeof p) { | ||
var o = r.get(this); | ||
return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { | ||
var t = o[r]; | ||
return "$" + (Array.isArray(t) ? t.join("$") : t); | ||
})); | ||
} | ||
if ("function" == typeof p) { | ||
var i = this; | ||
return e[Symbol.replace].call(this, t, function () { | ||
var e = arguments; | ||
return "object" != typeof e[e.length - 1] && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); | ||
}); | ||
} | ||
return e[Symbol.replace].call(this, t, p); | ||
}, _wrapRegExp.apply(this, arguments); | ||
} | ||
}; | ||
var customSplit3 = path => { | ||
var file = ''; | ||
var dir = ''; | ||
var lastIndexOfDotCss = path.lastIndexOf('.css'); | ||
var i = lastIndexOfDotCss - 1; | ||
var lastSlashIndex = getLastSlashBeforeIndex(path, i); | ||
var secondLastSlashIndex = getLastSlashBeforeIndex(path, lastSlashIndex - 1); | ||
dir = path.slice(secondLastSlashIndex + 1, lastSlashIndex); | ||
file = path.slice(lastSlashIndex + 1, lastIndexOfDotCss); | ||
return { | ||
dir, | ||
file | ||
}; | ||
}; | ||
function getDevPrefix(_ref) { | ||
@@ -146,13 +113,7 @@ var { | ||
} = fileScope_dist_vanillaExtractCssFileScope.getFileScope(); | ||
var matches = filePath.match( /*#__PURE__*/_wrapRegExp(/([^\/\\]*)?[\/\\]?([^\/\\]*)\.css\.(ts|js|tsx|jsx|cjs|mjs)$/, { | ||
dir: 1, | ||
file: 2 | ||
})); | ||
if (matches && matches.groups) { | ||
var { | ||
dir, | ||
file | ||
} = matches.groups; | ||
parts.unshift(file && file !== 'index' ? file : dir); | ||
} | ||
var { | ||
dir, | ||
file | ||
} = customSplit3(filePath); | ||
parts.unshift(file && file !== 'index' ? file : dir); | ||
} | ||
@@ -159,0 +120,0 @@ return parts.join('_'); |
import { injectStyles } from '../injectStyles/dist/vanilla-extract-css-injectStyles.browser.esm.js'; | ||
import { t as transformCss, _ as _objectSpread2, d as dudupeAndJoinClassList } from './transformCss-4c9a03c9.browser.esm.js'; | ||
import { t as transformCss, _ as _objectSpread2, d as dudupeAndJoinClassList } from './transformCss-72a2e7e9.browser.esm.js'; | ||
import { setAdapterIfNotSet, getIdentOption, appendCss, registerClassName, registerComposition, markCompositionUsed } from '../adapter/dist/vanilla-extract-css-adapter.browser.esm.js'; | ||
@@ -49,75 +49,42 @@ import hash from '@emotion/hash'; | ||
function _setPrototypeOf(o, p) { | ||
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { | ||
o.__proto__ = p; | ||
return o; | ||
}; | ||
return _setPrototypeOf(o, p); | ||
} | ||
function _inherits(subClass, superClass) { | ||
if (typeof superClass !== "function" && superClass !== null) { | ||
throw new TypeError("Super expression must either be null or a function"); | ||
} | ||
subClass.prototype = Object.create(superClass && superClass.prototype, { | ||
constructor: { | ||
value: subClass, | ||
writable: true, | ||
configurable: true | ||
var forwardSlash = 47; | ||
var backSlash = 92; | ||
var getLastSlashBeforeIndex = (path, index) => { | ||
var i = index; | ||
while (i >= 0) { | ||
var codeUnit = path.charCodeAt(i); | ||
if (codeUnit === forwardSlash || codeUnit === backSlash) { | ||
return i; | ||
} | ||
}); | ||
Object.defineProperty(subClass, "prototype", { | ||
writable: false | ||
}); | ||
if (superClass) _setPrototypeOf(subClass, superClass); | ||
} | ||
function _wrapRegExp() { | ||
_wrapRegExp = function (e, r) { | ||
return new BabelRegExp(e, void 0, r); | ||
}; | ||
var e = RegExp.prototype, | ||
r = new WeakMap(); | ||
function BabelRegExp(e, t, p) { | ||
var o = new RegExp(e, t); | ||
return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); | ||
} | ||
function buildGroups(e, t) { | ||
var p = r.get(t); | ||
return Object.keys(p).reduce(function (r, t) { | ||
var o = p[t]; | ||
if ("number" == typeof o) r[t] = e[o];else { | ||
for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; | ||
r[t] = e[o[i]]; | ||
// Check if codeUnit is a low surrogate | ||
if (codeUnit >= 0xdc00 && codeUnit <= 0xdfff) { | ||
// Ensure there's a previous character | ||
if (i > 0) { | ||
var maybeHighSurrogate = path.charCodeAt(i - 1); | ||
// Check if the previous code unit is a high surrogate | ||
if (maybeHighSurrogate >= 0xd800 && maybeHighSurrogate <= 0xdbff) { | ||
// Move past the high surrogate and continue | ||
i -= 2; | ||
continue; | ||
} | ||
} | ||
return r; | ||
}, Object.create(null)); | ||
} | ||
i--; | ||
} | ||
return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { | ||
var t = e.exec.call(this, r); | ||
if (t) { | ||
t.groups = buildGroups(t, this); | ||
var p = t.indices; | ||
p && (p.groups = buildGroups(p, this)); | ||
} | ||
return t; | ||
}, BabelRegExp.prototype[Symbol.replace] = function (t, p) { | ||
if ("string" == typeof p) { | ||
var o = r.get(this); | ||
return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { | ||
var t = o[r]; | ||
return "$" + (Array.isArray(t) ? t.join("$") : t); | ||
})); | ||
} | ||
if ("function" == typeof p) { | ||
var i = this; | ||
return e[Symbol.replace].call(this, t, function () { | ||
var e = arguments; | ||
return "object" != typeof e[e.length - 1] && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); | ||
}); | ||
} | ||
return e[Symbol.replace].call(this, t, p); | ||
}, _wrapRegExp.apply(this, arguments); | ||
} | ||
}; | ||
var customSplit3 = path => { | ||
var file = ''; | ||
var dir = ''; | ||
var lastIndexOfDotCss = path.lastIndexOf('.css'); | ||
var i = lastIndexOfDotCss - 1; | ||
var lastSlashIndex = getLastSlashBeforeIndex(path, i); | ||
var secondLastSlashIndex = getLastSlashBeforeIndex(path, lastSlashIndex - 1); | ||
dir = path.slice(secondLastSlashIndex + 1, lastSlashIndex); | ||
file = path.slice(lastSlashIndex + 1, lastIndexOfDotCss); | ||
return { | ||
dir, | ||
file | ||
}; | ||
}; | ||
function getDevPrefix(_ref) { | ||
@@ -133,13 +100,7 @@ var { | ||
} = getFileScope(); | ||
var matches = filePath.match( /*#__PURE__*/_wrapRegExp(/([^\/\\]*)?[\/\\]?([^\/\\]*)\.css\.(ts|js|tsx|jsx|cjs|mjs)$/, { | ||
dir: 1, | ||
file: 2 | ||
})); | ||
if (matches && matches.groups) { | ||
var { | ||
dir, | ||
file | ||
} = matches.groups; | ||
parts.unshift(file && file !== 'index' ? file : dir); | ||
} | ||
var { | ||
dir, | ||
file | ||
} = customSplit3(filePath); | ||
parts.unshift(file && file !== 'index' ? file : dir); | ||
} | ||
@@ -146,0 +107,0 @@ return parts.join('_'); |
@@ -245,4 +245,4 @@ import { Properties, AtRule } from 'csstype'; | ||
declare function createGlobalTheme<ThemeContract extends Contract>(selector: string, themeContract: ThemeContract, tokens: MapLeafNodes<ThemeContract, string>): void; | ||
declare function createTheme<ThemeContract extends Contract>(themeContract: ThemeContract, tokens: MapLeafNodes<ThemeContract, string>, debugId?: string): string; | ||
declare function createTheme<ThemeTokens extends Tokens>(tokens: ThemeTokens, debugId?: string): [className: string, vars: ThemeVars<ThemeTokens>]; | ||
declare function createTheme<ThemeContract extends Contract>(themeContract: ThemeContract, tokens: MapLeafNodes<ThemeContract, string>, debugId?: string): string; | ||
@@ -279,2 +279,2 @@ declare function style(rule: ComplexStyleRule, debugId?: string): string; | ||
export { Adapter, CSSProperties, ComplexStyleRule, FileScope, GlobalStyleRule, StyleRule, assignVars, composeStyles, createContainer, createGlobalTheme, createGlobalThemeContract, createTheme, createThemeContract, createVar, fallbackVar, fontFace, generateIdentifier, globalFontFace, globalKeyframes, globalLayer, globalStyle, keyframes, layer, style, styleVariants }; | ||
export { type Adapter, type CSSProperties, type ComplexStyleRule, type FileScope, type GlobalStyleRule, type StyleRule, assignVars, composeStyles, createContainer, createGlobalTheme, createGlobalThemeContract, createTheme, createThemeContract, createVar, fallbackVar, fontFace, generateIdentifier, globalFontFace, globalKeyframes, globalLayer, globalStyle, keyframes, layer, style, styleVariants }; |
@@ -6,3 +6,3 @@ 'use strict'; | ||
var injectStyles_dist_vanillaExtractCssInjectStyles = require('../injectStyles/dist/vanilla-extract-css-injectStyles.cjs.dev.js'); | ||
var transformCss_dist_vanillaExtractCssTransformCss = require('./transformCss-685a1929.cjs.dev.js'); | ||
var transformCss_dist_vanillaExtractCssTransformCss = require('./transformCss-96f55895.cjs.dev.js'); | ||
var adapter_dist_vanillaExtractCssAdapter = require('../adapter/dist/vanilla-extract-css-adapter.cjs.dev.js'); | ||
@@ -62,75 +62,42 @@ var hash = require('@emotion/hash'); | ||
function _setPrototypeOf(o, p) { | ||
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { | ||
o.__proto__ = p; | ||
return o; | ||
}; | ||
return _setPrototypeOf(o, p); | ||
} | ||
function _inherits(subClass, superClass) { | ||
if (typeof superClass !== "function" && superClass !== null) { | ||
throw new TypeError("Super expression must either be null or a function"); | ||
} | ||
subClass.prototype = Object.create(superClass && superClass.prototype, { | ||
constructor: { | ||
value: subClass, | ||
writable: true, | ||
configurable: true | ||
var forwardSlash = 47; | ||
var backSlash = 92; | ||
var getLastSlashBeforeIndex = (path, index) => { | ||
var i = index; | ||
while (i >= 0) { | ||
var codeUnit = path.charCodeAt(i); | ||
if (codeUnit === forwardSlash || codeUnit === backSlash) { | ||
return i; | ||
} | ||
}); | ||
Object.defineProperty(subClass, "prototype", { | ||
writable: false | ||
}); | ||
if (superClass) _setPrototypeOf(subClass, superClass); | ||
} | ||
function _wrapRegExp() { | ||
_wrapRegExp = function (e, r) { | ||
return new BabelRegExp(e, void 0, r); | ||
}; | ||
var e = RegExp.prototype, | ||
r = new WeakMap(); | ||
function BabelRegExp(e, t, p) { | ||
var o = new RegExp(e, t); | ||
return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); | ||
} | ||
function buildGroups(e, t) { | ||
var p = r.get(t); | ||
return Object.keys(p).reduce(function (r, t) { | ||
var o = p[t]; | ||
if ("number" == typeof o) r[t] = e[o];else { | ||
for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; | ||
r[t] = e[o[i]]; | ||
// Check if codeUnit is a low surrogate | ||
if (codeUnit >= 0xdc00 && codeUnit <= 0xdfff) { | ||
// Ensure there's a previous character | ||
if (i > 0) { | ||
var maybeHighSurrogate = path.charCodeAt(i - 1); | ||
// Check if the previous code unit is a high surrogate | ||
if (maybeHighSurrogate >= 0xd800 && maybeHighSurrogate <= 0xdbff) { | ||
// Move past the high surrogate and continue | ||
i -= 2; | ||
continue; | ||
} | ||
} | ||
return r; | ||
}, Object.create(null)); | ||
} | ||
i--; | ||
} | ||
return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { | ||
var t = e.exec.call(this, r); | ||
if (t) { | ||
t.groups = buildGroups(t, this); | ||
var p = t.indices; | ||
p && (p.groups = buildGroups(p, this)); | ||
} | ||
return t; | ||
}, BabelRegExp.prototype[Symbol.replace] = function (t, p) { | ||
if ("string" == typeof p) { | ||
var o = r.get(this); | ||
return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { | ||
var t = o[r]; | ||
return "$" + (Array.isArray(t) ? t.join("$") : t); | ||
})); | ||
} | ||
if ("function" == typeof p) { | ||
var i = this; | ||
return e[Symbol.replace].call(this, t, function () { | ||
var e = arguments; | ||
return "object" != typeof e[e.length - 1] && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); | ||
}); | ||
} | ||
return e[Symbol.replace].call(this, t, p); | ||
}, _wrapRegExp.apply(this, arguments); | ||
} | ||
}; | ||
var customSplit3 = path => { | ||
var file = ''; | ||
var dir = ''; | ||
var lastIndexOfDotCss = path.lastIndexOf('.css'); | ||
var i = lastIndexOfDotCss - 1; | ||
var lastSlashIndex = getLastSlashBeforeIndex(path, i); | ||
var secondLastSlashIndex = getLastSlashBeforeIndex(path, lastSlashIndex - 1); | ||
dir = path.slice(secondLastSlashIndex + 1, lastSlashIndex); | ||
file = path.slice(lastSlashIndex + 1, lastIndexOfDotCss); | ||
return { | ||
dir, | ||
file | ||
}; | ||
}; | ||
function getDevPrefix(_ref) { | ||
@@ -146,13 +113,7 @@ var { | ||
} = fileScope_dist_vanillaExtractCssFileScope.getFileScope(); | ||
var matches = filePath.match( /*#__PURE__*/_wrapRegExp(/([^\/\\]*)?[\/\\]?([^\/\\]*)\.css\.(ts|js|tsx|jsx|cjs|mjs)$/, { | ||
dir: 1, | ||
file: 2 | ||
})); | ||
if (matches && matches.groups) { | ||
var { | ||
dir, | ||
file | ||
} = matches.groups; | ||
parts.unshift(file && file !== 'index' ? file : dir); | ||
} | ||
var { | ||
dir, | ||
file | ||
} = customSplit3(filePath); | ||
parts.unshift(file && file !== 'index' ? file : dir); | ||
} | ||
@@ -159,0 +120,0 @@ return parts.join('_'); |
@@ -6,3 +6,3 @@ 'use strict'; | ||
var injectStyles_dist_vanillaExtractCssInjectStyles = require('../injectStyles/dist/vanilla-extract-css-injectStyles.cjs.prod.js'); | ||
var transformCss_dist_vanillaExtractCssTransformCss = require('./transformCss-2f72c4c3.cjs.prod.js'); | ||
var transformCss_dist_vanillaExtractCssTransformCss = require('./transformCss-5f281e7b.cjs.prod.js'); | ||
var adapter_dist_vanillaExtractCssAdapter = require('../adapter/dist/vanilla-extract-css-adapter.cjs.prod.js'); | ||
@@ -62,75 +62,42 @@ var hash = require('@emotion/hash'); | ||
function _setPrototypeOf(o, p) { | ||
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { | ||
o.__proto__ = p; | ||
return o; | ||
}; | ||
return _setPrototypeOf(o, p); | ||
} | ||
function _inherits(subClass, superClass) { | ||
if (typeof superClass !== "function" && superClass !== null) { | ||
throw new TypeError("Super expression must either be null or a function"); | ||
} | ||
subClass.prototype = Object.create(superClass && superClass.prototype, { | ||
constructor: { | ||
value: subClass, | ||
writable: true, | ||
configurable: true | ||
var forwardSlash = 47; | ||
var backSlash = 92; | ||
var getLastSlashBeforeIndex = (path, index) => { | ||
var i = index; | ||
while (i >= 0) { | ||
var codeUnit = path.charCodeAt(i); | ||
if (codeUnit === forwardSlash || codeUnit === backSlash) { | ||
return i; | ||
} | ||
}); | ||
Object.defineProperty(subClass, "prototype", { | ||
writable: false | ||
}); | ||
if (superClass) _setPrototypeOf(subClass, superClass); | ||
} | ||
function _wrapRegExp() { | ||
_wrapRegExp = function (e, r) { | ||
return new BabelRegExp(e, void 0, r); | ||
}; | ||
var e = RegExp.prototype, | ||
r = new WeakMap(); | ||
function BabelRegExp(e, t, p) { | ||
var o = new RegExp(e, t); | ||
return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); | ||
} | ||
function buildGroups(e, t) { | ||
var p = r.get(t); | ||
return Object.keys(p).reduce(function (r, t) { | ||
var o = p[t]; | ||
if ("number" == typeof o) r[t] = e[o];else { | ||
for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; | ||
r[t] = e[o[i]]; | ||
// Check if codeUnit is a low surrogate | ||
if (codeUnit >= 0xdc00 && codeUnit <= 0xdfff) { | ||
// Ensure there's a previous character | ||
if (i > 0) { | ||
var maybeHighSurrogate = path.charCodeAt(i - 1); | ||
// Check if the previous code unit is a high surrogate | ||
if (maybeHighSurrogate >= 0xd800 && maybeHighSurrogate <= 0xdbff) { | ||
// Move past the high surrogate and continue | ||
i -= 2; | ||
continue; | ||
} | ||
} | ||
return r; | ||
}, Object.create(null)); | ||
} | ||
i--; | ||
} | ||
return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { | ||
var t = e.exec.call(this, r); | ||
if (t) { | ||
t.groups = buildGroups(t, this); | ||
var p = t.indices; | ||
p && (p.groups = buildGroups(p, this)); | ||
} | ||
return t; | ||
}, BabelRegExp.prototype[Symbol.replace] = function (t, p) { | ||
if ("string" == typeof p) { | ||
var o = r.get(this); | ||
return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { | ||
var t = o[r]; | ||
return "$" + (Array.isArray(t) ? t.join("$") : t); | ||
})); | ||
} | ||
if ("function" == typeof p) { | ||
var i = this; | ||
return e[Symbol.replace].call(this, t, function () { | ||
var e = arguments; | ||
return "object" != typeof e[e.length - 1] && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); | ||
}); | ||
} | ||
return e[Symbol.replace].call(this, t, p); | ||
}, _wrapRegExp.apply(this, arguments); | ||
} | ||
}; | ||
var customSplit3 = path => { | ||
var file = ''; | ||
var dir = ''; | ||
var lastIndexOfDotCss = path.lastIndexOf('.css'); | ||
var i = lastIndexOfDotCss - 1; | ||
var lastSlashIndex = getLastSlashBeforeIndex(path, i); | ||
var secondLastSlashIndex = getLastSlashBeforeIndex(path, lastSlashIndex - 1); | ||
dir = path.slice(secondLastSlashIndex + 1, lastSlashIndex); | ||
file = path.slice(lastSlashIndex + 1, lastIndexOfDotCss); | ||
return { | ||
dir, | ||
file | ||
}; | ||
}; | ||
function getDevPrefix(_ref) { | ||
@@ -146,13 +113,7 @@ var { | ||
} = fileScope_dist_vanillaExtractCssFileScope.getFileScope(); | ||
var matches = filePath.match( /*#__PURE__*/_wrapRegExp(/([^\/\\]*)?[\/\\]?([^\/\\]*)\.css\.(ts|js|tsx|jsx|cjs|mjs)$/, { | ||
dir: 1, | ||
file: 2 | ||
})); | ||
if (matches && matches.groups) { | ||
var { | ||
dir, | ||
file | ||
} = matches.groups; | ||
parts.unshift(file && file !== 'index' ? file : dir); | ||
} | ||
var { | ||
dir, | ||
file | ||
} = customSplit3(filePath); | ||
parts.unshift(file && file !== 'index' ? file : dir); | ||
} | ||
@@ -159,0 +120,0 @@ return parts.join('_'); |
import { injectStyles } from '../injectStyles/dist/vanilla-extract-css-injectStyles.esm.js'; | ||
import { t as transformCss, _ as _objectSpread2, d as dudupeAndJoinClassList } from './transformCss-dbd4a521.esm.js'; | ||
import { t as transformCss, _ as _objectSpread2, d as dudupeAndJoinClassList } from './transformCss-9149bda7.esm.js'; | ||
import { setAdapterIfNotSet, getIdentOption, appendCss, registerClassName, registerComposition, markCompositionUsed } from '../adapter/dist/vanilla-extract-css-adapter.esm.js'; | ||
@@ -49,75 +49,42 @@ import hash from '@emotion/hash'; | ||
function _setPrototypeOf(o, p) { | ||
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { | ||
o.__proto__ = p; | ||
return o; | ||
}; | ||
return _setPrototypeOf(o, p); | ||
} | ||
function _inherits(subClass, superClass) { | ||
if (typeof superClass !== "function" && superClass !== null) { | ||
throw new TypeError("Super expression must either be null or a function"); | ||
} | ||
subClass.prototype = Object.create(superClass && superClass.prototype, { | ||
constructor: { | ||
value: subClass, | ||
writable: true, | ||
configurable: true | ||
var forwardSlash = 47; | ||
var backSlash = 92; | ||
var getLastSlashBeforeIndex = (path, index) => { | ||
var i = index; | ||
while (i >= 0) { | ||
var codeUnit = path.charCodeAt(i); | ||
if (codeUnit === forwardSlash || codeUnit === backSlash) { | ||
return i; | ||
} | ||
}); | ||
Object.defineProperty(subClass, "prototype", { | ||
writable: false | ||
}); | ||
if (superClass) _setPrototypeOf(subClass, superClass); | ||
} | ||
function _wrapRegExp() { | ||
_wrapRegExp = function (e, r) { | ||
return new BabelRegExp(e, void 0, r); | ||
}; | ||
var e = RegExp.prototype, | ||
r = new WeakMap(); | ||
function BabelRegExp(e, t, p) { | ||
var o = new RegExp(e, t); | ||
return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); | ||
} | ||
function buildGroups(e, t) { | ||
var p = r.get(t); | ||
return Object.keys(p).reduce(function (r, t) { | ||
var o = p[t]; | ||
if ("number" == typeof o) r[t] = e[o];else { | ||
for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; | ||
r[t] = e[o[i]]; | ||
// Check if codeUnit is a low surrogate | ||
if (codeUnit >= 0xdc00 && codeUnit <= 0xdfff) { | ||
// Ensure there's a previous character | ||
if (i > 0) { | ||
var maybeHighSurrogate = path.charCodeAt(i - 1); | ||
// Check if the previous code unit is a high surrogate | ||
if (maybeHighSurrogate >= 0xd800 && maybeHighSurrogate <= 0xdbff) { | ||
// Move past the high surrogate and continue | ||
i -= 2; | ||
continue; | ||
} | ||
} | ||
return r; | ||
}, Object.create(null)); | ||
} | ||
i--; | ||
} | ||
return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { | ||
var t = e.exec.call(this, r); | ||
if (t) { | ||
t.groups = buildGroups(t, this); | ||
var p = t.indices; | ||
p && (p.groups = buildGroups(p, this)); | ||
} | ||
return t; | ||
}, BabelRegExp.prototype[Symbol.replace] = function (t, p) { | ||
if ("string" == typeof p) { | ||
var o = r.get(this); | ||
return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { | ||
var t = o[r]; | ||
return "$" + (Array.isArray(t) ? t.join("$") : t); | ||
})); | ||
} | ||
if ("function" == typeof p) { | ||
var i = this; | ||
return e[Symbol.replace].call(this, t, function () { | ||
var e = arguments; | ||
return "object" != typeof e[e.length - 1] && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); | ||
}); | ||
} | ||
return e[Symbol.replace].call(this, t, p); | ||
}, _wrapRegExp.apply(this, arguments); | ||
} | ||
}; | ||
var customSplit3 = path => { | ||
var file = ''; | ||
var dir = ''; | ||
var lastIndexOfDotCss = path.lastIndexOf('.css'); | ||
var i = lastIndexOfDotCss - 1; | ||
var lastSlashIndex = getLastSlashBeforeIndex(path, i); | ||
var secondLastSlashIndex = getLastSlashBeforeIndex(path, lastSlashIndex - 1); | ||
dir = path.slice(secondLastSlashIndex + 1, lastSlashIndex); | ||
file = path.slice(lastSlashIndex + 1, lastIndexOfDotCss); | ||
return { | ||
dir, | ||
file | ||
}; | ||
}; | ||
function getDevPrefix(_ref) { | ||
@@ -133,13 +100,7 @@ var { | ||
} = getFileScope(); | ||
var matches = filePath.match( /*#__PURE__*/_wrapRegExp(/([^\/\\]*)?[\/\\]?([^\/\\]*)\.css\.(ts|js|tsx|jsx|cjs|mjs)$/, { | ||
dir: 1, | ||
file: 2 | ||
})); | ||
if (matches && matches.groups) { | ||
var { | ||
dir, | ||
file | ||
} = matches.groups; | ||
parts.unshift(file && file !== 'index' ? file : dir); | ||
} | ||
var { | ||
dir, | ||
file | ||
} = customSplit3(filePath); | ||
parts.unshift(file && file !== 'index' ? file : dir); | ||
} | ||
@@ -146,0 +107,0 @@ return parts.join('_'); |
{ | ||
"name": "@vanilla-extract/css", | ||
"version": "0.0.0-package-json-types-field-20240521234503", | ||
"version": "0.0.0-perf-dev-prefix-20240820014053", | ||
"description": "Zero-runtime Stylesheets-in-TypeScript", | ||
@@ -120,3 +120,2 @@ "sideEffects": true, | ||
"@emotion/hash": "^0.9.0", | ||
"@vanilla-extract/private": "0.0.0-package-json-types-field-20240521234503", | ||
"css-what": "^6.1.0", | ||
@@ -130,3 +129,4 @@ "cssesc": "^3.0.0", | ||
"modern-ahocorasick": "^1.0.0", | ||
"picocolors": "^1.0.0" | ||
"picocolors": "^1.0.0", | ||
"@vanilla-extract/private": "^1.0.6" | ||
}, | ||
@@ -133,0 +133,0 @@ "devDependencies": { |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var transformCss_dist_vanillaExtractCssTransformCss = require('../../dist/transformCss-70acc188.browser.cjs.js'); | ||
var transformCss_dist_vanillaExtractCssTransformCss = require('../../dist/transformCss-80eb10a6.browser.cjs.js'); | ||
require('@vanilla-extract/private'); | ||
@@ -8,0 +8,0 @@ require('cssesc'); |
@@ -1,2 +0,2 @@ | ||
export { t as transformCss } from '../../dist/transformCss-4c9a03c9.browser.esm.js'; | ||
export { t as transformCss } from '../../dist/transformCss-72a2e7e9.browser.esm.js'; | ||
import '@vanilla-extract/private'; | ||
@@ -3,0 +3,0 @@ import 'cssesc'; |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var transformCss_dist_vanillaExtractCssTransformCss = require('../../dist/transformCss-685a1929.cjs.dev.js'); | ||
var transformCss_dist_vanillaExtractCssTransformCss = require('../../dist/transformCss-96f55895.cjs.dev.js'); | ||
require('@vanilla-extract/private'); | ||
@@ -8,0 +8,0 @@ require('cssesc'); |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var transformCss_dist_vanillaExtractCssTransformCss = require('../../dist/transformCss-2f72c4c3.cjs.prod.js'); | ||
var transformCss_dist_vanillaExtractCssTransformCss = require('../../dist/transformCss-5f281e7b.cjs.prod.js'); | ||
require('@vanilla-extract/private'); | ||
@@ -8,0 +8,0 @@ require('cssesc'); |
@@ -1,2 +0,2 @@ | ||
export { t as transformCss } from '../../dist/transformCss-dbd4a521.esm.js'; | ||
export { t as transformCss } from '../../dist/transformCss-9149bda7.esm.js'; | ||
import '@vanilla-extract/private'; | ||
@@ -3,0 +3,0 @@ import 'cssesc'; |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
324583
8513
+ Added@vanilla-extract/private@1.0.6(transitive)
- Removed@vanilla-extract/private@0.0.0-package-json-types-field-20240521234503(transitive)