@typespec/playground 0.14.0-dev.6 → 0.14.0-dev.7
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/react/index.js
CHANGED
|
@@ -1895,7 +1895,7 @@ var output_view_module_default = {
|
|
|
1895
1895
|
var FileViewerComponent = ({ program, outputFiles, fileViewers }) => {
|
|
1896
1896
|
const [filename, setFilename] = useState("");
|
|
1897
1897
|
const [content, setContent] = useState("");
|
|
1898
|
-
const showFileTree = useMemo(() => outputFiles.some((f) => f.includes("/")) || outputFiles.length >= 3, [outputFiles]);
|
|
1898
|
+
const showFileTree = useMemo(() => outputFiles.length > 1 && (outputFiles.some((f) => f.includes("/")) || outputFiles.length >= 3), [outputFiles]);
|
|
1899
1899
|
const loadOutputFile = useCallback(async (path) => {
|
|
1900
1900
|
setContent((await program.host.readFile("./tsp-output/" + path)).text);
|
|
1901
1901
|
}, [program.host]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-viewer.d.ts","sourceRoot":"","sources":["../../../../src/react/output-view/file-viewer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAqB,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"file-viewer.d.ts","sourceRoot":"","sources":["../../../../src/react/output-view/file-viewer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAqB,aAAa,EAAE,MAAM,aAAa,CAAC;AAuFtF,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,gBAAgB,EAAE,GAAG,aAAa,CAU/E"}
|