@unhead/schema 1.8.0 → 1.8.1

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.d.cts CHANGED
@@ -32,7 +32,7 @@ interface UseScriptOptions<T> extends Omit<HeadEntryOptions, 'transform'> {
32
32
  script: ScriptInstance<T>;
33
33
  fn: string | symbol;
34
34
  }) => any);
35
- transform?: (script: Script) => Promise<Script> | Script;
35
+ transform?: (script: UseScriptInput) => Promise<UseScriptInput> | UseScriptInput;
36
36
  trigger?: 'idle' | 'manual' | Promise<void>;
37
37
  }
38
38
  type UseScriptInput = Omit<Script, 'src'> & {
@@ -89,7 +89,7 @@ interface HeadHooks {
89
89
  }) => HookResult;
90
90
  'ssr:rendered': (ctx: SSRRenderContext) => HookResult;
91
91
  'script:transform': (ctx: {
92
- script: Script;
92
+ script: UseScriptInput;
93
93
  }) => HookResult;
94
94
  'script:updated': (ctx: {
95
95
  script: ScriptInstance<any>;
package/dist/index.d.mts CHANGED
@@ -32,7 +32,7 @@ interface UseScriptOptions<T> extends Omit<HeadEntryOptions, 'transform'> {
32
32
  script: ScriptInstance<T>;
33
33
  fn: string | symbol;
34
34
  }) => any);
35
- transform?: (script: Script) => Promise<Script> | Script;
35
+ transform?: (script: UseScriptInput) => Promise<UseScriptInput> | UseScriptInput;
36
36
  trigger?: 'idle' | 'manual' | Promise<void>;
37
37
  }
38
38
  type UseScriptInput = Omit<Script, 'src'> & {
@@ -89,7 +89,7 @@ interface HeadHooks {
89
89
  }) => HookResult;
90
90
  'ssr:rendered': (ctx: SSRRenderContext) => HookResult;
91
91
  'script:transform': (ctx: {
92
- script: Script;
92
+ script: UseScriptInput;
93
93
  }) => HookResult;
94
94
  'script:updated': (ctx: {
95
95
  script: ScriptInstance<any>;
package/dist/index.d.ts CHANGED
@@ -32,7 +32,7 @@ interface UseScriptOptions<T> extends Omit<HeadEntryOptions, 'transform'> {
32
32
  script: ScriptInstance<T>;
33
33
  fn: string | symbol;
34
34
  }) => any);
35
- transform?: (script: Script) => Promise<Script> | Script;
35
+ transform?: (script: UseScriptInput) => Promise<UseScriptInput> | UseScriptInput;
36
36
  trigger?: 'idle' | 'manual' | Promise<void>;
37
37
  }
38
38
  type UseScriptInput = Omit<Script, 'src'> & {
@@ -89,7 +89,7 @@ interface HeadHooks {
89
89
  }) => HookResult;
90
90
  'ssr:rendered': (ctx: SSRRenderContext) => HookResult;
91
91
  'script:transform': (ctx: {
92
- script: Script;
92
+ script: UseScriptInput;
93
93
  }) => HookResult;
94
94
  'script:updated': (ctx: {
95
95
  script: ScriptInstance<any>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unhead/schema",
3
3
  "type": "module",
4
- "version": "1.8.0",
4
+ "version": "1.8.1",
5
5
  "author": "Harlan Wilton <harlan@harlanzw.com>",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/harlan-zw",