@unhead/schema 1.8.0-beta.5 → 1.8.0-beta.7

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
@@ -12,6 +12,7 @@ interface SSRHeadPayload {
12
12
  }
13
13
  type UseScriptStatus = 'awaitingLoad' | 'loading' | 'loaded' | 'error';
14
14
  interface ScriptInstance<T> {
15
+ id: string;
15
16
  loaded: boolean;
16
17
  status: UseScriptStatus;
17
18
  load: () => Promise<T>;
@@ -23,7 +24,7 @@ interface UseScriptOptions<T> extends Omit<HeadEntryOptions, 'transform'> {
23
24
  script: ScriptInstance<T>;
24
25
  fn: string | symbol;
25
26
  }) => any);
26
- transform?: (script: Script) => Script;
27
+ transform?: (script: Script) => Promise<Script> | Script;
27
28
  trigger?: 'idle' | 'manual' | Promise<void>;
28
29
  }
29
30
  type UseScriptInput = Omit<Script, 'src'> & {
package/dist/index.d.mts CHANGED
@@ -12,6 +12,7 @@ interface SSRHeadPayload {
12
12
  }
13
13
  type UseScriptStatus = 'awaitingLoad' | 'loading' | 'loaded' | 'error';
14
14
  interface ScriptInstance<T> {
15
+ id: string;
15
16
  loaded: boolean;
16
17
  status: UseScriptStatus;
17
18
  load: () => Promise<T>;
@@ -23,7 +24,7 @@ interface UseScriptOptions<T> extends Omit<HeadEntryOptions, 'transform'> {
23
24
  script: ScriptInstance<T>;
24
25
  fn: string | symbol;
25
26
  }) => any);
26
- transform?: (script: Script) => Script;
27
+ transform?: (script: Script) => Promise<Script> | Script;
27
28
  trigger?: 'idle' | 'manual' | Promise<void>;
28
29
  }
29
30
  type UseScriptInput = Omit<Script, 'src'> & {
package/dist/index.d.ts CHANGED
@@ -12,6 +12,7 @@ interface SSRHeadPayload {
12
12
  }
13
13
  type UseScriptStatus = 'awaitingLoad' | 'loading' | 'loaded' | 'error';
14
14
  interface ScriptInstance<T> {
15
+ id: string;
15
16
  loaded: boolean;
16
17
  status: UseScriptStatus;
17
18
  load: () => Promise<T>;
@@ -23,7 +24,7 @@ interface UseScriptOptions<T> extends Omit<HeadEntryOptions, 'transform'> {
23
24
  script: ScriptInstance<T>;
24
25
  fn: string | symbol;
25
26
  }) => any);
26
- transform?: (script: Script) => Script;
27
+ transform?: (script: Script) => Promise<Script> | Script;
27
28
  trigger?: 'idle' | 'manual' | Promise<void>;
28
29
  }
29
30
  type UseScriptInput = Omit<Script, 'src'> & {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unhead/schema",
3
3
  "type": "module",
4
- "version": "1.8.0-beta.5",
4
+ "version": "1.8.0-beta.7",
5
5
  "author": "Harlan Wilton <harlan@harlanzw.com>",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/harlan-zw",