@vanilla-extract/css
Advanced tools
Comparing version 0.0.0-filescope-urls-2022810112138 to 0.0.0-filescope-urls-202281122225
@@ -6,3 +6,3 @@ 'use strict'; | ||
var taggedTemplateLiteral = require('../../dist/taggedTemplateLiteral-c635af00.browser.cjs.js'); | ||
var fileURLToPath = require('file-uri-to-path'); | ||
var fileURIToPath = require('file-uri-to-path'); | ||
var outdent = require('outdent'); | ||
@@ -13,5 +13,16 @@ var adapter_dist_vanillaExtractCssAdapter = require('../../adapter/dist/vanilla-extract-css-adapter.browser.cjs.js'); | ||
var fileURLToPath__default = /*#__PURE__*/_interopDefault(fileURLToPath); | ||
var fileURIToPath__default = /*#__PURE__*/_interopDefault(fileURIToPath); | ||
var outdent__default = /*#__PURE__*/_interopDefault(outdent); | ||
var relativePath = (from, to) => { | ||
var fromDirs = from.split('/'); | ||
var toDirs = to.split('/'); | ||
var firstDifferentDirIndex = toDirs.findIndex((toDir, index) => fromDirs[index] !== toDir); | ||
var fromDepth = fromDirs.length; | ||
var parentDirs = Array.from({ | ||
length: fromDepth - firstDifferentDirIndex | ||
}, () => '..'); | ||
return [...parentDirs, ...toDirs.slice(firstDifferentDirIndex)].join('/'); | ||
}; | ||
var _templateObject; | ||
@@ -24,4 +35,4 @@ var refCounter = 0; | ||
try { | ||
filePath = fileURLToPath__default["default"](fileScopePath); | ||
} catch (e) {// If fileURLToPath failed then fileScope is already a valid path | ||
filePath = fileURIToPath__default["default"](fileScopePath); | ||
} catch (e) {// If fileURIToPath failed then fileScope is already a valid path | ||
} | ||
@@ -31,4 +42,4 @@ | ||
if (projectRoot && filePath.startsWith(projectRoot)) { | ||
filePath = filePath.slice(projectRoot.length); | ||
if (projectRoot) { | ||
filePath = relativePath(projectRoot, filePath); | ||
} | ||
@@ -38,3 +49,4 @@ | ||
fileScopes.unshift({ | ||
filePath, | ||
// Remove extra extensions | ||
filePath: filePath.replace(/\.[^.]*$/, ''), | ||
packageName | ||
@@ -41,0 +53,0 @@ }); |
import { _ as _taggedTemplateLiteral } from '../../dist/taggedTemplateLiteral-2d2668f5.browser.esm.js'; | ||
import fileURLToPath from 'file-uri-to-path'; | ||
import fileURIToPath from 'file-uri-to-path'; | ||
import outdent from 'outdent'; | ||
import { getProjectRoot, onEndFileScope } from '../../adapter/dist/vanilla-extract-css-adapter.browser.esm.js'; | ||
var relativePath = (from, to) => { | ||
var fromDirs = from.split('/'); | ||
var toDirs = to.split('/'); | ||
var firstDifferentDirIndex = toDirs.findIndex((toDir, index) => fromDirs[index] !== toDir); | ||
var fromDepth = fromDirs.length; | ||
var parentDirs = Array.from({ | ||
length: fromDepth - firstDifferentDirIndex | ||
}, () => '..'); | ||
return [...parentDirs, ...toDirs.slice(firstDifferentDirIndex)].join('/'); | ||
}; | ||
var _templateObject; | ||
@@ -13,4 +24,4 @@ var refCounter = 0; | ||
try { | ||
filePath = fileURLToPath(fileScopePath); | ||
} catch (e) {// If fileURLToPath failed then fileScope is already a valid path | ||
filePath = fileURIToPath(fileScopePath); | ||
} catch (e) {// If fileURIToPath failed then fileScope is already a valid path | ||
} | ||
@@ -20,4 +31,4 @@ | ||
if (projectRoot && filePath.startsWith(projectRoot)) { | ||
filePath = filePath.slice(projectRoot.length); | ||
if (projectRoot) { | ||
filePath = relativePath(projectRoot, filePath); | ||
} | ||
@@ -27,3 +38,4 @@ | ||
fileScopes.unshift({ | ||
filePath, | ||
// Remove extra extensions | ||
filePath: filePath.replace(/\.[^.]*$/, ''), | ||
packageName | ||
@@ -30,0 +42,0 @@ }); |
@@ -6,3 +6,3 @@ 'use strict'; | ||
var taggedTemplateLiteral = require('../../dist/taggedTemplateLiteral-975613a0.cjs.dev.js'); | ||
var fileURLToPath = require('file-uri-to-path'); | ||
var fileURIToPath = require('file-uri-to-path'); | ||
var outdent = require('outdent'); | ||
@@ -13,5 +13,16 @@ var adapter_dist_vanillaExtractCssAdapter = require('../../adapter/dist/vanilla-extract-css-adapter.cjs.dev.js'); | ||
var fileURLToPath__default = /*#__PURE__*/_interopDefault(fileURLToPath); | ||
var fileURIToPath__default = /*#__PURE__*/_interopDefault(fileURIToPath); | ||
var outdent__default = /*#__PURE__*/_interopDefault(outdent); | ||
var relativePath = (from, to) => { | ||
var fromDirs = from.split('/'); | ||
var toDirs = to.split('/'); | ||
var firstDifferentDirIndex = toDirs.findIndex((toDir, index) => fromDirs[index] !== toDir); | ||
var fromDepth = fromDirs.length; | ||
var parentDirs = Array.from({ | ||
length: fromDepth - firstDifferentDirIndex | ||
}, () => '..'); | ||
return [...parentDirs, ...toDirs.slice(firstDifferentDirIndex)].join('/'); | ||
}; | ||
var _templateObject; | ||
@@ -24,4 +35,4 @@ var refCounter = 0; | ||
try { | ||
filePath = fileURLToPath__default["default"](fileScopePath); | ||
} catch (e) {// If fileURLToPath failed then fileScope is already a valid path | ||
filePath = fileURIToPath__default["default"](fileScopePath); | ||
} catch (e) {// If fileURIToPath failed then fileScope is already a valid path | ||
} | ||
@@ -31,4 +42,4 @@ | ||
if (projectRoot && filePath.startsWith(projectRoot)) { | ||
filePath = filePath.slice(projectRoot.length); | ||
if (projectRoot) { | ||
filePath = relativePath(projectRoot, filePath); | ||
} | ||
@@ -38,3 +49,4 @@ | ||
fileScopes.unshift({ | ||
filePath, | ||
// Remove extra extensions | ||
filePath: filePath.replace(/\.[^.]*$/, ''), | ||
packageName | ||
@@ -41,0 +53,0 @@ }); |
@@ -6,3 +6,3 @@ 'use strict'; | ||
var taggedTemplateLiteral = require('../../dist/taggedTemplateLiteral-bd61be83.cjs.prod.js'); | ||
var fileURLToPath = require('file-uri-to-path'); | ||
var fileURIToPath = require('file-uri-to-path'); | ||
var outdent = require('outdent'); | ||
@@ -13,5 +13,16 @@ var adapter_dist_vanillaExtractCssAdapter = require('../../adapter/dist/vanilla-extract-css-adapter.cjs.prod.js'); | ||
var fileURLToPath__default = /*#__PURE__*/_interopDefault(fileURLToPath); | ||
var fileURIToPath__default = /*#__PURE__*/_interopDefault(fileURIToPath); | ||
var outdent__default = /*#__PURE__*/_interopDefault(outdent); | ||
var relativePath = (from, to) => { | ||
var fromDirs = from.split('/'); | ||
var toDirs = to.split('/'); | ||
var firstDifferentDirIndex = toDirs.findIndex((toDir, index) => fromDirs[index] !== toDir); | ||
var fromDepth = fromDirs.length; | ||
var parentDirs = Array.from({ | ||
length: fromDepth - firstDifferentDirIndex | ||
}, () => '..'); | ||
return [...parentDirs, ...toDirs.slice(firstDifferentDirIndex)].join('/'); | ||
}; | ||
var _templateObject; | ||
@@ -24,4 +35,4 @@ var refCounter = 0; | ||
try { | ||
filePath = fileURLToPath__default["default"](fileScopePath); | ||
} catch (e) {// If fileURLToPath failed then fileScope is already a valid path | ||
filePath = fileURIToPath__default["default"](fileScopePath); | ||
} catch (e) {// If fileURIToPath failed then fileScope is already a valid path | ||
} | ||
@@ -31,4 +42,4 @@ | ||
if (projectRoot && filePath.startsWith(projectRoot)) { | ||
filePath = filePath.slice(projectRoot.length); | ||
if (projectRoot) { | ||
filePath = relativePath(projectRoot, filePath); | ||
} | ||
@@ -38,3 +49,4 @@ | ||
fileScopes.unshift({ | ||
filePath, | ||
// Remove extra extensions | ||
filePath: filePath.replace(/\.[^.]*$/, ''), | ||
packageName | ||
@@ -41,0 +53,0 @@ }); |
import { _ as _taggedTemplateLiteral } from '../../dist/taggedTemplateLiteral-b4c22b04.esm.js'; | ||
import fileURLToPath from 'file-uri-to-path'; | ||
import fileURIToPath from 'file-uri-to-path'; | ||
import outdent from 'outdent'; | ||
import { getProjectRoot, onEndFileScope } from '../../adapter/dist/vanilla-extract-css-adapter.esm.js'; | ||
var relativePath = (from, to) => { | ||
var fromDirs = from.split('/'); | ||
var toDirs = to.split('/'); | ||
var firstDifferentDirIndex = toDirs.findIndex((toDir, index) => fromDirs[index] !== toDir); | ||
var fromDepth = fromDirs.length; | ||
var parentDirs = Array.from({ | ||
length: fromDepth - firstDifferentDirIndex | ||
}, () => '..'); | ||
return [...parentDirs, ...toDirs.slice(firstDifferentDirIndex)].join('/'); | ||
}; | ||
var _templateObject; | ||
@@ -13,4 +24,4 @@ var refCounter = 0; | ||
try { | ||
filePath = fileURLToPath(fileScopePath); | ||
} catch (e) {// If fileURLToPath failed then fileScope is already a valid path | ||
filePath = fileURIToPath(fileScopePath); | ||
} catch (e) {// If fileURIToPath failed then fileScope is already a valid path | ||
} | ||
@@ -20,4 +31,4 @@ | ||
if (projectRoot && filePath.startsWith(projectRoot)) { | ||
filePath = filePath.slice(projectRoot.length); | ||
if (projectRoot) { | ||
filePath = relativePath(projectRoot, filePath); | ||
} | ||
@@ -27,3 +38,4 @@ | ||
fileScopes.unshift({ | ||
filePath, | ||
// Remove extra extensions | ||
filePath: filePath.replace(/\.[^.]*$/, ''), | ||
packageName | ||
@@ -30,0 +42,0 @@ }); |
{ | ||
"name": "@vanilla-extract/css", | ||
"version": "0.0.0-filescope-urls-2022810112138", | ||
"version": "0.0.0-filescope-urls-202281122225", | ||
"description": "Zero-runtime Stylesheets-in-TypeScript", | ||
@@ -5,0 +5,0 @@ "sideEffects": true, |
307521
98
7443