@reactive-web-components/rwc 2.51.13 → 2.52.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/main.d.ts CHANGED
@@ -0,0 +1,26 @@
1
+ import { CompFuncContent, ComponentConfig } from './shared/types';
2
+ import { ReactiveSignal } from './shared/utils';
3
+ export declare function newrenderIf<Content extends CompFuncContent, ElseContent extends CompFuncContent>(condition: boolean, content: Content, elseContent: ElseContent): ReturnType<Content> | ReturnType<ElseContent>;
4
+ export declare function newrenderIf<Content extends CompFuncContent>(condition: boolean, content: Content): ReturnType<Content> | ComponentConfig<HTMLDivElement>;
5
+ export declare function newrxRenderIf<Content extends CompFuncContent, ElseContent extends CompFuncContent>(condition: ReactiveSignal<any> | (() => boolean), content: Content, elseContent: ElseContent): ReturnType<Content> | ReturnType<ElseContent>;
6
+ export declare function newrxRenderIf<Content extends CompFuncContent>(condition: ReactiveSignal<any> | (() => boolean), content: Content): ReturnType<Content> | ComponentConfig<HTMLDivElement>;
7
+ /**
8
+ *
9
+ export const renderIf = (
10
+ condition: boolean,
11
+ content: CompFuncContent,
12
+ elseContent?: CompFuncContent,
13
+ ) =>
14
+ condition
15
+ ? getSignalContent(content)
16
+ : elseContent
17
+ ? getSignalContent(elseContent)
18
+ : createEl('div')().setAttribute("id", "empty_div_renderIf").addStyle({ display: "none" });
19
+
20
+ export const rxRenderIf = (
21
+ condition: ReactiveSignal<any> | (() => boolean),
22
+ content: CompFuncContent,
23
+ elseContent?: CompFuncContent,
24
+ ) =>
25
+ getSignalContent(() => renderIf(Boolean(condition()), content, elseContent));
26
+ */
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@reactive-web-components/rwc",
3
- "version": "2.51.13",
3
+ "version": "2.52.0",
4
4
  "type": "module",
5
5
  "types": "./shared/index.d.ts",
6
6
  "exports": {
7
7
  ".": {
8
8
  "types": "./shared/index.d.ts",
9
- "import": "./reactive-web-component.DGf546s3.js",
10
- "require": "./reactive-web-component.CMl3NnC3.umd.cjs"
9
+ "import": "./reactive-web-component.B3EcXnMG.js",
10
+ "require": "./reactive-web-component.DLpZ2nci.umd.cjs"
11
11
  }
12
12
  },
13
13
  "author": "tamazyanarsen",
@@ -34,6 +34,6 @@
34
34
  "ui",
35
35
  "frontend"
36
36
  ],
37
- "module": "./reactive-web-component.DGf546s3.js",
38
- "main": "./reactive-web-component.CMl3NnC3.umd.cjs"
37
+ "module": "./reactive-web-component.B3EcXnMG.js",
38
+ "main": "./reactive-web-component.DLpZ2nci.umd.cjs"
39
39
  }