@typestyles/astro 0.3.9 → 0.3.10

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/dist/index.cjs CHANGED
@@ -1,50 +1,35 @@
1
- "use strict";
1
+ //#region \0rolldown/runtime.js
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
8
  var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
15
+ }
16
+ return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // src/index.ts
31
- var index_exports = {};
32
- __export(index_exports, {
33
- default: () => typestyles
34
- });
35
- module.exports = __toCommonJS(index_exports);
36
- var import_vite = __toESM(require("@typestyles/vite"), 1);
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
19
+ value: mod,
20
+ enumerable: true
21
+ }) : target, mod));
22
+ //#endregion
23
+ let _typestyles_vite = require("@typestyles/vite");
24
+ _typestyles_vite = __toESM(_typestyles_vite, 1);
25
+ //#region src/index.ts
37
26
  function typestyles(options = {}) {
38
- return {
39
- name: "typestyles",
40
- hooks: {
41
- "astro:config:setup"({ updateConfig }) {
42
- updateConfig({
43
- vite: {
44
- plugins: [(0, import_vite.default)(options)]
45
- }
46
- });
47
- }
48
- }
49
- };
27
+ return {
28
+ name: "typestyles",
29
+ hooks: { "astro:config:setup"({ updateConfig }) {
30
+ updateConfig({ vite: { plugins: [(0, _typestyles_vite.default)(options)] } });
31
+ } }
32
+ };
50
33
  }
34
+ //#endregion
35
+ module.exports = typestyles;
package/dist/index.d.cts CHANGED
@@ -1,7 +1,6 @@
1
- import { AstroIntegration } from 'astro';
2
- import { TypestylesPluginOptions } from '@typestyles/vite';
3
- export { TypestylesPluginOptions } from '@typestyles/vite';
4
-
1
+ import { AstroIntegration } from "astro";
2
+ import { TypestylesPluginOptions, TypestylesPluginOptions as TypestylesPluginOptions$1 } from "@typestyles/vite";
3
+ //#region src/index.d.ts
5
4
  /**
6
5
  * Astro integration for typestyles.
7
6
  *
@@ -17,6 +16,6 @@ export { TypestylesPluginOptions } from '@typestyles/vite';
17
16
  * dynamically imports the same entry (e.g. `if (import.meta.env.DEV) void import('./typestyles-entry')`)
18
17
  * and avoid inlining `getRegisteredCss()` in dev, or updates will appear stuck until a full reload.
19
18
  */
20
- declare function typestyles(options?: TypestylesPluginOptions): AstroIntegration;
21
-
22
- export { typestyles as default };
19
+ export default function typestyles(options?: TypestylesPluginOptions$1): AstroIntegration;
20
+ //#endregion
21
+ export type { TypestylesPluginOptions };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { AstroIntegration } from 'astro';
2
- import { TypestylesPluginOptions } from '@typestyles/vite';
3
- export { TypestylesPluginOptions } from '@typestyles/vite';
4
-
1
+ import { TypestylesPluginOptions, TypestylesPluginOptions as TypestylesPluginOptions$1 } from "@typestyles/vite";
2
+ import { AstroIntegration } from "astro";
3
+ //#region src/index.d.ts
5
4
  /**
6
5
  * Astro integration for typestyles.
7
6
  *
@@ -17,6 +16,6 @@ export { TypestylesPluginOptions } from '@typestyles/vite';
17
16
  * dynamically imports the same entry (e.g. `if (import.meta.env.DEV) void import('./typestyles-entry')`)
18
17
  * and avoid inlining `getRegisteredCss()` in dev, or updates will appear stuck until a full reload.
19
18
  */
20
- declare function typestyles(options?: TypestylesPluginOptions): AstroIntegration;
21
-
22
- export { typestyles as default };
19
+ export default function typestyles(options?: TypestylesPluginOptions$1): AstroIntegration;
20
+ //#endregion
21
+ export type { TypestylesPluginOptions };
package/dist/index.js CHANGED
@@ -1,19 +1,12 @@
1
- // src/index.ts
2
1
  import typestylesVite from "@typestyles/vite";
2
+ //#region src/index.ts
3
3
  function typestyles(options = {}) {
4
- return {
5
- name: "typestyles",
6
- hooks: {
7
- "astro:config:setup"({ updateConfig }) {
8
- updateConfig({
9
- vite: {
10
- plugins: [typestylesVite(options)]
11
- }
12
- });
13
- }
14
- }
15
- };
4
+ return {
5
+ name: "typestyles",
6
+ hooks: { "astro:config:setup"({ updateConfig }) {
7
+ updateConfig({ vite: { plugins: [typestylesVite(options)] } });
8
+ } }
9
+ };
16
10
  }
17
- export {
18
- typestyles as default
19
- };
11
+ //#endregion
12
+ export { typestyles as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typestyles/astro",
3
- "version": "0.3.9",
3
+ "version": "0.3.10",
4
4
  "description": "Astro integration for typestyles (dev HMR, production CSS extraction)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -37,21 +37,18 @@
37
37
  "astro": ">=4.0.0"
38
38
  },
39
39
  "dependencies": {
40
- "@typestyles/vite": "0.5.2"
40
+ "@typestyles/vite": "0.5.3"
41
41
  },
42
42
  "devDependencies": {
43
43
  "astro": "^5.6.1",
44
- "eslint": "^9.39.2",
45
- "tsup": "^8.0.0",
46
- "typescript": "^5.4.0",
47
- "vite": "^6.0.0",
48
- "vitest": "^3.0.0",
49
- "typestyles": "0.32.2"
44
+ "typescript": "^6.0.0",
45
+ "vite": "npm:@voidzero-dev/vite-plus-core@1.3.0",
46
+ "vite-plus": "1.3.0",
47
+ "typestyles": "0.32.3"
50
48
  },
51
49
  "scripts": {
52
- "build": "tsup src/index.ts --format esm,cjs --dts --clean --external astro,@typestyles/vite",
53
- "test": "vitest run",
54
- "lint": "eslint .",
50
+ "build": "vp pack",
51
+ "test": "vp test run",
55
52
  "typecheck": "tsc --noEmit"
56
53
  }
57
54
  }