@stacksjs/stx 0.2.150 → 0.2.152

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/render.d.ts CHANGED
@@ -23,7 +23,7 @@ export declare function renderTemplate(filePath: string, renderOptions?: RenderO
23
23
  * @param context - Variables to make available in the template
24
24
  * @returns The rendered HTML string
25
25
  */
26
- export declare function renderString(template: string, context?: Record<string, unknown>, options?: { templateOnly?: boolean }): Promise<string>;
26
+ export declare function renderString(template: string, context?: Record<string, unknown>, options?: Omit<RenderOptions, 'context'>): Promise<string>;
27
27
  /**
28
28
  * Render template content that is already in memory, resolving includes and
29
29
  * components relative to `filePath`.
package/dist/render.js CHANGED
@@ -97,7 +97,7 @@ export async function renderTemplate(filePath, renderOptions = {}) {
97
97
  }
98
98
  return renderTemplateString(content, resolvedPath, renderOptions);
99
99
  }
100
- export async function renderString(template, context = {}, options) {
100
+ export async function renderString(template, context = {}, options = {}) {
101
101
  return renderTemplateString(template, process.cwd(), { context, ...options });
102
102
  }
103
103
  export async function renderTemplateString(content, filePath, renderOptions = {}) {
@@ -110,7 +110,7 @@ export async function renderTemplateString(content, filePath, renderOptions = {}
110
110
  __stx: {},
111
111
  __stx_options: options,
112
112
  __stx_sfc_mode: !0,
113
- __stx_inject_css: renderOptions.injectCSS !== !1,
113
+ __stx_inject_css: renderOptions.injectCSS === !0,
114
114
  ...renderOptions.context || {}
115
115
  };
116
116
  for (const scriptContent of serverScripts)