solid-ctrl-flow 1.0.3 → 1.0.5

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.
@@ -73,15 +73,14 @@ function Source(props) {
73
73
  return props.children;
74
74
  if (obj.source)
75
75
  throw new Error("An extractor can't have more than one source");
76
- const memo = createMemo(() => props.children);
77
- obj.source = createMemo(memo);
76
+ obj.source = () => props.children;
78
77
  onCleanup(() => obj.source = void 0);
79
78
  return createComponent(Show, {
80
79
  get when() {
81
80
  return !obj.attached;
82
81
  },
83
82
  get children() {
84
- return memo();
83
+ return obj.source();
85
84
  }
86
85
  });
87
86
  }
@@ -1,5 +1,5 @@
1
1
  (function(global, factory) {
2
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("solid-js"), require("solid-js/store")) : typeof define === "function" && define.amd ? define(["exports", "solid-js", "solid-js/store"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.solidFlow = {}, global.solidJs, global.solidJsStore));
2
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("solid-js"), require("solid-js/store")) : typeof define === "function" && define.amd ? define(["exports", "solid-js", "solid-js/store"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.solidCtrlFlow = {}, global.solidJs, global.solidJsStore));
3
3
  })(this, function(exports2, solidJs, store) {
4
4
  "use strict";
5
5
  const ctx$1 = solidJs.createContext(() => void 0, {
@@ -75,15 +75,14 @@
75
75
  return props.children;
76
76
  if (obj.source)
77
77
  throw new Error("An extractor can't have more than one source");
78
- const memo = solidJs.createMemo(() => props.children);
79
- obj.source = solidJs.createMemo(memo);
78
+ obj.source = () => props.children;
80
79
  solidJs.onCleanup(() => obj.source = void 0);
81
80
  return solidJs.createComponent(solidJs.Show, {
82
81
  get when() {
83
82
  return !obj.attached;
84
83
  },
85
84
  get children() {
86
- return memo();
85
+ return obj.source();
87
86
  }
88
87
  });
89
88
  }
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "solid-ctrl-flow",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Control flow components for solid-js",
5
5
  "author": "AFatNiBBa",
6
6
  "license": "ISC",
7
- "types": "./dist/flow.d.ts",
7
+ "types": "./dist/index.d.ts",
8
8
  "exports": {
9
- "require": "./dist/flow.umd.js",
10
- "import": "./dist/flow.mjs",
11
- "types": "./dist/flow.d.ts"
9
+ "require": "./dist/index.umd.js",
10
+ "import": "./dist/index.mjs",
11
+ "types": "./dist/index.d.ts"
12
12
  },
13
13
  "scripts": {
14
14
  "build": "vite build",
File without changes