unhead 1.0.7 → 1.0.9

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
@@ -612,6 +612,10 @@ function createHeadCore(options = {}) {
612
612
  get hooks() {
613
613
  return hooks;
614
614
  },
615
+ use(plugin) {
616
+ if (plugin.hooks)
617
+ hooks.addHooks(plugin.hooks);
618
+ },
615
619
  push(input, options2) {
616
620
  const activeEntry = {
617
621
  _i: _eid++,
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _unhead_schema from '@unhead/schema';
2
- import { Head, HeadEntryOptions, ActiveHeadEntry, Title, Base, Meta, MetaFlatInput, Link, Script, Style, Noscript, HtmlAttributes, BodyAttributes, TitleTemplate, Unhead, CreateHeadOptions, HeadPlugin, HeadEntry, HeadTag } from '@unhead/schema';
2
+ import { Head, HeadEntryOptions, ActiveHeadEntry, Title, Base, Meta, MetaFlatInput, Link, Script, Style, Noscript, HtmlAttributes, BodyAttributes, TitleTemplate, Unhead, HeadPlugin, CreateHeadOptions, HeadEntry, HeadTag } from '@unhead/schema';
3
3
  import { RenderDomHeadOptions } from '@unhead/dom';
4
4
 
5
5
  interface DedupesTagsPluginOptions {
@@ -62,8 +62,8 @@ declare let activeHead: Unhead<any> | undefined;
62
62
  declare const setActiveHead: (head: Unhead<any> | undefined) => Unhead<any> | undefined;
63
63
  declare const getActiveHead: () => Unhead<any> | undefined;
64
64
 
65
- declare const CorePlugins: () => _unhead_schema.HeadPlugin[];
66
- declare const DOMPlugins: (options?: CreateHeadOptions) => _unhead_schema.HeadPlugin[];
65
+ declare const CorePlugins: () => HeadPlugin[];
66
+ declare const DOMPlugins: (options?: CreateHeadOptions) => HeadPlugin[];
67
67
  declare function createHead<T extends {} = Head>(options?: CreateHeadOptions): Unhead<T>;
68
68
  /**
69
69
  * Creates a core instance of unhead. Does not provide a global ctx for composables to work
package/dist/index.mjs CHANGED
@@ -610,6 +610,10 @@ function createHeadCore(options = {}) {
610
610
  get hooks() {
611
611
  return hooks;
612
612
  },
613
+ use(plugin) {
614
+ if (plugin.hooks)
615
+ hooks.addHooks(plugin.hooks);
616
+ },
613
617
  push(input, options2) {
614
618
  const activeEntry = {
615
619
  _i: _eid++,
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "unhead",
3
3
  "type": "module",
4
- "version": "1.0.7",
5
- "packageManager": "pnpm@7.18.0",
4
+ "version": "1.0.9",
5
+ "packageManager": "pnpm@7.18.1",
6
6
  "author": "Harlan Wilton <harlan@harlanzw.com>",
7
7
  "license": "MIT",
8
8
  "funding": "https://github.com/sponsors/harlan-zw",
@@ -31,8 +31,8 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "hookable": "^5.4.2",
34
- "@unhead/dom": "1.0.7",
35
- "@unhead/schema": "1.0.7"
34
+ "@unhead/dom": "1.0.9",
35
+ "@unhead/schema": "1.0.9"
36
36
  },
37
37
  "devDependencies": {
38
38
  "zhead": "^1.0.7"