@blinkk/root 2.5.12 → 2.5.14-alpha.0
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/chunk-BUAFCL5F.js +381 -0
- package/dist/chunk-BUAFCL5F.js.map +1 -0
- package/dist/chunk-CY5IQ4AQ.js +73 -0
- package/dist/chunk-CY5IQ4AQ.js.map +1 -0
- package/dist/{chunk-EWCJOOZN.js → chunk-SBYWZOQ6.js} +8 -8
- package/dist/cli.d.ts +3 -1
- package/dist/cli.js +2 -2
- package/dist/core.d.ts +4 -2
- package/dist/core.js +4 -4
- package/dist/core.js.map +1 -1
- package/dist/functions.js +2 -2
- package/dist/jsx/jsx-dev-runtime.d.ts +1 -0
- package/dist/jsx/jsx-dev-runtime.js +11 -0
- package/dist/jsx/jsx-dev-runtime.js.map +1 -0
- package/dist/jsx/jsx-runtime.d.ts +1 -0
- package/dist/jsx/jsx-runtime.js +19 -0
- package/dist/jsx/jsx-runtime.js.map +1 -0
- package/dist/jsx-C8BaDh-4.d.ts +14 -0
- package/dist/jsx-dev-runtime-DUJrvx5P.d.ts +677 -0
- package/dist/jsx.d.ts +2 -0
- package/dist/jsx.js +23 -0
- package/dist/jsx.js.map +1 -0
- package/dist/middleware.d.ts +4 -2
- package/dist/node.d.ts +3 -1
- package/dist/render.d.ts +3 -1
- package/dist/render.js +44 -9
- package/dist/render.js.map +1 -1
- package/dist/{types-BXpvdaTX.d.ts → types-BstdV3Rj.d.ts} +31 -1
- package/package.json +19 -4
- /package/dist/{chunk-EWCJOOZN.js.map → chunk-SBYWZOQ6.js.map} +0 -0
|
@@ -3,6 +3,7 @@ import { ComponentType } from 'preact';
|
|
|
3
3
|
import { PluginOption, UserConfig, ViteDevServer } from 'vite';
|
|
4
4
|
import { Options } from 'html-minifier-terser';
|
|
5
5
|
import { HTMLBeautifyOptions } from 'js-beautify';
|
|
6
|
+
import { J as JsxRenderOptions } from './jsx-C8BaDh-4.js';
|
|
6
7
|
|
|
7
8
|
declare class Hooks {
|
|
8
9
|
private callbacks;
|
|
@@ -168,6 +169,27 @@ interface RootUserConfig {
|
|
|
168
169
|
* @see {@link https://vitejs.dev/config/} for more information.
|
|
169
170
|
*/
|
|
170
171
|
vite?: UserConfig;
|
|
172
|
+
/**
|
|
173
|
+
* Config for the built-in JSX-to-HTML renderer.
|
|
174
|
+
*
|
|
175
|
+
* - `mode: 'pretty'` (default) — block-level elements render on their own
|
|
176
|
+
* line with no indentation.
|
|
177
|
+
* - `mode: 'minimal'` — compact output with no extra whitespace.
|
|
178
|
+
*
|
|
179
|
+
* Use `blockElements` to specify additional custom element tag names that
|
|
180
|
+
* should be treated as block-level in pretty mode.
|
|
181
|
+
*
|
|
182
|
+
* @example
|
|
183
|
+
* ```ts
|
|
184
|
+
* export default defineConfig({
|
|
185
|
+
* jsxRenderer: {
|
|
186
|
+
* mode: 'pretty',
|
|
187
|
+
* blockElements: ['my-card', 'my-section'],
|
|
188
|
+
* },
|
|
189
|
+
* });
|
|
190
|
+
* ```
|
|
191
|
+
*/
|
|
192
|
+
jsxRenderer?: JsxRenderOptions;
|
|
171
193
|
/**
|
|
172
194
|
* Whether to automatically minify HTML output. This is enabled by default,
|
|
173
195
|
* in order to disable, pass `minifyHtml: false` to root.config.ts.
|
|
@@ -470,8 +492,16 @@ declare class Renderer {
|
|
|
470
492
|
* - construct alternates for localized URL paths
|
|
471
493
|
*/
|
|
472
494
|
getSitemap(): Promise<Sitemap>;
|
|
495
|
+
private getJsxRenderOptions;
|
|
496
|
+
/**
|
|
497
|
+
* Renders JSX via either the `@blinkk/root/jsx` package or
|
|
498
|
+
* `preact-render-to-string` depending if the `jsxRenderer` config is set up
|
|
499
|
+
* in `root.config.ts`.
|
|
500
|
+
*/
|
|
501
|
+
private renderJsx;
|
|
473
502
|
private getConfiguredStyleEntries;
|
|
474
503
|
private renderHtml;
|
|
504
|
+
private ensureNewline;
|
|
475
505
|
render404(options?: {
|
|
476
506
|
currentPath?: string;
|
|
477
507
|
}): Promise<{
|
|
@@ -725,4 +755,4 @@ interface SitemapItem {
|
|
|
725
755
|
}>;
|
|
726
756
|
}
|
|
727
757
|
|
|
728
|
-
export { type
|
|
758
|
+
export { type StaticContentResult as A, type GetStaticContent as B, type ContentSecurityPolicyConfig as C, type RouteModule as D, type HandlerRenderOptions as E, type HandlerRenderFn as F, type GetStaticProps as G, type HandlerContext as H, type Sitemap as I, type SitemapItem as J, Renderer as K, type LocaleGroup as L, type MultipartFile as M, type NextFunction as N, type PostBuildOptions as P, type RootConfig as R, SESSION_COOKIE as S, type XFrameOptionsConfig as X, type Request as a, type Response as b, type SessionMiddlewareOptions as c, type SaveSessionOptions as d, Session as e, type Server as f, type Route as g, type RootUserConfig as h, type RootI18nConfig as i, type RootBuildConfig as j, type RootRedirectConfig as k, type RootHeaderConfig as l, type RootSecurityConfig as m, type RootServerConfig as n, defineConfig as o, type ConfigureServerHook as p, type ConfigureServerOptions as q, type PluginHooks as r, sessionMiddleware as s, type Plugin as t, configureServerPlugins as u, getVitePlugins as v, type RouteParams as w, type GetStaticPaths as x, type RequestMiddleware as y, type Handler as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blinkk/root",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.14-alpha.0",
|
|
4
4
|
"author": "s@blinkk.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -11,9 +11,6 @@
|
|
|
11
11
|
"url": "git+https://github.com/blinkk/rootjs.git",
|
|
12
12
|
"directory": "packages/root"
|
|
13
13
|
},
|
|
14
|
-
"publishConfig": {
|
|
15
|
-
"provenance": true
|
|
16
|
-
},
|
|
17
14
|
"files": [
|
|
18
15
|
"bin/*",
|
|
19
16
|
"dist/**/*",
|
|
@@ -43,6 +40,18 @@
|
|
|
43
40
|
"types": "./dist/functions.d.ts",
|
|
44
41
|
"import": "./dist/functions.js"
|
|
45
42
|
},
|
|
43
|
+
"./jsx": {
|
|
44
|
+
"types": "./dist/jsx.d.ts",
|
|
45
|
+
"import": "./dist/jsx.js"
|
|
46
|
+
},
|
|
47
|
+
"./jsx/jsx-runtime": {
|
|
48
|
+
"types": "./dist/jsx/jsx-runtime.d.ts",
|
|
49
|
+
"import": "./dist/jsx/jsx-runtime.js"
|
|
50
|
+
},
|
|
51
|
+
"./jsx/jsx-dev-runtime": {
|
|
52
|
+
"types": "./dist/jsx/jsx-dev-runtime.d.ts",
|
|
53
|
+
"import": "./dist/jsx/jsx-dev-runtime.js"
|
|
54
|
+
},
|
|
46
55
|
"./middleware": {
|
|
47
56
|
"types": "./dist/middleware.d.ts",
|
|
48
57
|
"import": "./dist/middleware.js"
|
|
@@ -92,6 +101,12 @@
|
|
|
92
101
|
},
|
|
93
102
|
"firebase-admin": {
|
|
94
103
|
"optional": true
|
|
104
|
+
},
|
|
105
|
+
"preact": {
|
|
106
|
+
"optional": true
|
|
107
|
+
},
|
|
108
|
+
"preact-render-to-string": {
|
|
109
|
+
"optional": true
|
|
95
110
|
}
|
|
96
111
|
},
|
|
97
112
|
"devDependencies": {
|
|
File without changes
|