@tempots/dom 35.0.0 → 35.0.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tempots/dom",
3
- "version": "35.0.0",
3
+ "version": "35.0.1",
4
4
  "type": "module",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
@@ -35,8 +35,5 @@
35
35
  "repository": {
36
36
  "type": "git",
37
37
  "url": "git+https://github.com/fponticelli/tempots.git"
38
- },
39
- "peerDependencies": {
40
- "@tempots/core": "^2.0.0"
41
38
  }
42
39
  }
@@ -96,8 +96,8 @@ export declare const WithProvider: (fn: (opts: ProviderOptions) => TNode | void)
96
96
  * )
97
97
  * ```
98
98
  *
99
- * @template T - The type of value provided by the provider
100
- * @template O - The type of options passed to the provider
99
+ * @typeParam T - The type of value provided by the provider
100
+ * @typeParam O - The type of options passed to the provider
101
101
  * @param provider - The provider definition containing mark and create function
102
102
  * @param options - Options to pass to the provider's create function
103
103
  * @param child - Function that returns the child components that can access the provider
@@ -153,7 +153,7 @@ export declare const Provide: <T, O>(provider: Provider<T, O>, options: O, child
153
153
  * )
154
154
  * ```
155
155
  *
156
- * @template T - The type of value provided by the provider
156
+ * @typeParam T - The type of value provided by the provider
157
157
  * @param provider - The provider to consume (must be available in parent components)
158
158
  * @param child - Function that receives the provider value and returns content to render
159
159
  * @returns A renderable that consumes the provider and renders the child content
@@ -226,7 +226,7 @@ export declare const Use: <T>(provider: Provider<T>, child: (provider: T) => TNo
226
226
  * )
227
227
  * ```
228
228
  *
229
- * @template T - Tuple type representing the types of all providers
229
+ * @typeParam T - Tuple type representing the types of all providers
230
230
  * @param providers - Variable number of providers to consume
231
231
  * @returns Function that takes a child function and returns a renderable
232
232
  * @throws {ProviderNotFoundError} When any of the providers is not found in the component tree
package/types/domain.d.ts CHANGED
@@ -56,7 +56,7 @@ export declare const DOM_RENDERABLE_TYPE: unique symbol;
56
56
  * }
57
57
  * ```
58
58
  *
59
- * @template CTX - The type of DOMContext (defaults to DOMContext)
59
+ * @typeParam CTX - The type of DOMContext (defaults to DOMContext)
60
60
  * @public
61
61
  */
62
62
  export type Renderable<CTX extends DOMContext = DOMContext> = CoreRenderable<CTX, typeof DOM_RENDERABLE_TYPE>;
@@ -125,7 +125,7 @@ export declare const domRenderable: <CTX extends DOMContext = DOMContext>(render
125
125
  * }
126
126
  * ```
127
127
  *
128
- * @template CTX - The type of DOMContext (defaults to DOMContext)
128
+ * @typeParam CTX - The type of DOMContext (defaults to DOMContext)
129
129
  * @public
130
130
  */
131
131
  export type TNode<CTX extends DOMContext = DOMContext> = Renderable<CTX> | string | ReadSignal<string> | undefined | null | Renderable<CTX>[];
@@ -1,6 +1,10 @@
1
1
  /**
2
2
  * Represents the HTML attributes that can be used in an HTML element.
3
3
  *
4
+ * **Security Warning:** Some properties like `innerHTML` and `outerHTML` can introduce
5
+ * Cross-Site Scripting (XSS) vulnerabilities if used with untrusted user input.
6
+ * Always sanitize user-provided content before using these properties.
7
+ *
4
8
  * @public
5
9
  */
6
10
  export type HTMLAttributes = {
@@ -148,7 +152,16 @@ export type HTMLAttributes = {
148
152
  wrap: string;
149
153
  textContent: string;
150
154
  innerText: string;
155
+ /**
156
+ * **⚠️ XSS Warning:** Setting innerHTML with untrusted user input can lead to
157
+ * Cross-Site Scripting (XSS) attacks. Always sanitize content before use.
158
+ * Consider using `textContent` or `innerText` for plain text content instead.
159
+ */
151
160
  innerHTML: string;
161
+ /**
162
+ * **⚠️ XSS Warning:** Setting outerHTML with untrusted user input can lead to
163
+ * Cross-Site Scripting (XSS) attacks. Always sanitize content before use.
164
+ */
152
165
  outerHTML: string;
153
166
  };
154
167
  /**