@@ -34,13 +34,11 @@ export function injectHead() {
3434 throw new Error ( 'useHead() was called without provide context, ensure you call it through the setup() function.' )
3535}
3636
37- /* @__NO_SIDE_EFFECTS__ */
3837export function useHead < I = UseHeadInput > ( input ?: UseHeadInput , options : UseHeadOptions = { } ) : ActiveHeadEntry < I > {
3938 const head = ( options . head || injectHead ( ) ) as Unhead < I >
4039 return head . ssr ? head . push ( ( input || { } ) as I , options as HeadEntryOptions ) : clientUseHead ( head , input as I , options as HeadEntryOptions )
4140}
4241
43- /* @__NO_SIDE_EFFECTS__ */
4442function clientUseHead < I = UseHeadInput > ( head : Unhead < I > , input ?: I , options : HeadEntryOptions = { } ) : ActiveHeadEntry < I > {
4543 const deactivated = ref ( false )
4644
@@ -70,15 +68,13 @@ function clientUseHead<I = UseHeadInput>(head: Unhead<I>, input?: I, options: He
7068 return entry !
7169}
7270
73- /* @__NO_SIDE_EFFECTS__ */
7471export function useHeadSafe ( input : UseHeadSafeInput = { } , options : UseHeadOptions = { } ) : ActiveHeadEntry < UseHeadSafeInput > {
7572 const head = options . head || injectHead ( )
7673 head . use ( SafeInputPlugin )
7774 options . _safe = true
7875 return useHead < UseHeadSafeInput > ( input as UseHeadInput , options )
7976}
8077
81- /* @__NO_SIDE_EFFECTS__ */
8278export function useSeoMeta ( input : UseSeoMetaInput = { } , options : UseHeadOptions = { } ) : ActiveHeadEntry < UseSeoMetaInput > {
8379 const head = options . head || injectHead ( )
8480 head . use ( FlatMetaPlugin )
@@ -93,23 +89,20 @@ export function useSeoMeta(input: UseSeoMetaInput = {}, options: UseHeadOptions
9389/**
9490 * @deprecated use `useHead` instead.Advanced use cases should tree shake using import.meta.* if statements.
9591 */
96- /* @__NO_SIDE_EFFECTS__ */
9792export function useServerHead < I = UseHeadInput > ( input ?: UseHeadInput , options : UseHeadOptions = { } ) : ActiveHeadEntry < I > {
9893 return useHead < I > ( input as UseHeadInput , { ...options , mode : 'server' } )
9994}
10095
10196/**
10297 * @deprecated use `useHeadSafe` instead.Advanced use cases should tree shake using import.meta.* if statements.
10398 */
104- /* @__NO_SIDE_EFFECTS__ */
10599export function useServerHeadSafe ( input ?: UseHeadSafeInput , options : UseHeadOptions = { } ) : ActiveHeadEntry < UseHeadSafeInput > {
106100 return useHeadSafe ( input , { ...options , mode : 'server' } )
107101}
108102
109103/**
110104 * @deprecated use `useSeoMeta` instead.Advanced use cases should tree shake using import.meta.* if statements.
111105 */
112- /* @__NO_SIDE_EFFECTS__ */
113106export function useServerSeoMeta ( input ?: UseSeoMetaInput , options : UseHeadOptions = { } ) : ActiveHeadEntry < UseSeoMetaInput > {
114107 return useSeoMeta ( input , { ...options , mode : 'server' } )
115108}
0 commit comments