@typestyles/vite 0.5.0 → 0.5.2

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @typestyles/vite
2
2
 
3
- Vite plugin for [typestyles](https://github.com/type-styles/typestyles): style HMR in development, optional zero-runtime CSS extraction in production.
3
+ Vite plugin for [typestyles](https://github.com/phthalo-dev/typestyles): style HMR in development, optional zero-runtime CSS extraction in production.
4
4
 
5
5
  TypeStyles works without a bundler plugin — styles inject at runtime on first use. This plugin is optional but recommended for Vite apps: it keeps component state while styles hot-reload, catches duplicate namespace collisions at build time, and can emit a static `typestyles.css` file so production ships without client-side `<style>` injection.
6
6
 
@@ -142,7 +142,7 @@ Even with a convention entry present, this keeps `<style>` injection in producti
142
142
 
143
143
  **Extraction:** On `vite build`, matching entry modules are bundled and executed in Node via `@typestyles/build-runner`. The collected CSS is emitted as a static asset. In dev, the same extraction runs on demand when the browser requests `/typestyles.css` so your `<link>` href works without SPA fallback returning HTML.
144
144
 
145
- **Duplicate detection:** The plugin scans every source file for namespace strings (`recipe('button', …)` → `.button-`). Collisions across files fail the build with a clear error.
145
+ **Duplicate detection:** The plugin scans every source file for namespace strings (`recipe({ name: 'button' })` → `.button-`). Collisions across files fail the build with a clear error.
146
146
 
147
147
  ## Verify production output
148
148
 
package/dist/index.d.cts CHANGED
@@ -6,7 +6,7 @@ export { DEFAULT_EXTRACT_MODULE_CANDIDATES, TypestylesExtractOptions, discoverDe
6
6
  * Regex patterns to extract namespace strings from typestyles API calls.
7
7
  *
8
8
  * Matches:
9
- * recipe('button', ...) → prefix ".button-"
9
+ * recipe({ name: 'button', ... }) → prefix ".button-"
10
10
  * style('card', ...) → prefix ".card-"
11
11
  * tokens.create('color', ...) → key "tokens:color"
12
12
  * tokens.createTheme({ name: 'dark', … }) → key "theme:dark"
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ export { DEFAULT_EXTRACT_MODULE_CANDIDATES, TypestylesExtractOptions, discoverDe
6
6
  * Regex patterns to extract namespace strings from typestyles API calls.
7
7
  *
8
8
  * Matches:
9
- * recipe('button', ...) → prefix ".button-"
9
+ * recipe({ name: 'button', ... }) → prefix ".button-"
10
10
  * style('card', ...) → prefix ".card-"
11
11
  * tokens.create('color', ...) → key "tokens:color"
12
12
  * tokens.createTheme({ name: 'dark', … }) → key "theme:dark"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typestyles/vite",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "Vite plugin for typestyles HMR support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -31,7 +31,7 @@
31
31
  "license": "Apache-2.0",
32
32
  "repository": {
33
33
  "type": "git",
34
- "url": "https://github.com/type-styles/typestyles",
34
+ "url": "https://github.com/phthalo-dev/typestyles",
35
35
  "directory": "packages/vite"
36
36
  },
37
37
  "peerDependencies": {
@@ -43,10 +43,10 @@
43
43
  "typescript": "^5.4.0",
44
44
  "vite": "^6.0.0",
45
45
  "vitest": "^3.0.0",
46
- "typestyles": "1.0.0"
46
+ "typestyles": "0.32.2"
47
47
  },
48
48
  "dependencies": {
49
- "@typestyles/build-runner": "0.6.0"
49
+ "@typestyles/build-runner": "0.6.2"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "tsup src/index.ts --format esm,cjs --dts --clean --external typestyles,@typestyles/build-runner",