@stacksjs/stx 0.2.151 → 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/browser-composables.d.ts +16 -9
- package/dist/cli.js +503 -503
- package/dist/component-processing.d.ts +16 -0
- package/dist/component-processing.js +4 -1
- package/dist/component-renderer.js +2 -2
- package/dist/composables/use-device-orientation.d.ts +8 -1
- package/dist/composables/use-event-source.d.ts +14 -1
- package/dist/composables/use-eye-dropper.d.ts +10 -1
- package/dist/composables/use-idle.d.ts +21 -3
- package/dist/composables/use-storage.d.ts +8 -2
- package/dist/composables/use-text-selection.d.ts +27 -3
- package/dist/composables/use-wake-lock.d.ts +2 -2
- package/dist/craft.js +265 -265
- package/dist/edge-runtime.d.ts +1 -1
- package/dist/includes.js +2 -0
- package/dist/pwa.js +255 -255
- package/dist/render.d.ts +1 -1
- package/dist/render.js +2 -2
- package/dist/ssg.js +273 -273
- package/dist/ssr.d.ts +17 -1
- package/dist/utils.js +1 -8
- package/dist/variable-extractor.d.ts +8 -0
- package/dist/variable-extractor.js +24 -9
- package/dist/visual-testing.d.ts +26 -3
- package/package.json +5 -5
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?:
|
|
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
|
|
113
|
+
__stx_inject_css: renderOptions.injectCSS === !0,
|
|
114
114
|
...renderOptions.context || {}
|
|
115
115
|
};
|
|
116
116
|
for (const scriptContent of serverScripts)
|