export declare const customizeHooks: { readonly hook: "customizeHooks"; readonly props: readonly ["perf", "hookInterface", "errors"]; readonly mutable: readonly ["hookInterface", "errors"]; readonly context: "Used to modify what hooks can mutate which properties all hooks."; readonly use: "

This hook receives the hookInterface.ts file which defines all hook interactions. You can customize all 'props' and 'mutable' of\n all hooks by using this hook. This is a power user hook and unless you know Elder.js internals don't mess with it.

"; readonly location: "Elder.ts"; readonly experimental: true; readonly advanced: true; }; export declare const bootstrapHook: { readonly hook: "bootstrap"; readonly props: readonly ["perf", "helpers", "data", "settings", "routes", "hooks", "query", "errors"]; readonly mutable: readonly ["errors", "helpers", "data", "settings", "query"]; readonly context: "Routes, plugins, and hooks have been collected and validated."; readonly use: ""; readonly location: "Elder.ts"; readonly experimental: false; readonly advanced: false; }; export declare const allRequestsHook: { readonly hook: "allRequests"; readonly props: readonly ["perf", "helpers", "data", "settings", "allRequests", "routes", "query", "errors"]; readonly mutable: readonly ["errors", "allRequests"]; readonly context: "allRequests which represents all of the request objects have been collected from route and plugins. This makes the 'allRequests' array mutable."; readonly use: "

The main use here is to allow users to adjust the requests that Elder.js is aware of.

NOTE: If you are modifying 'allRequests' you must set 'request.route' key for each request.

"; readonly location: "Elder.ts"; readonly experimental: false; readonly advanced: false; }; export declare const middlewareHook: { readonly hook: "middleware"; readonly props: readonly ["perf", "errors", "query", "helpers", "data", "settings", "allRequests", "routes", "req", "next", "res", "serverLookupObject", "runHook", "shortcodes", "request", "router"]; readonly mutable: readonly ["errors", "query", "helpers", "data", "settings", "allRequests", "routes", "req", "next", "res", "request", "serverLookupObject"]; readonly context: "Fired upon a request that originates from the express/polka middleware version of Elder.js. The hook has access to \"req\" and \"next\" common in express like middleware."; readonly use: "

If you're looking to use Elder.js with express/polka to build a server rendered website, then you'll be interested in this hook as it includes the familiar 'req' and 'next' objects as often used in Express middleware.

\n "; readonly location: "prepareServer.ts"; readonly experimental: false; readonly advanced: true; }; export declare const requestHook: { readonly hook: "request"; readonly props: readonly ["perf", "helpers", "data", "settings", "request", "allRequests", "query", "errors", "routes", "route"]; readonly mutable: readonly ["errors", "helpers", "data", "settings", "request", "route"]; readonly context: "This is executed at the beginning the request object being processed."; readonly use: "

This hook gives access to the entire state of a request lifecycle before it starts.

\n \n "; readonly location: "Page.ts"; readonly experimental: false; readonly advanced: false; }; export declare const dataHook: { readonly hook: "data"; readonly props: readonly ["perf", "data", "request", "errors", "helpers", "query", "routes", "cssStack", "headStack", "beforeHydrateStack", "hydrateStack", "customJsStack", "footerStack", "settings", "next"]; readonly mutable: readonly ["errors", "data", "cssStack", "headStack", "beforeHydrateStack", "hydrateStack", "customJsStack", "footerStack"]; readonly context: "This hook is run after the route's \"data\" function has executed."; readonly use: "

This hook is mainly used by plugins/hooks to offer functionality at the route level that is dependent on the route's \"data\" function has returning but isn't suitable to live in multiple data function across many routes due to code duplication.

\n

Examples of things we (ElderGuide.com) have done or have seen users do:

\n \n

Stacks are made available here so that strings can be added to the head or footer of the page easily.

\n "; readonly location: "Page.ts"; readonly experimental: false; readonly advanced: true; }; export declare const shortcodeHook: { readonly hook: "shortcodes"; readonly props: readonly ["perf", "helpers", "data", "settings", "request", "query", "errors", "cssStack", "headStack", "customJsStack", "layoutHtml", "shortcodes", "allRequests"]; readonly mutable: readonly ["errors", "layoutHtml", "cssStack", "headStack", "customJsStack"]; readonly context: "Executed after the route's html has been compiled, but before the layout html has been compiled."; readonly use: "

Elder.js uses this hook to process shortcodes. The vast majority of users won't need to use this hook, but if you were so inclined you could write your own shortcode parser or if you'd like to disable shortcodes completely, you can add 'elderProcessShortcodes' to hooks.disable in your elder.config.js file.

\n

NOTE: Don't use this hook for anything besides shortcodes.

"; readonly location: "Page.ts"; readonly experimental: false; readonly advanced: true; }; export declare const stacksHook: { readonly hook: "stacks"; readonly props: readonly ["perf", "helpers", "data", "settings", "request", "query", "errors", "cssStack", "htmlAttributesStack", "bodyAttributesStack", "headStack", "beforeHydrateStack", "hydrateStack", "customJsStack", "footerStack"]; readonly mutable: readonly ["errors", "cssStack", "htmlAttributesStack", "bodyAttributesStack", "headStack", "beforeHydrateStack", "hydrateStack", "customJsStack", "footerStack"]; readonly context: "Executed just before processing all of the stacks into strings."; readonly use: "

Elder.js uses 'stacks' to manage it's string concatenation. If you are unfamiliar, stacks are basically an array of strings, with a priority, and some meta data. This hook let's you manipulate or view the stacks before they are written to the page and is designed for use by plugins.

\n

This hook will mainly be used when you need to add arbitrary strings to the footer. In most cases, users should be using <svelte:head></svelte:head> to add content to the head.

\n \n "; readonly location: "Page.ts"; readonly experimental: false; readonly advanced: true; }; export declare const headHook: { readonly hook: "head"; readonly props: readonly ["perf", "helpers", "data", "settings", "request", "headString", "query", "errors"]; readonly mutable: readonly ["errors", "headString"]; readonly context: "Executed just before writing the tag to the page."; readonly use: "

This hook's headSting represents everything that will be written to <head> tag.

\n

There are many possible SEO uses to this hook, especially for plugins. That said, we recommend users who want to set common SEO elements such as tags <title> and meta descriptions programmatically to do it from within Svelte templates using the <svelte:head></svelte:head> tag. Chances are you won't need this field unless you're a power user and need access to the raw head.

"; readonly location: "Page.ts"; readonly experimental: false; readonly advanced: true; }; export declare const compileHtmlHook: { readonly hook: "compileHtml"; readonly props: readonly ["perf", "helpers", "data", "settings", "htmlAttributesString", "bodyAttributesString", "request", "headString", "footerString", "layoutHtml", "htmlString"]; readonly mutable: readonly ["errors", "htmlString"]; readonly context: "This is where Elder.js merges the html from the Svelte layout with stacks and wraps it in an tag."; readonly use: "

This hook should only be used when you need to have full control over the <html> document. Make sure if you use this to add 'elderCompileHtml' to the 'hooks.disable' array in your elder.config.js or your template will be overwritten.

"; readonly location: "Page.ts"; readonly experimental: false; readonly advanced: true; }; export declare const htmlHook: { readonly hook: "html"; readonly props: readonly ["perf", "helpers", "data", "settings", "request", "htmlString", "query", "errors"]; readonly mutable: readonly ["errors", "htmlString"]; readonly context: "Executed when all of the html has been compiled."; readonly use: "

This hook receives the full html of the document. With great power comes great responsibility.

\n "; readonly location: "Page.ts"; readonly experimental: false; readonly advanced: false; }; export declare const requestCompleteHook: { readonly hook: "requestComplete"; readonly props: readonly ["perf", "request", "htmlString", "query", "settings", "errors", "timings", "data"]; readonly mutable: readonly ["errors"]; readonly context: "This hook marks the end of the request lifecycle."; readonly use: "

This hook is triggered on an individual 'request object' completing whether Elder.js is being used in the \"build\" or a \"server\" mode.

\n "; readonly location: "Page.ts"; readonly experimental: false; readonly advanced: false; }; export declare const errorHook: { readonly hook: "error"; readonly props: readonly ["perf", "helpers", "data", "settings", "request", "query", "errors"]; readonly mutable: readonly []; readonly context: "Executed only if the script has encountered errors and they are pushed to the errors array."; readonly use: "

As the script encounters errors, they are collected and presented on this hook at the end of a request and the end of an entire build.

"; readonly location: "Page.ts, build.ts"; readonly experimental: false; readonly advanced: false; }; export declare const buildCompleteHook: { readonly hook: "buildComplete"; readonly props: readonly ["perf", "helpers", "data", "settings", "timings", "query", "errors", "routes", "allRequests"]; readonly mutable: readonly []; readonly context: "Executed after a build is complete"; readonly use: "

Contains whether the build was successful. If not it contains errors for the entire build. Also includes\n average performance details, and a granular performance object. Could be used to fire off additional scripts such as generating a sitemap or copying asset files to the public folder.

\n

Plugins: Because builds are split across processes, a plugin doesn't not have a shared memory space across all processes.

"; readonly location: "build.ts"; readonly experimental: false; readonly advanced: false; }; export declare const hookInterface: readonly [{ readonly hook: "customizeHooks"; readonly props: readonly ["perf", "hookInterface", "errors"]; readonly mutable: readonly ["hookInterface", "errors"]; readonly context: "Used to modify what hooks can mutate which properties all hooks."; readonly use: "

This hook receives the hookInterface.ts file which defines all hook interactions. You can customize all 'props' and 'mutable' of\n all hooks by using this hook. This is a power user hook and unless you know Elder.js internals don't mess with it.

"; readonly location: "Elder.ts"; readonly experimental: true; readonly advanced: true; }, { readonly hook: "bootstrap"; readonly props: readonly ["perf", "helpers", "data", "settings", "routes", "hooks", "query", "errors"]; readonly mutable: readonly ["errors", "helpers", "data", "settings", "query"]; readonly context: "Routes, plugins, and hooks have been collected and validated."; readonly use: ""; readonly location: "Elder.ts"; readonly experimental: false; readonly advanced: false; }, { readonly hook: "allRequests"; readonly props: readonly ["perf", "helpers", "data", "settings", "allRequests", "routes", "query", "errors"]; readonly mutable: readonly ["errors", "allRequests"]; readonly context: "allRequests which represents all of the request objects have been collected from route and plugins. This makes the 'allRequests' array mutable."; readonly use: "

The main use here is to allow users to adjust the requests that Elder.js is aware of.

NOTE: If you are modifying 'allRequests' you must set 'request.route' key for each request.

"; readonly location: "Elder.ts"; readonly experimental: false; readonly advanced: false; }, { readonly hook: "middleware"; readonly props: readonly ["perf", "errors", "query", "helpers", "data", "settings", "allRequests", "routes", "req", "next", "res", "serverLookupObject", "runHook", "shortcodes", "request", "router"]; readonly mutable: readonly ["errors", "query", "helpers", "data", "settings", "allRequests", "routes", "req", "next", "res", "request", "serverLookupObject"]; readonly context: "Fired upon a request that originates from the express/polka middleware version of Elder.js. The hook has access to \"req\" and \"next\" common in express like middleware."; readonly use: "

If you're looking to use Elder.js with express/polka to build a server rendered website, then you'll be interested in this hook as it includes the familiar 'req' and 'next' objects as often used in Express middleware.

\n "; readonly location: "prepareServer.ts"; readonly experimental: false; readonly advanced: true; }, { readonly hook: "request"; readonly props: readonly ["perf", "helpers", "data", "settings", "request", "allRequests", "query", "errors", "routes", "route"]; readonly mutable: readonly ["errors", "helpers", "data", "settings", "request", "route"]; readonly context: "This is executed at the beginning the request object being processed."; readonly use: "

This hook gives access to the entire state of a request lifecycle before it starts.

\n \n "; readonly location: "Page.ts"; readonly experimental: false; readonly advanced: false; }, { readonly hook: "data"; readonly props: readonly ["perf", "data", "request", "errors", "helpers", "query", "routes", "cssStack", "headStack", "beforeHydrateStack", "hydrateStack", "customJsStack", "footerStack", "settings", "next"]; readonly mutable: readonly ["errors", "data", "cssStack", "headStack", "beforeHydrateStack", "hydrateStack", "customJsStack", "footerStack"]; readonly context: "This hook is run after the route's \"data\" function has executed."; readonly use: "

This hook is mainly used by plugins/hooks to offer functionality at the route level that is dependent on the route's \"data\" function has returning but isn't suitable to live in multiple data function across many routes due to code duplication.

\n

Examples of things we (ElderGuide.com) have done or have seen users do:

\n \n

Stacks are made available here so that strings can be added to the head or footer of the page easily.

\n "; readonly location: "Page.ts"; readonly experimental: false; readonly advanced: true; }, { readonly hook: "shortcodes"; readonly props: readonly ["perf", "helpers", "data", "settings", "request", "query", "errors", "cssStack", "headStack", "customJsStack", "layoutHtml", "shortcodes", "allRequests"]; readonly mutable: readonly ["errors", "layoutHtml", "cssStack", "headStack", "customJsStack"]; readonly context: "Executed after the route's html has been compiled, but before the layout html has been compiled."; readonly use: "

Elder.js uses this hook to process shortcodes. The vast majority of users won't need to use this hook, but if you were so inclined you could write your own shortcode parser or if you'd like to disable shortcodes completely, you can add 'elderProcessShortcodes' to hooks.disable in your elder.config.js file.

\n

NOTE: Don't use this hook for anything besides shortcodes.

"; readonly location: "Page.ts"; readonly experimental: false; readonly advanced: true; }, { readonly hook: "stacks"; readonly props: readonly ["perf", "helpers", "data", "settings", "request", "query", "errors", "cssStack", "htmlAttributesStack", "bodyAttributesStack", "headStack", "beforeHydrateStack", "hydrateStack", "customJsStack", "footerStack"]; readonly mutable: readonly ["errors", "cssStack", "htmlAttributesStack", "bodyAttributesStack", "headStack", "beforeHydrateStack", "hydrateStack", "customJsStack", "footerStack"]; readonly context: "Executed just before processing all of the stacks into strings."; readonly use: "

Elder.js uses 'stacks' to manage it's string concatenation. If you are unfamiliar, stacks are basically an array of strings, with a priority, and some meta data. This hook let's you manipulate or view the stacks before they are written to the page and is designed for use by plugins.

\n

This hook will mainly be used when you need to add arbitrary strings to the footer. In most cases, users should be using <svelte:head></svelte:head> to add content to the head.

\n \n "; readonly location: "Page.ts"; readonly experimental: false; readonly advanced: true; }, { readonly hook: "head"; readonly props: readonly ["perf", "helpers", "data", "settings", "request", "headString", "query", "errors"]; readonly mutable: readonly ["errors", "headString"]; readonly context: "Executed just before writing the tag to the page."; readonly use: "

This hook's headSting represents everything that will be written to <head> tag.

\n

There are many possible SEO uses to this hook, especially for plugins. That said, we recommend users who want to set common SEO elements such as tags <title> and meta descriptions programmatically to do it from within Svelte templates using the <svelte:head></svelte:head> tag. Chances are you won't need this field unless you're a power user and need access to the raw head.

"; readonly location: "Page.ts"; readonly experimental: false; readonly advanced: true; }, { readonly hook: "compileHtml"; readonly props: readonly ["perf", "helpers", "data", "settings", "htmlAttributesString", "bodyAttributesString", "request", "headString", "footerString", "layoutHtml", "htmlString"]; readonly mutable: readonly ["errors", "htmlString"]; readonly context: "This is where Elder.js merges the html from the Svelte layout with stacks and wraps it in an tag."; readonly use: "

This hook should only be used when you need to have full control over the <html> document. Make sure if you use this to add 'elderCompileHtml' to the 'hooks.disable' array in your elder.config.js or your template will be overwritten.

"; readonly location: "Page.ts"; readonly experimental: false; readonly advanced: true; }, { readonly hook: "html"; readonly props: readonly ["perf", "helpers", "data", "settings", "request", "htmlString", "query", "errors"]; readonly mutable: readonly ["errors", "htmlString"]; readonly context: "Executed when all of the html has been compiled."; readonly use: "

This hook receives the full html of the document. With great power comes great responsibility.

\n "; readonly location: "Page.ts"; readonly experimental: false; readonly advanced: false; }, { readonly hook: "requestComplete"; readonly props: readonly ["perf", "request", "htmlString", "query", "settings", "errors", "timings", "data"]; readonly mutable: readonly ["errors"]; readonly context: "This hook marks the end of the request lifecycle."; readonly use: "

This hook is triggered on an individual 'request object' completing whether Elder.js is being used in the \"build\" or a \"server\" mode.

\n "; readonly location: "Page.ts"; readonly experimental: false; readonly advanced: false; }, { readonly hook: "error"; readonly props: readonly ["perf", "helpers", "data", "settings", "request", "query", "errors"]; readonly mutable: readonly []; readonly context: "Executed only if the script has encountered errors and they are pushed to the errors array."; readonly use: "

As the script encounters errors, they are collected and presented on this hook at the end of a request and the end of an entire build.

"; readonly location: "Page.ts, build.ts"; readonly experimental: false; readonly advanced: false; }, { readonly hook: "buildComplete"; readonly props: readonly ["perf", "helpers", "data", "settings", "timings", "query", "errors", "routes", "allRequests"]; readonly mutable: readonly []; readonly context: "Executed after a build is complete"; readonly use: "

Contains whether the build was successful. If not it contains errors for the entire build. Also includes\n average performance details, and a granular performance object. Could be used to fire off additional scripts such as generating a sitemap or copying asset files to the public folder.

\n

Plugins: Because builds are split across processes, a plugin doesn't not have a shared memory space across all processes.

"; readonly location: "build.ts"; readonly experimental: false; readonly advanced: false; }]; export default hookInterface; export declare type THookInterface = typeof hookInterface; export declare type SingleHookDefinition = typeof customizeHooks | typeof bootstrapHook | typeof allRequestsHook | typeof middlewareHook | typeof requestHook | typeof dataHook | typeof shortcodeHook | typeof stacksHook | typeof headHook | typeof compileHtmlHook | typeof htmlHook | typeof requestCompleteHook | typeof errorHook | typeof buildCompleteHook;