@unhead/addons 2.0.0-rc.1 → 2.0.0-rc.11

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.
@@ -0,0 +1,28 @@
1
+ interface TreeshakeServerComposablesOptions extends BaseTransformerTypes {
2
+ enabled?: boolean;
3
+ }
4
+
5
+ interface UseSeoMetaTransformOptions extends BaseTransformerTypes {
6
+ /**
7
+ * Whether to transform imports of `useSeoMeta` and `useServerSeoMeta` to `useHead` and `useServerHead`.
8
+ */
9
+ imports?: boolean;
10
+ /**
11
+ * Extra import paths to consider where `useSeoMeta()` may be imported from.
12
+ */
13
+ importPaths?: string[];
14
+ }
15
+
16
+ interface BaseTransformerTypes {
17
+ sourcemap?: boolean;
18
+ filter?: {
19
+ exclude?: RegExp[];
20
+ include?: RegExp[];
21
+ };
22
+ }
23
+ interface UnpluginOptions extends BaseTransformerTypes {
24
+ treeshake?: TreeshakeServerComposablesOptions;
25
+ transformSeoMeta?: UseSeoMetaTransformOptions;
26
+ }
27
+
28
+ export type { UnpluginOptions as U };
@@ -0,0 +1,28 @@
1
+ interface TreeshakeServerComposablesOptions extends BaseTransformerTypes {
2
+ enabled?: boolean;
3
+ }
4
+
5
+ interface UseSeoMetaTransformOptions extends BaseTransformerTypes {
6
+ /**
7
+ * Whether to transform imports of `useSeoMeta` and `useServerSeoMeta` to `useHead` and `useServerHead`.
8
+ */
9
+ imports?: boolean;
10
+ /**
11
+ * Extra import paths to consider where `useSeoMeta()` may be imported from.
12
+ */
13
+ importPaths?: string[];
14
+ }
15
+
16
+ interface BaseTransformerTypes {
17
+ sourcemap?: boolean;
18
+ filter?: {
19
+ exclude?: RegExp[];
20
+ include?: RegExp[];
21
+ };
22
+ }
23
+ interface UnpluginOptions extends BaseTransformerTypes {
24
+ treeshake?: TreeshakeServerComposablesOptions;
25
+ transformSeoMeta?: UseSeoMetaTransformOptions;
26
+ }
27
+
28
+ export type { UnpluginOptions as U };
package/dist/vite.d.mts CHANGED
@@ -1,7 +1,5 @@
1
1
  import { Plugin } from 'vite';
2
- import { U as UnpluginOptions } from './shared/addons.ChoDmUFv.mjs';
3
- import '@unhead/addons/src/unplugin/TreeshakeServerComposables';
4
- import '@unhead/addons/src/unplugin/UseSeoMetaTransform';
2
+ import { U as UnpluginOptions } from './shared/addons.51MZ0zeg.mjs';
5
3
 
6
4
  declare const _default: (options?: UnpluginOptions) => Plugin[];
7
5
 
package/dist/vite.d.ts CHANGED
@@ -1,7 +1,5 @@
1
1
  import { Plugin } from 'vite';
2
- import { U as UnpluginOptions } from './shared/addons.ChoDmUFv.js';
3
- import '@unhead/addons/src/unplugin/TreeshakeServerComposables';
4
- import '@unhead/addons/src/unplugin/UseSeoMetaTransform';
2
+ import { U as UnpluginOptions } from './shared/addons.51MZ0zeg.js';
5
3
 
6
4
  declare const _default: (options?: UnpluginOptions) => Plugin[];
7
5
 
@@ -1,7 +1,5 @@
1
1
  import * as webpack from 'webpack';
2
- import { U as UnpluginOptions } from './shared/addons.ChoDmUFv.mjs';
3
- import '@unhead/addons/src/unplugin/TreeshakeServerComposables';
4
- import '@unhead/addons/src/unplugin/UseSeoMetaTransform';
2
+ import { U as UnpluginOptions } from './shared/addons.51MZ0zeg.mjs';
5
3
 
6
4
  declare const _default: (options?: UnpluginOptions) => webpack.WebpackPluginInstance[];
7
5
 
package/dist/webpack.d.ts CHANGED
@@ -1,7 +1,5 @@
1
1
  import * as webpack from 'webpack';
2
- import { U as UnpluginOptions } from './shared/addons.ChoDmUFv.js';
3
- import '@unhead/addons/src/unplugin/TreeshakeServerComposables';
4
- import '@unhead/addons/src/unplugin/UseSeoMetaTransform';
2
+ import { U as UnpluginOptions } from './shared/addons.51MZ0zeg.js';
5
3
 
6
4
  declare const _default: (options?: UnpluginOptions) => webpack.WebpackPluginInstance[];
7
5
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unhead/addons",
3
3
  "type": "module",
4
- "version": "2.0.0-rc.1",
4
+ "version": "2.0.0-rc.11",
5
5
  "author": "Harlan Wilton <harlan@harlanzw.com>",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/harlan-zw",
@@ -22,15 +22,15 @@
22
22
  "exports": {
23
23
  ".": {
24
24
  "types": "./dist/index.d.ts",
25
- "import": "./dist/index.mjs"
25
+ "default": "./dist/index.mjs"
26
26
  },
27
27
  "./vite": {
28
28
  "types": "./dist/vite.d.ts",
29
- "import": "./dist/vite.mjs"
29
+ "default": "./dist/vite.mjs"
30
30
  },
31
31
  "./webpack": {
32
32
  "types": "./dist/webpack.d.ts",
33
- "import": "./dist/webpack.mjs"
33
+ "default": "./dist/webpack.mjs"
34
34
  }
35
35
  },
36
36
  "main": "dist/index.mjs",
@@ -39,19 +39,17 @@
39
39
  "typesVersions": {
40
40
  "*": {
41
41
  "vite": [
42
- "dist/vite.d.ts"
42
+ "dist/vite"
43
43
  ],
44
44
  "webpack": [
45
- "dist/webpack.d.ts"
45
+ "dist/webpack"
46
46
  ]
47
47
  }
48
48
  },
49
49
  "files": [
50
+ "*.d.ts",
50
51
  "dist"
51
52
  ],
52
- "peerDependencies": {
53
- "unhead": "2.0.0-rc.1"
54
- },
55
53
  "dependencies": {
56
54
  "@rollup/pluginutils": "^5.1.4",
57
55
  "estree-walker": "^3.0.3",
@@ -59,13 +57,14 @@
59
57
  "mlly": "^1.7.4",
60
58
  "ufo": "^1.5.4",
61
59
  "unplugin": "^2.2.0",
62
- "unplugin-ast": "^0.14.1"
60
+ "unplugin-ast": "^0.14.3"
63
61
  },
64
62
  "devDependencies": {
65
- "@babel/types": "^7.26.9"
63
+ "@babel/types": "^7.26.10"
66
64
  },
67
65
  "scripts": {
68
- "build": "unbuild .",
69
- "stub": "unbuild . --stub"
66
+ "build": "unbuild",
67
+ "stub": "unbuild --stub",
68
+ "test:attw": "attw --pack"
70
69
  }
71
70
  }
package/vite.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './dist/client'
package/webpack.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './dist/plugins'
@@ -1,16 +0,0 @@
1
- import { TreeshakeServerComposablesOptions } from '@unhead/addons/src/unplugin/TreeshakeServerComposables';
2
- import { UseSeoMetaTransformOptions } from '@unhead/addons/src/unplugin/UseSeoMetaTransform';
3
-
4
- interface BaseTransformerTypes {
5
- sourcemap?: boolean;
6
- filter?: {
7
- exclude?: RegExp[];
8
- include?: RegExp[];
9
- };
10
- }
11
- interface UnpluginOptions extends BaseTransformerTypes {
12
- treeshake?: TreeshakeServerComposablesOptions;
13
- transformSeoMeta?: UseSeoMetaTransformOptions;
14
- }
15
-
16
- export type { UnpluginOptions as U };
@@ -1,16 +0,0 @@
1
- import { TreeshakeServerComposablesOptions } from '@unhead/addons/src/unplugin/TreeshakeServerComposables';
2
- import { UseSeoMetaTransformOptions } from '@unhead/addons/src/unplugin/UseSeoMetaTransform';
3
-
4
- interface BaseTransformerTypes {
5
- sourcemap?: boolean;
6
- filter?: {
7
- exclude?: RegExp[];
8
- include?: RegExp[];
9
- };
10
- }
11
- interface UnpluginOptions extends BaseTransformerTypes {
12
- treeshake?: TreeshakeServerComposablesOptions;
13
- transformSeoMeta?: UseSeoMetaTransformOptions;
14
- }
15
-
16
- export type { UnpluginOptions as U };