@pandacss/token-dictionary 0.0.0-dev-20230127124319 → 0.0.0-dev-20230128072108
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/index.js +1 -9
- package/dist/index.mjs +1 -9
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -540,9 +540,7 @@ var middlewares = [addNegativeTokens, addVirtualPalette, removeEmptyTokens];
|
|
|
540
540
|
|
|
541
541
|
// src/transform.ts
|
|
542
542
|
var import_shared6 = require("@pandacss/shared");
|
|
543
|
-
var import_fs = require("fs");
|
|
544
543
|
var import_mini_svg_data_uri = __toESM(require("mini-svg-data-uri"));
|
|
545
|
-
var import_path = require("path");
|
|
546
544
|
var import_ts_pattern2 = require("ts-pattern");
|
|
547
545
|
var isCompositeShadow = (0, import_ts_pattern2.isMatching)({
|
|
548
546
|
inset: import_ts_pattern2.P.optional(import_ts_pattern2.P.boolean),
|
|
@@ -626,18 +624,12 @@ var transformBorders = {
|
|
|
626
624
|
return `${width}px ${style} ${color}`;
|
|
627
625
|
}
|
|
628
626
|
};
|
|
629
|
-
var isPathLike = (value) => (0, import_path.extname)(value) !== "";
|
|
630
627
|
var transformAssets = {
|
|
631
628
|
name: "tokens/assets",
|
|
632
629
|
match: (token) => token.extensions.category === "assets",
|
|
633
630
|
transform(token) {
|
|
634
631
|
const raw = token.value;
|
|
635
|
-
return (0, import_ts_pattern2.match)(raw).with(import_ts_pattern2.P.string, (value) => value).with({ type: "url" }, ({ value }) => `url(${value})`).with({ type: "svg"
|
|
636
|
-
const fileContent = (0, import_fs.readFileSync)(value, "utf8");
|
|
637
|
-
return `url(${(0, import_mini_svg_data_uri.default)(fileContent)}`;
|
|
638
|
-
}).with({ type: "svg", value: import_ts_pattern2.P.string }, ({ value }) => {
|
|
639
|
-
return `url(${(0, import_mini_svg_data_uri.default)(value)})`;
|
|
640
|
-
}).exhaustive();
|
|
632
|
+
return (0, import_ts_pattern2.match)(raw).with(import_ts_pattern2.P.string, (value) => value).with({ type: "url" }, ({ value }) => `url(${value})`).with({ type: "svg" }, ({ value }) => `url(${(0, import_mini_svg_data_uri.default)(value)})`).exhaustive();
|
|
641
633
|
}
|
|
642
634
|
};
|
|
643
635
|
var addCssVariables = {
|
package/dist/index.mjs
CHANGED
|
@@ -508,9 +508,7 @@ var middlewares = [addNegativeTokens, addVirtualPalette, removeEmptyTokens];
|
|
|
508
508
|
|
|
509
509
|
// src/transform.ts
|
|
510
510
|
import { cssVar as cssVar2, isString as isString2 } from "@pandacss/shared";
|
|
511
|
-
import { readFileSync } from "fs";
|
|
512
511
|
import svgToDataUri from "mini-svg-data-uri";
|
|
513
|
-
import { extname } from "path";
|
|
514
512
|
import { isMatching as isMatching2, match as match2, P } from "ts-pattern";
|
|
515
513
|
var isCompositeShadow = isMatching2({
|
|
516
514
|
inset: P.optional(P.boolean),
|
|
@@ -594,18 +592,12 @@ var transformBorders = {
|
|
|
594
592
|
return `${width}px ${style} ${color}`;
|
|
595
593
|
}
|
|
596
594
|
};
|
|
597
|
-
var isPathLike = (value) => extname(value) !== "";
|
|
598
595
|
var transformAssets = {
|
|
599
596
|
name: "tokens/assets",
|
|
600
597
|
match: (token) => token.extensions.category === "assets",
|
|
601
598
|
transform(token) {
|
|
602
599
|
const raw = token.value;
|
|
603
|
-
return match2(raw).with(P.string, (value) => value).with({ type: "url" }, ({ value }) => `url(${value})`).with({ type: "svg"
|
|
604
|
-
const fileContent = readFileSync(value, "utf8");
|
|
605
|
-
return `url(${svgToDataUri(fileContent)}`;
|
|
606
|
-
}).with({ type: "svg", value: P.string }, ({ value }) => {
|
|
607
|
-
return `url(${svgToDataUri(value)})`;
|
|
608
|
-
}).exhaustive();
|
|
600
|
+
return match2(raw).with(P.string, (value) => value).with({ type: "url" }, ({ value }) => `url(${value})`).with({ type: "svg" }, ({ value }) => `url(${svgToDataUri(value)})`).exhaustive();
|
|
609
601
|
}
|
|
610
602
|
};
|
|
611
603
|
var addCssVariables = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/token-dictionary",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20230128072108",
|
|
4
4
|
"description": "Common error messages for css panda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"mini-svg-data-uri": "^1.4.4",
|
|
18
18
|
"ts-pattern": "4.1.3",
|
|
19
|
-
"@pandacss/types": "0.0.0-dev-
|
|
20
|
-
"@pandacss/shared": "0.0.0-dev-
|
|
19
|
+
"@pandacss/types": "0.0.0-dev-20230128072108",
|
|
20
|
+
"@pandacss/shared": "0.0.0-dev-20230128072108"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@pandacss/fixture": "0.0.0-dev-
|
|
23
|
+
"@pandacss/fixture": "0.0.0-dev-20230128072108"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "tsup src/index.ts --format=esm,cjs --dts",
|