@unhead/addons 1.3.9 → 1.4.0

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
@@ -2,6 +2,7 @@
2
2
 
3
3
  const shared = require('@unhead/shared');
4
4
 
5
+ // @__NO_SIDE_EFFECTS__
5
6
  function InferSeoMetaPlugin(options = {}) {
6
7
  return shared.defineHeadPlugin({
7
8
  hooks: {
@@ -0,0 +1,40 @@
1
+ import * as _unhead_schema from '@unhead/schema';
2
+
3
+ interface InferSeoMetaPluginOptions {
4
+ /**
5
+ * Transform the og title.
6
+ *
7
+ * @param title
8
+ */
9
+ ogTitle?: ((title: string) => string);
10
+ /**
11
+ * Transform the og description.
12
+ *
13
+ * @param title
14
+ */
15
+ ogDescription?: ((description: string) => string);
16
+ /**
17
+ * The twitter card to use.
18
+ *
19
+ * @default 'summary_large_image'
20
+ */
21
+ twitterCard?: false | 'summary' | 'summary_large_image' | 'app' | 'player';
22
+ }
23
+ declare function InferSeoMetaPlugin(options?: InferSeoMetaPluginOptions): _unhead_schema.HeadPlugin;
24
+
25
+ declare const DefaultCriticalTags: {
26
+ htmlAttrs: {
27
+ lang: string;
28
+ };
29
+ meta: ({
30
+ charset: string;
31
+ name?: undefined;
32
+ content?: undefined;
33
+ } | {
34
+ name: string;
35
+ content: string;
36
+ charset?: undefined;
37
+ })[];
38
+ };
39
+
40
+ export { DefaultCriticalTags, InferSeoMetaPlugin, type InferSeoMetaPluginOptions };
@@ -0,0 +1,40 @@
1
+ import * as _unhead_schema from '@unhead/schema';
2
+
3
+ interface InferSeoMetaPluginOptions {
4
+ /**
5
+ * Transform the og title.
6
+ *
7
+ * @param title
8
+ */
9
+ ogTitle?: ((title: string) => string);
10
+ /**
11
+ * Transform the og description.
12
+ *
13
+ * @param title
14
+ */
15
+ ogDescription?: ((description: string) => string);
16
+ /**
17
+ * The twitter card to use.
18
+ *
19
+ * @default 'summary_large_image'
20
+ */
21
+ twitterCard?: false | 'summary' | 'summary_large_image' | 'app' | 'player';
22
+ }
23
+ declare function InferSeoMetaPlugin(options?: InferSeoMetaPluginOptions): _unhead_schema.HeadPlugin;
24
+
25
+ declare const DefaultCriticalTags: {
26
+ htmlAttrs: {
27
+ lang: string;
28
+ };
29
+ meta: ({
30
+ charset: string;
31
+ name?: undefined;
32
+ content?: undefined;
33
+ } | {
34
+ name: string;
35
+ content: string;
36
+ charset?: undefined;
37
+ })[];
38
+ };
39
+
40
+ export { DefaultCriticalTags, InferSeoMetaPlugin, type InferSeoMetaPluginOptions };
package/dist/index.d.ts CHANGED
@@ -37,4 +37,4 @@ declare const DefaultCriticalTags: {
37
37
  })[];
38
38
  };
39
39
 
40
- export { DefaultCriticalTags, InferSeoMetaPlugin, InferSeoMetaPluginOptions };
40
+ export { DefaultCriticalTags, InferSeoMetaPlugin, type InferSeoMetaPluginOptions };
package/dist/index.mjs CHANGED
@@ -1,5 +1,6 @@
1
1
  import { defineHeadPlugin, resolveTitleTemplate } from '@unhead/shared';
2
2
 
3
+ // @__NO_SIDE_EFFECTS__
3
4
  function InferSeoMetaPlugin(options = {}) {
4
5
  return defineHeadPlugin({
5
6
  hooks: {
@@ -18,4 +18,4 @@ interface UnpluginOptions extends BaseTransformerTypes {
18
18
  transformSeoMeta?: UseSeoMetaTransformOptions;
19
19
  }
20
20
 
21
- export { UnpluginOptions as U };
21
+ export type { UnpluginOptions as U };
@@ -0,0 +1,21 @@
1
+ interface TreeshakeServerComposablesOptions extends BaseTransformerTypes {
2
+ enabled?: boolean;
3
+ }
4
+
5
+ interface UseSeoMetaTransformOptions extends BaseTransformerTypes {
6
+ imports?: boolean;
7
+ }
8
+
9
+ interface BaseTransformerTypes {
10
+ sourcemap?: boolean;
11
+ filter?: {
12
+ exclude?: RegExp[];
13
+ include?: RegExp[];
14
+ };
15
+ }
16
+ interface UnpluginOptions extends BaseTransformerTypes {
17
+ treeshake?: TreeshakeServerComposablesOptions;
18
+ transformSeoMeta?: UseSeoMetaTransformOptions;
19
+ }
20
+
21
+ export type { UnpluginOptions as U };
@@ -0,0 +1,21 @@
1
+ interface TreeshakeServerComposablesOptions extends BaseTransformerTypes {
2
+ enabled?: boolean;
3
+ }
4
+
5
+ interface UseSeoMetaTransformOptions extends BaseTransformerTypes {
6
+ imports?: boolean;
7
+ }
8
+
9
+ interface BaseTransformerTypes {
10
+ sourcemap?: boolean;
11
+ filter?: {
12
+ exclude?: RegExp[];
13
+ include?: RegExp[];
14
+ };
15
+ }
16
+ interface UnpluginOptions extends BaseTransformerTypes {
17
+ treeshake?: TreeshakeServerComposablesOptions;
18
+ transformSeoMeta?: UseSeoMetaTransformOptions;
19
+ }
20
+
21
+ export type { UnpluginOptions as U };
@@ -0,0 +1,6 @@
1
+ import { Plugin } from 'vite';
2
+ import { U as UnpluginOptions } from './shared/addons.0f7fef83.cjs';
3
+
4
+ declare const _default: (options?: UnpluginOptions) => Plugin[];
5
+
6
+ export { UnpluginOptions, _default as default };
@@ -0,0 +1,6 @@
1
+ import { Plugin } from 'vite';
2
+ import { U as UnpluginOptions } from './shared/addons.0f7fef83.mjs';
3
+
4
+ declare const _default: (options?: UnpluginOptions) => Plugin[];
5
+
6
+ export { UnpluginOptions, _default as default };
package/dist/vite.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Plugin } from 'vite';
2
- import { U as UnpluginOptions } from './types-9efb11a1.js';
2
+ import { U as UnpluginOptions } from './shared/addons.0f7fef83.js';
3
3
 
4
4
  declare const _default: (options?: UnpluginOptions) => Plugin[];
5
5
 
@@ -0,0 +1,6 @@
1
+ import * as webpack from 'webpack';
2
+ import { U as UnpluginOptions } from './shared/addons.0f7fef83.cjs';
3
+
4
+ declare const _default: (options?: UnpluginOptions) => webpack.WebpackPluginInstance[];
5
+
6
+ export { UnpluginOptions, _default as default };
@@ -0,0 +1,6 @@
1
+ import * as webpack from 'webpack';
2
+ import { U as UnpluginOptions } from './shared/addons.0f7fef83.mjs';
3
+
4
+ declare const _default: (options?: UnpluginOptions) => webpack.WebpackPluginInstance[];
5
+
6
+ export { UnpluginOptions, _default as default };
package/dist/webpack.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as webpack from 'webpack';
2
- import { U as UnpluginOptions } from './types-9efb11a1.js';
2
+ import { U as UnpluginOptions } from './shared/addons.0f7fef83.js';
3
3
 
4
4
  declare const _default: (options?: UnpluginOptions) => webpack.WebpackPluginInstance[];
5
5
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unhead/addons",
3
3
  "type": "module",
4
- "version": "1.3.9",
4
+ "version": "1.4.0",
5
5
  "author": "Harlan Wilton <harlan@harlanzw.com>",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/harlan-zw",
@@ -49,14 +49,14 @@
49
49
  "dist"
50
50
  ],
51
51
  "dependencies": {
52
- "@rollup/pluginutils": "^5.0.3",
52
+ "@rollup/pluginutils": "^5.0.4",
53
53
  "magic-string": "^0.30.3",
54
- "mlly": "^1.4.0",
54
+ "mlly": "^1.4.1",
55
55
  "ufo": "^1.3.0",
56
56
  "unplugin": "^1.4.0",
57
57
  "unplugin-ast": "^0.8.2",
58
- "@unhead/schema": "1.3.9",
59
- "@unhead/shared": "1.3.9"
58
+ "@unhead/schema": "1.4.0",
59
+ "@unhead/shared": "1.4.0"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@babel/types": "^7.22.11",