@kuma-ui/vite
Advanced tools
Comparing version 0.1.1 to 0.2.0
@@ -1,5 +0,8 @@ | ||
import { Plugin } from "vite"; | ||
export type VitePluginOption = { | ||
import { Plugin } from 'vite'; | ||
type VitePluginOption = { | ||
breakpoints?: Record<string, string>; | ||
}; | ||
export default function kumaUI(options?: VitePluginOption): Plugin; | ||
declare function kumaUI(options?: VitePluginOption): Plugin; | ||
export { VitePluginOption, kumaUI as default }; |
@@ -66,4 +66,5 @@ "use strict"; | ||
cssLookup[cssId] = css; | ||
import_sheet.sheet.reset(); | ||
if (mode === "serve") | ||
return injectCSS(css) + result.code; | ||
return injectCSS(css, cssId) + result.code; | ||
return `import ${JSON.stringify(cssFilename)}; | ||
@@ -103,3 +104,3 @@ ` + result.code; | ||
}; | ||
var injectCSS = (cssContent) => { | ||
var injectCSS = (cssContent, fileId) => { | ||
return ` | ||
@@ -111,3 +112,3 @@ (function() { | ||
const css = ${JSON.stringify(cssContent)}; | ||
const kumaStyleId = 'kuma-ui-styles'; | ||
const kumaStyleId = 'kuma-ui-styles-' + ${JSON.stringify(fileId)}; | ||
let style = document.getElementById(kumaStyleId); | ||
@@ -122,10 +123,5 @@ const head = document.head || document.getElementsByTagName('head')[0]; | ||
} | ||
if (style.styleSheet) { | ||
style.styleSheet.cssText = css; | ||
} else { | ||
style.appendChild(document.createTextNode(css)); | ||
} | ||
style.textContent = css; | ||
})(); | ||
`; | ||
}; |
{ | ||
"name": "@kuma-ui/vite", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "🐻 Kuma UI is a utility-first, zero-runtime CSS-in-JS library that offers an outstanding developer experience and optimized performance.", | ||
@@ -29,4 +29,4 @@ "repository": { | ||
"dependencies": { | ||
"@kuma-ui/babel-plugin": "^0.0.4", | ||
"@kuma-ui/sheet": "^0.0.3" | ||
"@kuma-ui/sheet": "^0.1.0", | ||
"@kuma-ui/babel-plugin": "^0.1.1" | ||
}, | ||
@@ -40,5 +40,3 @@ "devDependencies": { | ||
"scripts": { | ||
"build": "yarn build:dist && yarn build:declarations", | ||
"build:declarations": "tsc --emitDeclarationOnly --outDir dist", | ||
"build:dist": "tsup src --format cjs,esm --config ../../rollup.config.js", | ||
"build": "tsup --config ../../tsup.config.ts", | ||
"typecheck": "tsc --noEmit --composite false", | ||
@@ -45,0 +43,0 @@ "lint": "eslint './src/**/*.{js,ts,jsx,tsx}'", |
Sorry, the diff of this file is not supported yet
10880
218
+ Added@kuma-ui/babel-plugin@0.1.2(transitive)
+ Added@kuma-ui/sheet@0.1.00.1.1(transitive)
+ Added@kuma-ui/system@0.2.1(transitive)
- Removed@kuma-ui/babel-plugin@0.0.4(transitive)
- Removed@kuma-ui/sheet@0.0.3(transitive)
- Removed@kuma-ui/system@0.1.1(transitive)
Updated@kuma-ui/babel-plugin@^0.1.1
Updated@kuma-ui/sheet@^0.1.0