@opentui/solid 0.1.92 → 0.1.94
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 +11 -10
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -966,6 +966,7 @@ var TimeToFirstDraw = (props) => {
|
|
|
966
966
|
// src/plugins/slot.tsx
|
|
967
967
|
import { createSlotRegistry } from "@opentui/core";
|
|
968
968
|
import { children, createMemo as createMemo3, createSignal as createSignal2, ErrorBoundary, For, onCleanup as onCleanup3, splitProps as splitProps2 } from "solid-js";
|
|
969
|
+
var EMPTY_ENTRY_IDS = [];
|
|
969
970
|
function createSolidSlotRegistry(renderer, context, options = {}) {
|
|
970
971
|
return createSlotRegistry(renderer, "solid:slot-registry", context, options);
|
|
971
972
|
}
|
|
@@ -1025,16 +1026,9 @@ function Slot(props) {
|
|
|
1025
1026
|
const entryIds = createMemo3(() => entries().map((entry) => entry.id));
|
|
1026
1027
|
const entriesById = createMemo3(() => new Map(entries().map((entry) => [entry.id, entry])));
|
|
1027
1028
|
const slotName = () => String(local.name);
|
|
1028
|
-
let fallbackView;
|
|
1029
1029
|
const renderFallback = () => {
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
const resolvedFallbackChildren = children(() => local.children);
|
|
1033
|
-
fallbackView = () => {
|
|
1034
|
-
const value = resolvedFallbackChildren();
|
|
1035
|
-
return value ?? null;
|
|
1036
|
-
};
|
|
1037
|
-
return fallbackView();
|
|
1030
|
+
const value = children(() => local.children)();
|
|
1031
|
+
return value ?? null;
|
|
1038
1032
|
};
|
|
1039
1033
|
const resolveFallback = (fallbackValue) => fallbackValue?.() ?? null;
|
|
1040
1034
|
const renderPluginFailurePlaceholder = (failure, fallbackValue) => {
|
|
@@ -1099,9 +1093,16 @@ function Slot(props) {
|
|
|
1099
1093
|
return renderEntry(resolvedEntry);
|
|
1100
1094
|
});
|
|
1101
1095
|
};
|
|
1096
|
+
const appendEntryIds = createMemo3(() => {
|
|
1097
|
+
const mode = local.mode ?? "append";
|
|
1098
|
+
if (mode !== "append") {
|
|
1099
|
+
return EMPTY_ENTRY_IDS;
|
|
1100
|
+
}
|
|
1101
|
+
return entryIds();
|
|
1102
|
+
});
|
|
1102
1103
|
const appendView = [renderFallback, createComponent2(For, {
|
|
1103
1104
|
get each() {
|
|
1104
|
-
return
|
|
1105
|
+
return appendEntryIds();
|
|
1105
1106
|
},
|
|
1106
1107
|
children: (entryId) => createComponent2(AppendEntry, {
|
|
1107
1108
|
entryId
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"version": "0.1.
|
|
7
|
+
"version": "0.1.94",
|
|
8
8
|
"description": "SolidJS renderer for OpenTUI",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@babel/core": "7.28.0",
|
|
37
37
|
"@babel/preset-typescript": "7.27.1",
|
|
38
|
-
"@opentui/core": "0.1.
|
|
38
|
+
"@opentui/core": "0.1.94",
|
|
39
39
|
"babel-plugin-module-resolver": "5.0.2",
|
|
40
40
|
"babel-preset-solid": "1.9.10",
|
|
41
41
|
"entities": "7.0.1",
|