@nifrajs/web-react 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: this injects raw HTML, so the `html` MUST be trusted (your own Markdown/content, rendered
7
7
  * at 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 ComponentPropsWithoutRef, type ElementType, type ReactElement } from "react";
10
11
  export interface ContentProps extends Omit<ComponentPropsWithoutRef<"div">, "dangerouslySetInnerHTML" | "children"> {
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?: ElementType;
15
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../src/content.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,KAAK,wBAAwB,EAE7B,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,OAAO,CAAA;AAEd,MAAM,WAAW,YACf,SAAQ,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,yBAAyB,GAAG,UAAU,CAAC;IACrF,sDAAsD;IACtD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,CAAC,EAAE,WAAW,CAAA;CAC1B;AAED,4GAA4G;AAC5G,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,YAAY,GAAG,YAAY,CAEzE"}
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,EACL,KAAK,wBAAwB,EAE7B,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,OAAO,CAAA;AAEd,MAAM,WAAW,YACf,SAAQ,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,yBAAyB,GAAG,UAAU,CAAC;IACrF,sDAAsD;IACtD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;IAC1B,yCAAyC;IACzC,QAAQ,CAAC,EAAE,CAAC,EAAE,WAAW,CAAA;CAC1B;AAED,4GAA4G;AAC5G,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,YAAY,GAAG,YAAY,CAEzE"}
@@ -1 +1 @@
1
- {"version":3,"file":"content.js","sourceRoot":"","sources":["../src/content.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAEL,aAAa,GAGd,MAAM,OAAO,CAAA;AAUd,4GAA4G;AAC5G,MAAM,UAAU,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,IAAI,EAAgB;IACzD,OAAO,aAAa,CAAC,EAAE,IAAI,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,uBAAuB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;AAC3F,CAAC"}
1
+ {"version":3,"file":"content.js","sourceRoot":"","sources":["../src/content.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAEL,aAAa,GAGd,MAAM,OAAO,CAAA;AAUd,4GAA4G;AAC5G,MAAM,UAAU,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,IAAI,EAAgB;IACzD,OAAO,aAAa,CAAC,EAAE,IAAI,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,uBAAuB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;AAC3F,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nifrajs/web-react",
3
- "version": "3.2.0",
3
+ "version": "3.5.0",
4
4
  "description": "React render adapter for @nifrajs/web - SSR + hydration (Bun-native JSX, no Babel).",
5
5
  "keywords": [
6
6
  "bun",
@@ -87,10 +87,10 @@
87
87
  "access": "public"
88
88
  },
89
89
  "dependencies": {
90
- "@nifrajs/core": "3.2.0",
91
- "@nifrajs/i18n": "3.2.0",
92
- "@nifrajs/image": "3.2.0",
93
- "@nifrajs/web": "3.2.0"
90
+ "@nifrajs/core": "3.5.0",
91
+ "@nifrajs/i18n": "3.5.0",
92
+ "@nifrajs/image": "3.5.0",
93
+ "@nifrajs/web": "3.5.0"
94
94
  },
95
95
  "peerDependencies": {
96
96
  "react": "^19.0.0",
package/src/content.ts CHANGED
@@ -6,6 +6,8 @@
6
6
  * Security: this injects raw HTML, so the `html` MUST be trusted (your own Markdown/content, rendered
7
7
  * at 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 {
10
12
  type ComponentPropsWithoutRef,
11
13
  createElement,
@@ -16,7 +18,7 @@ import {
16
18
  export interface ContentProps
17
19
  extends Omit<ComponentPropsWithoutRef<"div">, "dangerouslySetInnerHTML" | "children"> {
18
20
  /** Trusted, pre-rendered HTML (e.g. `entry.html`). */
19
- readonly html: string
21
+ readonly html: TrustedHtml
20
22
  /** Wrapper element (default `"div"`). */
21
23
  readonly as?: ElementType
22
24
  }