solid-ctrl-flow 1.0.6 → 1.0.7

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/index.d.ts CHANGED
@@ -95,6 +95,12 @@ export declare namespace Debug {
95
95
  */
96
96
  export declare function memoProps<T, K extends readonly (keyof T)[] = (keyof T)[]>(obj: T, keys?: K): Pick<T, K[number]>;
97
97
 
98
+ /** Wraps an element with a div with the specified {@link JSX.CustomAttributes.classList} if at least one of them is `true` */
99
+ export declare function OptionalWrapper(props: {
100
+ classList: Record<string, boolean | undefined>;
101
+ children: JSX.Element;
102
+ }): JSX.Element;
103
+
98
104
  /**
99
105
  * Esecutes {@link splitProps} and memoizes the first of the two returned objects
100
106
  * @param obj Object to split and partially memoize
@@ -125,10 +131,4 @@ export declare function When<T>(props: {
125
131
  children: (x: NonNullable<T>) => JSX.Element;
126
132
  }): JSX.Element;
127
133
 
128
- /** Wraps an element with a div with the specified {@link JSX.CustomAttributes.classList} if at least one of them is `true` */
129
- export declare function Wrapper(props: {
130
- classList: Record<string, boolean | undefined>;
131
- children: JSX.Element;
132
- }): JSX.Element;
133
-
134
134
  export { }
package/dist/index.mjs CHANGED
@@ -336,7 +336,7 @@ function Joint(props) {
336
336
  });
337
337
  }
338
338
  const _tmpl$ = /* @__PURE__ */ template(`<div>`);
339
- function Wrapper(props) {
339
+ function OptionalWrapper(props) {
340
340
  const classList = createMemo(() => Object.entries(props.classList).filter((x) => x[1]).map((x) => x[0]));
341
341
  const children = createMemo(() => props.children);
342
342
  return createComponent(Show, {
@@ -369,8 +369,8 @@ function splitAndMemoProps(obj, keys) {
369
369
  export {
370
370
  Case,
371
371
  Debug,
372
+ OptionalWrapper,
372
373
  When,
373
- Wrapper,
374
374
  createExtractor,
375
375
  memoProps,
376
376
  splitAndMemoProps
package/dist/index.umd.js CHANGED
@@ -338,7 +338,7 @@
338
338
  });
339
339
  }
340
340
  const _tmpl$ = /* @__PURE__ */ template(`<div>`);
341
- function Wrapper(props) {
341
+ function OptionalWrapper(props) {
342
342
  const classList = solidJs.createMemo(() => Object.entries(props.classList).filter((x) => x[1]).map((x) => x[0]));
343
343
  const children = solidJs.createMemo(() => props.children);
344
344
  return solidJs.createComponent(solidJs.Show, {
@@ -370,8 +370,8 @@
370
370
  }
371
371
  exports2.Case = Case;
372
372
  exports2.Debug = Debug;
373
+ exports2.OptionalWrapper = OptionalWrapper;
373
374
  exports2.When = When;
374
- exports2.Wrapper = Wrapper;
375
375
  exports2.createExtractor = createExtractor;
376
376
  exports2.memoProps = memoProps;
377
377
  exports2.splitAndMemoProps = splitAndMemoProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solid-ctrl-flow",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Control flow components for solid-js",
5
5
  "author": "AFatNiBBa",
6
6
  "license": "ISC",