@nifrajs/web-preact 3.2.0 → 3.5.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/content.d.ts CHANGED
@@ -6,10 +6,11 @@
6
6
  * Security: injects raw HTML, so `html` MUST be trusted (your own Markdown/content, rendered at
7
7
  * build/server time) - never pass user-supplied HTML without sanitizing it first.
8
8
  */
9
+ import type { TrustedHtml } from "@nifrajs/web";
9
10
  import { type JSX, type VNode } from "preact";
10
11
  export interface ContentProps extends Omit<JSX.HTMLAttributes<HTMLElement>, "dangerouslySetInnerHTML"> {
11
12
  /** Trusted, pre-rendered HTML (e.g. `entry.html`). */
12
- readonly html: string;
13
+ readonly html: TrustedHtml;
13
14
  /** Wrapper element (default `"div"`). */
14
15
  readonly as?: string;
15
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../src/content.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAiB,KAAK,GAAG,EAAE,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAA;AAE5D,MAAM,WAAW,YACf,SAAQ,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxE,sDAAsD;IACtD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,wGAAwG;AACxG,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,YAAY,GAAG,KAAK,CAQlE"}
1
+ {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../src/content.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAiB,KAAK,GAAG,EAAE,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAA;AAE5D,MAAM,WAAW,YACf,SAAQ,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxE,sDAAsD;IACtD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;IAC1B,yCAAyC;IACzC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,wGAAwG;AACxG,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,YAAY,GAAG,KAAK,CAQlE"}
@@ -1 +1 @@
1
- {"version":3,"file":"content.js","sourceRoot":"","sources":["../src/content.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,aAAa,EAAwB,MAAM,QAAQ,CAAA;AAU5D,wGAAwG;AACxG,MAAM,UAAU,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,IAAI,EAAgB;IACzD,sFAAsF;IACtF,oGAAoG;IACpG,MAAM,KAAK,GAAoC;QAC7C,GAAG,IAAI;QACP,uBAAuB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;KAC1C,CAAA;IACD,OAAO,aAAa,CAAC,EAAE,IAAI,KAAK,EAAE,KAAK,CAAC,CAAA;AAC1C,CAAC"}
1
+ {"version":3,"file":"content.js","sourceRoot":"","sources":["../src/content.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,aAAa,EAAwB,MAAM,QAAQ,CAAA;AAU5D,wGAAwG;AACxG,MAAM,UAAU,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,IAAI,EAAgB;IACzD,sFAAsF;IACtF,oGAAoG;IACpG,MAAM,KAAK,GAAoC;QAC7C,GAAG,IAAI;QACP,uBAAuB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;KAC1C,CAAA;IACD,OAAO,aAAa,CAAC,EAAE,IAAI,KAAK,EAAE,KAAK,CAAC,CAAA;AAC1C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nifrajs/web-preact",
3
- "version": "3.2.0",
3
+ "version": "3.5.0",
4
4
  "description": "Preact render adapter for @nifrajs/web - streaming SSR + hydration (no build plugin).",
5
5
  "keywords": [
6
6
  "bun",
@@ -82,10 +82,10 @@
82
82
  "access": "public"
83
83
  },
84
84
  "dependencies": {
85
- "@nifrajs/core": "3.2.0",
86
- "@nifrajs/i18n": "3.2.0",
87
- "@nifrajs/image": "3.2.0",
88
- "@nifrajs/web": "3.2.0",
85
+ "@nifrajs/core": "3.5.0",
86
+ "@nifrajs/i18n": "3.5.0",
87
+ "@nifrajs/image": "3.5.0",
88
+ "@nifrajs/web": "3.5.0",
89
89
  "preact-render-to-string": "^6.5.0"
90
90
  },
91
91
  "peerDependencies": {
package/src/content.ts CHANGED
@@ -6,12 +6,14 @@
6
6
  * Security: injects raw HTML, so `html` MUST be trusted (your own Markdown/content, rendered at
7
7
  * build/server time) - never pass user-supplied HTML without sanitizing it first.
8
8
  */
9
+
10
+ import type { TrustedHtml } from "@nifrajs/web"
9
11
  import { createElement, type JSX, type VNode } from "preact"
10
12
 
11
13
  export interface ContentProps
12
14
  extends Omit<JSX.HTMLAttributes<HTMLElement>, "dangerouslySetInnerHTML"> {
13
15
  /** Trusted, pre-rendered HTML (e.g. `entry.html`). */
14
- readonly html: string
16
+ readonly html: TrustedHtml
15
17
  /** Wrapper element (default `"div"`). */
16
18
  readonly as?: string
17
19
  }