css-typed-vars 0.4.9 → 0.4.10

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.
@@ -3,7 +3,7 @@ import {
3
3
  generateDeclaration,
4
4
  generateJs,
5
5
  scanVarNames
6
- } from "./chunk-Y3WJXRDA.js";
6
+ } from "./chunk-YVFKCMBF.js";
7
7
 
8
8
  // src/unplugin.ts
9
9
  import { createUnplugin } from "unplugin";
@@ -4,7 +4,7 @@ import {
4
4
  generateDeclaration,
5
5
  generateJs,
6
6
  scanVarNames
7
- } from "./chunk-Y3WJXRDA.js";
7
+ } from "./chunk-YVFKCMBF.js";
8
8
 
9
9
  // src/index.ts
10
10
  import { writeFile, mkdir } from "fs/promises";
@@ -7,7 +7,7 @@ var __dirname = /* @__PURE__ */ getDirname();
7
7
 
8
8
  // src/parser.ts
9
9
  function parseVarNames(css, selectors) {
10
- const stripped = css.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/.*$/gm, "");
10
+ const stripped = css.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(?<!:)\/\/.*$/gm, "");
11
11
  const names = /* @__PURE__ */ new Set();
12
12
  const allSelectors = [":root", ...selectors ?? []];
13
13
  for (const sel of allSelectors) {
package/dist/cli.cjs CHANGED
@@ -43,7 +43,7 @@ var import_fast_glob = __toESM(require("fast-glob"), 1);
43
43
 
44
44
  // src/parser.ts
45
45
  function parseVarNames(css, selectors) {
46
- const stripped = css.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/.*$/gm, "");
46
+ const stripped = css.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(?<!:)\/\/.*$/gm, "");
47
47
  const names = /* @__PURE__ */ new Set();
48
48
  const allSelectors = [":root", ...selectors ?? []];
49
49
  for (const sel of allSelectors) {
package/dist/cli.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  generate
4
- } from "./chunk-MQAIY4QW.js";
5
- import "./chunk-Y3WJXRDA.js";
4
+ } from "./chunk-K5FAEWQE.js";
5
+ import "./chunk-YVFKCMBF.js";
6
6
 
7
7
  // src/cli.ts
8
8
  import { readFile } from "fs/promises";
package/dist/esbuild.cjs CHANGED
@@ -45,7 +45,7 @@ var import_fast_glob = __toESM(require("fast-glob"), 1);
45
45
 
46
46
  // src/parser.ts
47
47
  function parseVarNames(css, selectors) {
48
- const stripped = css.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/.*$/gm, "");
48
+ const stripped = css.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(?<!:)\/\/.*$/gm, "");
49
49
  const names = /* @__PURE__ */ new Set();
50
50
  const allSelectors = [":root", ...selectors ?? []];
51
51
  for (const sel of allSelectors) {
package/dist/esbuild.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-7QP7R3IQ.js";
4
- import "./chunk-Y3WJXRDA.js";
3
+ } from "./chunk-3YUKUAJQ.js";
4
+ import "./chunk-YVFKCMBF.js";
5
5
 
6
6
  // src/esbuild.ts
7
7
  var esbuild_default = unplugin_default.esbuild;
package/dist/index.cjs CHANGED
@@ -47,7 +47,7 @@ var import_fast_glob = __toESM(require("fast-glob"), 1);
47
47
 
48
48
  // src/parser.ts
49
49
  function parseVarNames(css, selectors) {
50
- const stripped = css.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/.*$/gm, "");
50
+ const stripped = css.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(?<!:)\/\/.*$/gm, "");
51
51
  const names = /* @__PURE__ */ new Set();
52
52
  const allSelectors = [":root", ...selectors ?? []];
53
53
  for (const sel of allSelectors) {
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  generate
3
- } from "./chunk-MQAIY4QW.js";
3
+ } from "./chunk-K5FAEWQE.js";
4
4
  import {
5
5
  generateCode,
6
6
  generateDeclaration,
7
7
  generateJs,
8
8
  parseVarNames,
9
9
  scanVarNames
10
- } from "./chunk-Y3WJXRDA.js";
10
+ } from "./chunk-YVFKCMBF.js";
11
11
  export {
12
12
  generate,
13
13
  generateCode,
package/dist/rollup.cjs CHANGED
@@ -45,7 +45,7 @@ var import_fast_glob = __toESM(require("fast-glob"), 1);
45
45
 
46
46
  // src/parser.ts
47
47
  function parseVarNames(css, selectors) {
48
- const stripped = css.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/.*$/gm, "");
48
+ const stripped = css.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(?<!:)\/\/.*$/gm, "");
49
49
  const names = /* @__PURE__ */ new Set();
50
50
  const allSelectors = [":root", ...selectors ?? []];
51
51
  for (const sel of allSelectors) {
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-7QP7R3IQ.js";
4
- import "./chunk-Y3WJXRDA.js";
3
+ } from "./chunk-3YUKUAJQ.js";
4
+ import "./chunk-YVFKCMBF.js";
5
5
 
6
6
  // src/rollup.ts
7
7
  var rollup_default = unplugin_default.rollup;
package/dist/unplugin.cjs CHANGED
@@ -43,7 +43,7 @@ var import_fast_glob = __toESM(require("fast-glob"), 1);
43
43
 
44
44
  // src/parser.ts
45
45
  function parseVarNames(css, selectors) {
46
- const stripped = css.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/.*$/gm, "");
46
+ const stripped = css.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(?<!:)\/\/.*$/gm, "");
47
47
  const names = /* @__PURE__ */ new Set();
48
48
  const allSelectors = [":root", ...selectors ?? []];
49
49
  for (const sel of allSelectors) {
package/dist/unplugin.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-7QP7R3IQ.js";
4
- import "./chunk-Y3WJXRDA.js";
3
+ } from "./chunk-3YUKUAJQ.js";
4
+ import "./chunk-YVFKCMBF.js";
5
5
  export {
6
6
  unplugin_default as default
7
7
  };
package/dist/vite.cjs CHANGED
@@ -45,7 +45,7 @@ var import_fast_glob = __toESM(require("fast-glob"), 1);
45
45
 
46
46
  // src/parser.ts
47
47
  function parseVarNames(css, selectors) {
48
- const stripped = css.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/.*$/gm, "");
48
+ const stripped = css.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(?<!:)\/\/.*$/gm, "");
49
49
  const names = /* @__PURE__ */ new Set();
50
50
  const allSelectors = [":root", ...selectors ?? []];
51
51
  for (const sel of allSelectors) {
package/dist/vite.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-7QP7R3IQ.js";
4
- import "./chunk-Y3WJXRDA.js";
3
+ } from "./chunk-3YUKUAJQ.js";
4
+ import "./chunk-YVFKCMBF.js";
5
5
 
6
6
  // src/vite.ts
7
7
  var vite_default = unplugin_default.vite;
package/dist/webpack.cjs CHANGED
@@ -45,7 +45,7 @@ var import_fast_glob = __toESM(require("fast-glob"), 1);
45
45
 
46
46
  // src/parser.ts
47
47
  function parseVarNames(css, selectors) {
48
- const stripped = css.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/.*$/gm, "");
48
+ const stripped = css.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(?<!:)\/\/.*$/gm, "");
49
49
  const names = /* @__PURE__ */ new Set();
50
50
  const allSelectors = [":root", ...selectors ?? []];
51
51
  for (const sel of allSelectors) {
package/dist/webpack.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-7QP7R3IQ.js";
4
- import "./chunk-Y3WJXRDA.js";
3
+ } from "./chunk-3YUKUAJQ.js";
4
+ import "./chunk-YVFKCMBF.js";
5
5
 
6
6
  // src/webpack.ts
7
7
  var webpack_default = unplugin_default.webpack;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "css-typed-vars",
3
- "version": "0.4.9",
3
+ "version": "0.4.10",
4
4
  "description": "Generate TypeScript typed constants from CSS custom properties",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",