From f1a6dfb249df6e2147956d85da66e3c946519782 Mon Sep 17 00:00:00 2001 From: sawka Date: Mon, 15 Apr 2024 22:59:13 -0700 Subject: [PATCH] testing frame component --- package.json | 1 + src/plugins/waveapp/waveapp.tsx | 5 +++-- yarn.lock | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 55ebfc178..c24206692 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "papaparse": "^5.4.1", "react": "^18.1.0", "react-dom": "^18.1.0", + "react-frame-component": "^5.2.6", "react-markdown": "^9.0.0", "remark": "^15.0.1", "remark-gfm": "^4.0.0", diff --git a/src/plugins/waveapp/waveapp.tsx b/src/plugins/waveapp/waveapp.tsx index 24955993c..e23503f55 100644 --- a/src/plugins/waveapp/waveapp.tsx +++ b/src/plugins/waveapp/waveapp.tsx @@ -9,6 +9,7 @@ import { boundMethod } from "autobind-decorator"; import { JsonLinesDataBuffer } from "../core/ptydata"; import { Markdown } from "@/elements"; import * as ijson from "@/util/ijson"; +import Frame from "react-frame-component"; import "./waveapp.less"; @@ -67,7 +68,7 @@ class WaveAppHtmlTag extends React.Component<{ node: WaveAppNode }, {}> { } } } - let childrenComps = []; + let childrenComps: (string | JSX.Element)[] = []; if (children != null) { for (let idx = 0; idx < children.length; idx++) { let comp = convertNodeToTag(children[idx], idx); @@ -238,7 +239,7 @@ class WaveAppRenderer extends React.Component<{ model: WaveAppRendererModel }, { } return (
- {convertNodeToTag(node)} + {convertNodeToTag(node)}
); } diff --git a/yarn.lock b/yarn.lock index 3151815d7..248b12933 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6901,6 +6901,11 @@ react-error-boundary@^3.1.4: dependencies: "@babel/runtime" "^7.12.5" +react-frame-component@^5.2.6: + version "5.2.6" + resolved "https://registry.yarnpkg.com/react-frame-component/-/react-frame-component-5.2.6.tgz#0d9991d251ff1f7177479d8f370deea06b824b79" + integrity sha512-CwkEM5VSt6nFwZ1Op8hi3JB5rPseZlmnp5CGiismVTauE6S4Jsc4TNMlT0O7Cts4WgIC3ZBAQ2p1Mm9XgLbj+w== + react-is@^16.13.1: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"