@unocss/svelte-scoped 0.55.2 → 0.55.4

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.
@@ -1,6 +1,6 @@
1
1
  import { PreprocessorGroup } from 'svelte/types/compiler/preprocess';
2
- import { U as UnocssSveltePreprocessOptions, S as SvelteScopedContext } from './shared/svelte-scoped.a2ff5ce3.cjs';
3
- export { a as TransformApplyOptions, T as TransformClassesOptions } from './shared/svelte-scoped.a2ff5ce3.cjs';
2
+ import { U as UnocssSveltePreprocessOptions, S as SvelteScopedContext } from './shared/svelte-scoped.08b60c2b.cjs';
3
+ export { a as TransformApplyOptions, T as TransformClassesOptions } from './shared/svelte-scoped.08b60c2b.cjs';
4
4
  import '@unocss/core';
5
5
 
6
6
  declare function UnocssSveltePreprocess(options?: UnocssSveltePreprocessOptions, unoContextFromVite?: SvelteScopedContext, isViteBuild?: () => boolean): PreprocessorGroup;
@@ -1,6 +1,6 @@
1
1
  import { PreprocessorGroup } from 'svelte/types/compiler/preprocess';
2
- import { U as UnocssSveltePreprocessOptions, S as SvelteScopedContext } from './shared/svelte-scoped.a2ff5ce3.mjs';
3
- export { a as TransformApplyOptions, T as TransformClassesOptions } from './shared/svelte-scoped.a2ff5ce3.mjs';
2
+ import { U as UnocssSveltePreprocessOptions, S as SvelteScopedContext } from './shared/svelte-scoped.08b60c2b.mjs';
3
+ export { a as TransformApplyOptions, T as TransformClassesOptions } from './shared/svelte-scoped.08b60c2b.mjs';
4
4
  import '@unocss/core';
5
5
 
6
6
  declare function UnocssSveltePreprocess(options?: UnocssSveltePreprocessOptions, unoContextFromVite?: SvelteScopedContext, isViteBuild?: () => boolean): PreprocessorGroup;
@@ -1,6 +1,6 @@
1
1
  import { PreprocessorGroup } from 'svelte/types/compiler/preprocess';
2
- import { U as UnocssSveltePreprocessOptions, S as SvelteScopedContext } from './shared/svelte-scoped.a2ff5ce3.js';
3
- export { a as TransformApplyOptions, T as TransformClassesOptions } from './shared/svelte-scoped.a2ff5ce3.js';
2
+ import { U as UnocssSveltePreprocessOptions, S as SvelteScopedContext } from './shared/svelte-scoped.08b60c2b.js';
3
+ export { a as TransformApplyOptions, T as TransformClassesOptions } from './shared/svelte-scoped.08b60c2b.js';
4
4
  import '@unocss/core';
5
5
 
6
6
  declare function UnocssSveltePreprocess(options?: UnocssSveltePreprocessOptions, unoContextFromVite?: SvelteScopedContext, isViteBuild?: () => boolean): PreprocessorGroup;
@@ -41,4 +41,4 @@ interface SvelteScopedContext {
41
41
  ready: Promise<UserConfig<{}>>
42
42
  }
43
43
 
44
- export { SvelteScopedContext as S, TransformClassesOptions as T, UnocssSveltePreprocessOptions as U, TransformApplyOptions as a };
44
+ export type { SvelteScopedContext as S, TransformClassesOptions as T, UnocssSveltePreprocessOptions as U, TransformApplyOptions as a };
@@ -41,4 +41,4 @@ interface SvelteScopedContext {
41
41
  ready: Promise<UserConfig<{}>>
42
42
  }
43
43
 
44
- export { SvelteScopedContext as S, TransformClassesOptions as T, UnocssSveltePreprocessOptions as U, TransformApplyOptions as a };
44
+ export type { SvelteScopedContext as S, TransformClassesOptions as T, UnocssSveltePreprocessOptions as U, TransformApplyOptions as a };
@@ -41,4 +41,4 @@ interface SvelteScopedContext {
41
41
  ready: Promise<UserConfig<{}>>
42
42
  }
43
43
 
44
- export { SvelteScopedContext as S, TransformClassesOptions as T, UnocssSveltePreprocessOptions as U, TransformApplyOptions as a };
44
+ export type { SvelteScopedContext as S, TransformClassesOptions as T, UnocssSveltePreprocessOptions as U, TransformApplyOptions as a };
package/dist/vite.cjs CHANGED
@@ -92,7 +92,7 @@ function checkTransformPageChunkHook(server, isSvelteKit) {
92
92
  server.middlewares.use((req, res, next) => {
93
93
  const originalWrite = res.write;
94
94
  res.write = function(chunk, ...rest) {
95
- const str = chunk instanceof Buffer ? chunk.toString() : Array.isArray(chunk) || "at" in chunk ? Buffer.from(chunk).toString() : `${chunk}`;
95
+ const str = typeof chunk === "string" ? chunk : chunk instanceof Buffer ? chunk.toString() : Array.isArray(chunk) || "at" in chunk ? Buffer.from(chunk).toString() : `${chunk}`;
96
96
  if (str.includes("<head>") && !str.includes(DEV_GLOBAL_STYLES_DATA_TITLE))
97
97
  server.config.logger.error(isSvelteKit ? SVELTE_KIT_ERROR : SVELTE_ERROR, { timestamp: true });
98
98
  return originalWrite.call(this, chunk, ...rest);
package/dist/vite.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Plugin } from 'vite';
2
2
  import { PluginOptions } from '@unocss/core';
3
- import { U as UnocssSveltePreprocessOptions } from './shared/svelte-scoped.a2ff5ce3.cjs';
3
+ import { U as UnocssSveltePreprocessOptions } from './shared/svelte-scoped.08b60c2b.cjs';
4
4
 
5
5
  interface UnocssSvelteScopedViteOptions extends UnocssSveltePreprocessOptions {
6
6
  /**
package/dist/vite.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Plugin } from 'vite';
2
2
  import { PluginOptions } from '@unocss/core';
3
- import { U as UnocssSveltePreprocessOptions } from './shared/svelte-scoped.a2ff5ce3.mjs';
3
+ import { U as UnocssSveltePreprocessOptions } from './shared/svelte-scoped.08b60c2b.mjs';
4
4
 
5
5
  interface UnocssSvelteScopedViteOptions extends UnocssSveltePreprocessOptions {
6
6
  /**
package/dist/vite.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Plugin } from 'vite';
2
2
  import { PluginOptions } from '@unocss/core';
3
- import { U as UnocssSveltePreprocessOptions } from './shared/svelte-scoped.a2ff5ce3.js';
3
+ import { U as UnocssSveltePreprocessOptions } from './shared/svelte-scoped.08b60c2b.js';
4
4
 
5
5
  interface UnocssSvelteScopedViteOptions extends UnocssSveltePreprocessOptions {
6
6
  /**
package/dist/vite.mjs CHANGED
@@ -83,7 +83,7 @@ function checkTransformPageChunkHook(server, isSvelteKit) {
83
83
  server.middlewares.use((req, res, next) => {
84
84
  const originalWrite = res.write;
85
85
  res.write = function(chunk, ...rest) {
86
- const str = chunk instanceof Buffer ? chunk.toString() : Array.isArray(chunk) || "at" in chunk ? Buffer.from(chunk).toString() : `${chunk}`;
86
+ const str = typeof chunk === "string" ? chunk : chunk instanceof Buffer ? chunk.toString() : Array.isArray(chunk) || "at" in chunk ? Buffer.from(chunk).toString() : `${chunk}`;
87
87
  if (str.includes("<head>") && !str.includes(DEV_GLOBAL_STYLES_DATA_TITLE))
88
88
  server.config.logger.error(isSvelteKit ? SVELTE_KIT_ERROR : SVELTE_ERROR, { timestamp: true });
89
89
  return originalWrite.call(this, chunk, ...rest);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/svelte-scoped",
3
3
  "type": "module",
4
- "version": "0.55.2",
4
+ "version": "0.55.4",
5
5
  "description": "Use UnoCSS in a modular fashion with styles being stored only in the Svelte component they are used in: Vite plugin for apps, preprocessor for component libraries",
6
6
  "author": "Jacob Bowdoin",
7
7
  "license": "MIT",
@@ -53,9 +53,9 @@
53
53
  ],
54
54
  "dependencies": {
55
55
  "css-tree": "^2.3.1",
56
- "magic-string": "^0.30.2",
57
- "@unocss/config": "0.55.2",
58
- "@unocss/reset": "0.55.2"
56
+ "magic-string": "^0.30.3",
57
+ "@unocss/config": "0.55.4",
58
+ "@unocss/reset": "0.55.4"
59
59
  },
60
60
  "devDependencies": {
61
61
  "prettier-plugin-svelte": "^2.10.1",