solid-ctrl-flow 1.0.45 → 1.0.46

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
@@ -1,5 +1,4 @@
1
1
  import { Accessor } from 'solid-js';
2
- import { ComponentProps } from 'solid-js';
3
2
  import { Context } from 'solid-js';
4
3
  import { EffectFunction } from 'solid-js';
5
4
  import { JSX } from 'solid-js';
@@ -8,9 +7,7 @@ import { Owner } from 'solid-js';
8
7
  import { ParentProps } from 'solid-js';
9
8
  import { Resource } from 'solid-js';
10
9
  import { Setter } from 'solid-js';
11
- import { Show } from 'solid-js';
12
10
  import { Signal } from 'solid-js';
13
- import { Without } from 'logic-types';
14
11
 
15
12
  /** Type hack for making {@link ReactiveContext} implement {@link Accessor} */
16
13
  declare const BASE_CTOR: new <T>() => Accessor<T>;
@@ -142,31 +139,6 @@ export declare function Enfold<T>(props: Keyed<T>): JSX.Element;
142
139
 
143
140
  export declare function Enfold<T>(props: Unkeyed<T>): JSX.Element;
144
141
 
145
- /**
146
- * It works like a `Show`, but for `Switch`es, you can wrap `Match`es with it in order to not trigger them in certain conditions.
147
- * It doesn't support the `fallback` attribute.
148
- * Example:
149
- * ```tsx
150
- * const value = false;
151
- * return <>
152
- * <Switch>
153
- * <Match when={false}>
154
- * FALSE
155
- * </Match>
156
- * <Ensure when={false}>
157
- * <Match when>
158
- * This won't render because "value" is {false}
159
- * </Match>
160
- * </Ensure>
161
- * <Match when>
162
- * (This will render)
163
- * </Match>
164
- * </Switch>
165
- * <>
166
- * ```
167
- */
168
- export declare function Ensure(props: Without<ComponentProps<typeof Show>, "fallback">): JSX.Element;
169
-
170
142
  /** Handy type alias */
171
143
  declare type Equals = MemoOptions<unknown>["equals"];
172
144
 
package/dist/index.mjs CHANGED
@@ -244,16 +244,6 @@ function Case(props) {
244
244
  }
245
245
  }, other));
246
246
  }
247
- function Ensure(props) {
248
- return createComponent(Show, mergeProps(props, {
249
- get fallback() {
250
- return createComponent(Match, {
251
- when: false,
252
- children: void 0
253
- });
254
- }
255
- }));
256
- }
257
247
  const IDENTITY = (x) => x;
258
248
  function bind(source, dest, to = IDENTITY, skip = false) {
259
249
  const d = createRoot((d2) => (createRenderEffect(on(source, (x) => skip ? skip = false : dest((prev) => to(x, prev)))), d2));
@@ -301,7 +291,6 @@ function SameContext(props) {
301
291
  export {
302
292
  Case,
303
293
  Enfold,
304
- Ensure,
305
294
  Nest,
306
295
  On,
307
296
  ReactiveContext,
package/dist/index.umd.js CHANGED
@@ -246,16 +246,6 @@
246
246
  }
247
247
  }, other));
248
248
  }
249
- function Ensure(props) {
250
- return solidJs.createComponent(solidJs.Show, solidJs.mergeProps(props, {
251
- get fallback() {
252
- return solidJs.createComponent(solidJs.Match, {
253
- when: false,
254
- children: void 0
255
- });
256
- }
257
- }));
258
- }
259
249
  const IDENTITY = (x) => x;
260
250
  function bind(source, dest, to = IDENTITY, skip = false) {
261
251
  const d = solidJs.createRoot((d2) => (solidJs.createRenderEffect(solidJs.on(source, (x) => skip ? skip = false : dest((prev) => to(x, prev)))), d2));
@@ -302,7 +292,6 @@
302
292
  }
303
293
  exports2.Case = Case;
304
294
  exports2.Enfold = Enfold;
305
- exports2.Ensure = Ensure;
306
295
  exports2.Nest = Nest;
307
296
  exports2.On = On;
308
297
  exports2.ReactiveContext = ReactiveContext;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solid-ctrl-flow",
3
- "version": "1.0.45",
3
+ "version": "1.0.46",
4
4
  "description": "Control flow components for solid-js",
5
5
  "author": "AFatNiBBa",
6
6
  "license": "ISC",
package/readMe.md CHANGED
@@ -100,27 +100,6 @@ return <>
100
100
  </>
101
101
  ```
102
102
 
103
- ### `Ensure`
104
- It works like a `Show`, but for `Switch`es, you can wrap `Match`es with it in order to not trigger them in certain conditions
105
- ```tsx
106
- const value = false;
107
- return <>
108
- <Switch>
109
- <Match when={false}>
110
- FALSE
111
- </Match>
112
- <Ensure when={false}>
113
- <Match when>
114
- This won't render because "value" is {false}
115
- </Match>
116
- </Ensure>
117
- <Match when>
118
- (This will render)
119
- </Match>
120
- </Switch>
121
- <>
122
- ```
123
-
124
103
  ### `createExtractor()`
125
104
  Creates a context for components that may need to be out of their parent in certain conditions.
126
105
  If you have this component