@teacss/astro 0.8.1 → 0.8.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
@@ -5,10 +5,10 @@ generated stylesheet into Astro pages.
5
5
 
6
6
  ```ts
7
7
  import { defineConfig } from "astro/config";
8
- import { teacss } from "@teacss/astro";
8
+ import { pluginTeacss } from "@teacss/astro";
9
9
 
10
10
  export default defineConfig({
11
- integrations: [teacss()],
11
+ integrations: [pluginTeacss()],
12
12
  });
13
13
  ```
14
14
 
@@ -17,7 +17,7 @@ Set `injectEntry: false` to import `virtual:teacss.css` yourself. A string
17
17
  statement. Use `injectExtra` to append statements while keeping the default:
18
18
 
19
19
  ```ts
20
- teacss({
20
+ pluginTeacss({
21
21
  injectExtra: ['import "./src/styles.css";'],
22
22
  });
23
23
  ```
package/dist/index.d.ts CHANGED
@@ -19,5 +19,5 @@ export interface AstroIntegrationConfig<Theme extends object = object> extends T
19
19
  */
20
20
  injectExtra?: string[];
21
21
  }
22
- export declare function teacss<Theme extends object>(options?: AstroIntegrationConfig<Theme>, defaults?: UserConfigDefaults): AstroIntegration;
22
+ export declare function pluginTeacss<Theme extends object>(options?: AstroIntegrationConfig<Theme>, defaults?: UserConfigDefaults): AstroIntegration;
23
23
  //#endregion
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  import{join as e}from"node:path";import{pluginTeacss as t}from"@teacss/vite";import{normalizePath as n}from"vite";const r=`teacss-astro`;function i(t){let i=t.join(`
2
- `),a,o;return{name:`teacss:astro`,enforce:`pre`,configResolved(e){a=e.root;let t=e.plugins.find(e=>e.name===`teacss:api`)?.api;if(!t)throw Error(`[@teacss/astro] Unable to find TeaCSS Vite plugin API`);o=t.getContext()},async resolveId(t,i){if(t===r)return t;let{RESOLVED_ID_RE:s}=await o.getVMPRegexes();if(s.test(t))return this.resolve(n(e(a,t)),i,{skipSelf:!0})},load(e){if(e===r)return i}}}function a(e={},n={}){let{injectEntry:a=!0,injectExtra:o=[],...s}=e,c=Object.values(s).some(e=>e!==void 0)?s:void 0,l=[];return a&&l.push(typeof a==`string`?a:`import "virtual:teacss.css";`),l.push(...o),{name:`@teacss/astro`,hooks:{"astro:config:setup":({updateConfig:e,injectScript:a})=>{e({vite:{plugins:[...t(c,n),i(l)]}}),l.length&&a(`page-ssr`,`import ${JSON.stringify(r)}`)}}}}export{a as teacss};
2
+ `),a,o;return{name:`teacss:astro`,enforce:`pre`,configResolved(e){a=e.root;let t=e.plugins.find(e=>e.name===`teacss:api`)?.api;if(!t)throw Error(`[@teacss/astro] Unable to find TeaCSS Vite plugin API`);o=t.getContext()},async resolveId(t,i){if(t===r)return t;let{RESOLVED_ID_RE:s}=await o.getVMPRegexes();if(s.test(t))return this.resolve(n(e(a,t)),i,{skipSelf:!0})},load(e){if(e===r)return i}}}function a(e={},n={}){let{injectEntry:a=!0,injectExtra:o=[],...s}=e,c=Object.values(s).some(e=>e!==void 0)?s:void 0,l=[];return a&&l.push(typeof a==`string`?a:`import "virtual:teacss.css";`),l.push(...o),{name:`@teacss/astro`,hooks:{"astro:config:setup":({updateConfig:e,injectScript:a})=>{e({vite:{plugins:[...t(c,n),i(l)]}}),l.length&&a(`page-ssr`,`import ${JSON.stringify(r)}`)}}}}export{a as pluginTeacss};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teacss/astro",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Astro integration for TeaCSS — registers the Vite plugin and injects the generated stylesheet.",
5
5
  "homepage": "https://css.teasim.com",
6
6
  "funding": "https://github.com/sponsors/billgo",
@@ -22,8 +22,8 @@
22
22
  "dev": "tsdown --watch"
23
23
  },
24
24
  "dependencies": {
25
- "@teacss/core": "0.8.1",
26
- "@teacss/vite": "0.8.1"
25
+ "@teacss/core": "0.8.2",
26
+ "@teacss/vite": "0.8.2"
27
27
  },
28
28
  "devDependencies": {
29
29
  "astro": "^7.3.1",