@tempots/dom 34.3.0 → 35.0.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/index.js CHANGED
@@ -2498,8 +2498,12 @@ function Ys({
2498
2498
  return Wt.iframe(
2499
2499
  T.src(t),
2500
2500
  T.name(e),
2501
- T.width(s != null ? w.map(s, String) : void 0),
2502
- T.height(n != null ? w.map(n, String) : void 0),
2501
+ T.width(
2502
+ s != null ? w.map(s, String) : void 0
2503
+ ),
2504
+ T.height(
2505
+ n != null ? w.map(n, String) : void 0
2506
+ ),
2503
2507
  T.sandbox(r),
2504
2508
  T.allow(o),
2505
2509
  T.referrerpolicy(i),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tempots/dom",
3
- "version": "34.3.0",
3
+ "version": "35.0.0",
4
4
  "type": "module",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
@@ -37,6 +37,6 @@
37
37
  "url": "git+https://github.com/fponticelli/tempots.git"
38
38
  },
39
39
  "peerDependencies": {
40
- "@tempots/core": "^1.2.0"
40
+ "@tempots/core": "^2.0.0"
41
41
  }
42
42
  }
@@ -1,4 +1,4 @@
1
- import { TNode, Value } from '../types/domain';
1
+ import { SplitValue, TNode, Value } from '../types/domain';
2
2
  export type ReferrerPolicy = 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
3
3
  export interface IFrameOptions {
4
4
  /**
@@ -12,11 +12,11 @@ export interface IFrameOptions {
12
12
  /**
13
13
  * The width of the iframe.
14
14
  */
15
- width?: Value<string | number>;
15
+ width?: SplitValue<string | number>;
16
16
  /**
17
17
  * The height of the iframe.
18
18
  */
19
- height?: Value<string | number>;
19
+ height?: SplitValue<string | number>;
20
20
  /**
21
21
  * The sandbox attribute for the iframe.
22
22
  */
package/types/domain.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { ReadSignal } from '../../../tempots-core/dist/signal';
1
2
  import { DOMContext } from '../dom/dom-context';
2
3
  import { AnySignal, Computed, Prop, Signal, Value, ValueType, BaseValueType, ValueTypes, Values, RemoveSignals, Nil, Clear, ProviderMark, makeProviderMark, Renderable as CoreRenderable } from '@tempots/core';
3
4
  export type { Clear, ProviderMark, ValueType, BaseValueType, ValueTypes, Values, RemoveSignals, Nil, AnySignal, };
@@ -127,7 +128,7 @@ export declare const domRenderable: <CTX extends DOMContext = DOMContext>(render
127
128
  * @template CTX - The type of DOMContext (defaults to DOMContext)
128
129
  * @public
129
130
  */
130
- export type TNode<CTX extends DOMContext = DOMContext> = Renderable<CTX> | Value<string> | undefined | null | Renderable<CTX>[];
131
+ export type TNode<CTX extends DOMContext = DOMContext> = Renderable<CTX> | string | ReadSignal<string> | undefined | null | Renderable<CTX>[];
131
132
  /**
132
133
  * Represents a collection of providers.
133
134
  * The keys of the record are ProviderMark types, and the values are of unknown type.
@@ -156,6 +157,7 @@ export type Size = {
156
157
  * @typeParam T - The type of the value.
157
158
  * @public
158
159
  */
159
- export type NValue<T> = Value<NonNullable<T>> | AnySignal<T> | AnySignal<T | null> | AnySignal<T | undefined> | AnySignal<T | null | undefined> | null | undefined;
160
+ export type NValue<T> = Value<NonNullable<T>> | ReadSignal<T> | ReadSignal<T | null> | ReadSignal<T | undefined> | ReadSignal<T | null | undefined> | null | undefined;
160
161
  type TupleToUnion<T extends unknown[]> = T[number];
161
162
  export type SplitNValue<T> = (T extends unknown ? TupleToUnion<NValue<T>[]> : never) | NValue<T>;
163
+ export type SplitValue<T> = (T extends unknown ? TupleToUnion<Value<T>[]> : never) | Value<T>;