diff --git a/app/web/src/nova/vi/render/script.tsx b/app/web/src/nova/vi/render/script.tsx index a1a48948..2a3e8a37 100644 --- a/app/web/src/nova/vi/render/script.tsx +++ b/app/web/src/nova/vi/render/script.tsx @@ -69,6 +69,33 @@ export const viEvalScript = ( ...exports, ...scope, }; + + if (meta.item.adv?.js?.includes("Table")) { + // meta.item.adv.jsBuilt = `render( + // React.createElement( + // React.Fragment, + // null, + // React.createElement(TableVirtuoso, { + // style: { height: "100%" }, + // data: isEditor ? [list.items[0]] : list.items, + // overscan: 500, + // endReached: typeof end_scroll == "function" ? end_scroll : void 0, + // components: { + // Table: ({ style: e, ...t }) => { + // React.createElement("table", { + // ...t, + // style: { ...e, width: "100%" }, + // }) + // }, + // }, + // itemContent: local.renderRow, + // }) + // ) + // ); + // `; + // scope.list.items = []; + console.log(scope.list); + } const fn = new Function( ...Object.keys(arg), `// ${meta.item.name}: ${meta.item.id} diff --git a/app/web/src/nova/vi/render/script/passprop.tsx b/app/web/src/nova/vi/render/script/passprop.tsx index 592bb457..8eee7849 100644 --- a/app/web/src/nova/vi/render/script/passprop.tsx +++ b/app/web/src/nova/vi/render/script/passprop.tsx @@ -11,6 +11,7 @@ export const createViPassProp = ( if (!meta.scope.val) { meta.scope.val = {}; } + for (const [k, v] of Object.entries(arg)) { if (k !== "children") { meta.scope.val[k] = v; diff --git a/app/web/src/utils/css/font.ts b/app/web/src/utils/css/font.ts index cd7df4c1..67d384e9 100644 --- a/app/web/src/utils/css/font.ts +++ b/app/web/src/utils/css/font.ts @@ -41,11 +41,14 @@ export const cssFont = ( ` color: ${font.color}; `, - ` - word-break: ${ - font.whitespace === "whitespace-normal" ? "break-word" : "normal" - }; + font.whitespace === "whitespace-normal" && + ` + word-break: break-word; `, + font.whitespace === "whitespace-nowrap" && + ` + white-space: nowrap; + `, font.color && ` color: ${font.color};