css-typed-vars 0.4.16 → 0.4.17

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.
@@ -4,7 +4,7 @@ import {
4
4
  generateJs,
5
5
  scanVarNames,
6
6
  warnOnCollisions
7
- } from "./chunk-NS2BULH3.js";
7
+ } from "./chunk-WYLYZXQJ.js";
8
8
 
9
9
  // src/unplugin.ts
10
10
  import { createUnplugin } from "unplugin";
@@ -4,7 +4,7 @@ import {
4
4
  generateJs,
5
5
  scanVarNames,
6
6
  warnOnCollisions
7
- } from "./chunk-NS2BULH3.js";
7
+ } from "./chunk-WYLYZXQJ.js";
8
8
 
9
9
  // src/index.ts
10
10
  import { writeFile, mkdir } from "fs/promises";
@@ -66,8 +66,9 @@ function extractBlock(text, start) {
66
66
  for (; i < text.length && depth > 0; i++) {
67
67
  const char = text[i];
68
68
  if (quote) {
69
- if (char === "\\") i++;
70
- else if (char === quote) quote = null;
69
+ const step = stepQuote(text, i, quote);
70
+ if (step.closed) quote = null;
71
+ i += step.consumed - 1;
71
72
  } else if (char === '"' || char === "'") {
72
73
  quote = char;
73
74
  } else if (char === "{") {
package/dist/cli.cjs CHANGED
@@ -102,8 +102,9 @@ function extractBlock(text, start) {
102
102
  for (; i < text.length && depth > 0; i++) {
103
103
  const char = text[i];
104
104
  if (quote) {
105
- if (char === "\\") i++;
106
- else if (char === quote) quote = null;
105
+ const step = stepQuote(text, i, quote);
106
+ if (step.closed) quote = null;
107
+ i += step.consumed - 1;
107
108
  } else if (char === '"' || char === "'") {
108
109
  quote = char;
109
110
  } else if (char === "{") {
package/dist/cli.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  generate
4
- } from "./chunk-ARQR224L.js";
4
+ } from "./chunk-EHRNYU34.js";
5
5
  import {
6
6
  VALID_NAMINGS
7
- } from "./chunk-NS2BULH3.js";
7
+ } from "./chunk-WYLYZXQJ.js";
8
8
 
9
9
  // src/cli.ts
10
10
  import { readFile } from "fs/promises";
package/dist/esbuild.cjs CHANGED
@@ -104,8 +104,9 @@ function extractBlock(text, start) {
104
104
  for (; i < text.length && depth > 0; i++) {
105
105
  const char = text[i];
106
106
  if (quote) {
107
- if (char === "\\") i++;
108
- else if (char === quote) quote = null;
107
+ const step = stepQuote(text, i, quote);
108
+ if (step.closed) quote = null;
109
+ i += step.consumed - 1;
109
110
  } else if (char === '"' || char === "'") {
110
111
  quote = char;
111
112
  } else if (char === "{") {
package/dist/esbuild.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-YJPHNISO.js";
4
- import "./chunk-NS2BULH3.js";
3
+ } from "./chunk-DOOYTSTY.js";
4
+ import "./chunk-WYLYZXQJ.js";
5
5
 
6
6
  // src/esbuild.ts
7
7
  var esbuild_default = unplugin_default.esbuild;
package/dist/index.cjs CHANGED
@@ -106,8 +106,9 @@ function extractBlock(text, start) {
106
106
  for (; i < text.length && depth > 0; i++) {
107
107
  const char = text[i];
108
108
  if (quote) {
109
- if (char === "\\") i++;
110
- else if (char === quote) quote = null;
109
+ const step = stepQuote(text, i, quote);
110
+ if (step.closed) quote = null;
111
+ i += step.consumed - 1;
111
112
  } else if (char === '"' || char === "'") {
112
113
  quote = char;
113
114
  } else if (char === "{") {
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  generate
3
- } from "./chunk-ARQR224L.js";
3
+ } from "./chunk-EHRNYU34.js";
4
4
  import {
5
5
  generateCode,
6
6
  generateDeclaration,
7
7
  generateJs,
8
8
  parseVarNames,
9
9
  scanVarNames
10
- } from "./chunk-NS2BULH3.js";
10
+ } from "./chunk-WYLYZXQJ.js";
11
11
  export {
12
12
  generate,
13
13
  generateCode,
package/dist/rollup.cjs CHANGED
@@ -104,8 +104,9 @@ function extractBlock(text, start) {
104
104
  for (; i < text.length && depth > 0; i++) {
105
105
  const char = text[i];
106
106
  if (quote) {
107
- if (char === "\\") i++;
108
- else if (char === quote) quote = null;
107
+ const step = stepQuote(text, i, quote);
108
+ if (step.closed) quote = null;
109
+ i += step.consumed - 1;
109
110
  } else if (char === '"' || char === "'") {
110
111
  quote = char;
111
112
  } else if (char === "{") {
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-YJPHNISO.js";
4
- import "./chunk-NS2BULH3.js";
3
+ } from "./chunk-DOOYTSTY.js";
4
+ import "./chunk-WYLYZXQJ.js";
5
5
 
6
6
  // src/rollup.ts
7
7
  var rollup_default = unplugin_default.rollup;
package/dist/unplugin.cjs CHANGED
@@ -102,8 +102,9 @@ function extractBlock(text, start) {
102
102
  for (; i < text.length && depth > 0; i++) {
103
103
  const char = text[i];
104
104
  if (quote) {
105
- if (char === "\\") i++;
106
- else if (char === quote) quote = null;
105
+ const step = stepQuote(text, i, quote);
106
+ if (step.closed) quote = null;
107
+ i += step.consumed - 1;
107
108
  } else if (char === '"' || char === "'") {
108
109
  quote = char;
109
110
  } else if (char === "{") {
package/dist/unplugin.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-YJPHNISO.js";
4
- import "./chunk-NS2BULH3.js";
3
+ } from "./chunk-DOOYTSTY.js";
4
+ import "./chunk-WYLYZXQJ.js";
5
5
  export {
6
6
  unplugin_default as default
7
7
  };
package/dist/vite.cjs CHANGED
@@ -104,8 +104,9 @@ function extractBlock(text, start) {
104
104
  for (; i < text.length && depth > 0; i++) {
105
105
  const char = text[i];
106
106
  if (quote) {
107
- if (char === "\\") i++;
108
- else if (char === quote) quote = null;
107
+ const step = stepQuote(text, i, quote);
108
+ if (step.closed) quote = null;
109
+ i += step.consumed - 1;
109
110
  } else if (char === '"' || char === "'") {
110
111
  quote = char;
111
112
  } else if (char === "{") {
package/dist/vite.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-YJPHNISO.js";
4
- import "./chunk-NS2BULH3.js";
3
+ } from "./chunk-DOOYTSTY.js";
4
+ import "./chunk-WYLYZXQJ.js";
5
5
 
6
6
  // src/vite.ts
7
7
  var vite_default = unplugin_default.vite;
package/dist/webpack.cjs CHANGED
@@ -104,8 +104,9 @@ function extractBlock(text, start) {
104
104
  for (; i < text.length && depth > 0; i++) {
105
105
  const char = text[i];
106
106
  if (quote) {
107
- if (char === "\\") i++;
108
- else if (char === quote) quote = null;
107
+ const step = stepQuote(text, i, quote);
108
+ if (step.closed) quote = null;
109
+ i += step.consumed - 1;
109
110
  } else if (char === '"' || char === "'") {
110
111
  quote = char;
111
112
  } else if (char === "{") {
package/dist/webpack.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-YJPHNISO.js";
4
- import "./chunk-NS2BULH3.js";
3
+ } from "./chunk-DOOYTSTY.js";
4
+ import "./chunk-WYLYZXQJ.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.16",
3
+ "version": "0.4.17",
4
4
  "description": "Generate TypeScript typed constants from CSS custom properties",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",