FIX: Biome automatic updates
This commit is contained in:
committed by
Nicolás Hatcher Andrés
parent
3d970acc34
commit
bc9fefcb70
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
"organizeImports": { "enabled": true },
|
|
||||||
"linter": {
|
"linter": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"rules": {
|
"rules": {
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
"@ironcalc/ironcalc": "file:../../IronCalc",
|
"@ironcalc/ironcalc": "file:../../IronCalc",
|
||||||
"@ironcalc/workbook": "^0.3.1",
|
"@ironcalc/workbook": "^0.6.0",
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
import "./App.css";
|
import "./App.css";
|
||||||
import styled from "@emotion/styled";
|
import styled from "@emotion/styled";
|
||||||
|
// From IronCalc
|
||||||
|
import { IronCalc, IronCalcIcon, init, Model } from "@ironcalc/workbook";
|
||||||
|
import { Modal } from "@mui/material";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { FileBar } from "./components/FileBar";
|
import { FileBar } from "./components/FileBar";
|
||||||
import LeftDrawer from "./components/LeftDrawer/LeftDrawer";
|
import LeftDrawer from "./components/LeftDrawer/LeftDrawer";
|
||||||
import WelcomeDialog from "./components/WelcomeDialog/WelcomeDialog";
|
|
||||||
import {
|
import {
|
||||||
get_documentation_model,
|
get_documentation_model,
|
||||||
get_model,
|
get_model,
|
||||||
@@ -20,11 +22,8 @@ import {
|
|||||||
saveSelectedModelInStorage,
|
saveSelectedModelInStorage,
|
||||||
selectModelFromStorage,
|
selectModelFromStorage,
|
||||||
} from "./components/storage";
|
} from "./components/storage";
|
||||||
|
|
||||||
// From IronCalc
|
|
||||||
import { IronCalc, IronCalcIcon, Model, init } from "@ironcalc/workbook";
|
|
||||||
import { Modal } from "@mui/material";
|
|
||||||
import TemplatesDialog from "./components/WelcomeDialog/TemplatesDialog";
|
import TemplatesDialog from "./components/WelcomeDialog/TemplatesDialog";
|
||||||
|
import WelcomeDialog from "./components/WelcomeDialog/WelcomeDialog";
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
const [model, setModel] = useState<Model | null>(null);
|
const [model, setModel] = useState<Model | null>(null);
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ import { PanelLeftClose, PanelLeftOpen } from "lucide-react";
|
|||||||
import { useLayoutEffect, useRef, useState } from "react";
|
import { useLayoutEffect, useRef, useState } from "react";
|
||||||
import { FileMenu } from "./FileMenu";
|
import { FileMenu } from "./FileMenu";
|
||||||
import { HelpMenu } from "./HelpMenu";
|
import { HelpMenu } from "./HelpMenu";
|
||||||
|
import { downloadModel } from "./rpc";
|
||||||
import { ShareButton } from "./ShareButton";
|
import { ShareButton } from "./ShareButton";
|
||||||
import ShareWorkbookDialog from "./ShareWorkbookDialog";
|
import ShareWorkbookDialog from "./ShareWorkbookDialog";
|
||||||
import { WorkbookTitle } from "./WorkbookTitle";
|
|
||||||
import { downloadModel } from "./rpc";
|
|
||||||
import { updateNameSelectedWorkbook } from "./storage";
|
import { updateNameSelectedWorkbook } from "./storage";
|
||||||
|
import { WorkbookTitle } from "./WorkbookTitle";
|
||||||
|
|
||||||
// This hook is used to get the width of the window
|
// This hook is used to get the width of the window
|
||||||
function useWindowWidth() {
|
function useWindowWidth() {
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ import { Menu, MenuItem, Modal } from "@mui/material";
|
|||||||
import { FileDown, FileUp, Plus, Table2, Trash2 } from "lucide-react";
|
import { FileDown, FileUp, Plus, Table2, Trash2 } from "lucide-react";
|
||||||
import { useRef, useState } from "react";
|
import { useRef, useState } from "react";
|
||||||
import DeleteWorkbookDialog from "./DeleteWorkbookDialog";
|
import DeleteWorkbookDialog from "./DeleteWorkbookDialog";
|
||||||
import UploadFileDialog from "./UploadFileDialog";
|
|
||||||
// import TemplatesDialog from "./WelcomeDialog/TemplatesDialog";
|
// import TemplatesDialog from "./WelcomeDialog/TemplatesDialog";
|
||||||
import { getModelsMetadata, getSelectedUuid } from "./storage";
|
import { getModelsMetadata, getSelectedUuid } from "./storage";
|
||||||
|
import UploadFileDialog from "./UploadFileDialog";
|
||||||
|
|
||||||
export function FileMenu(props: {
|
export function FileMenu(props: {
|
||||||
newModel: () => void;
|
newModel: () => void;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { Model } from "@ironcalc/workbook";
|
import type { Model } from "@ironcalc/workbook";
|
||||||
import { Button, Dialog, TextField, styled } from "@mui/material";
|
import { Button, Dialog, styled, TextField } from "@mui/material";
|
||||||
import { Check, Copy, GlobeLock } from "lucide-react";
|
import { Check, Copy, GlobeLock } from "lucide-react";
|
||||||
import { QRCodeSVG } from "qrcode.react";
|
import { QRCodeSVG } from "qrcode.react";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ import { IronCalcIconWhite as IronCalcIcon } from "@ironcalc/workbook";
|
|||||||
import { styled } from "@mui/material";
|
import { styled } from "@mui/material";
|
||||||
import { Table, X } from "lucide-react";
|
import { Table, X } from "lucide-react";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import TemplatesListItem from "./TemplatesListItem";
|
|
||||||
|
|
||||||
import TemplatesList, {
|
import TemplatesList, {
|
||||||
Cross,
|
Cross,
|
||||||
DialogContent,
|
DialogContent,
|
||||||
@@ -12,6 +10,7 @@ import TemplatesList, {
|
|||||||
DialogWrapper,
|
DialogWrapper,
|
||||||
TemplatesListWrapper,
|
TemplatesListWrapper,
|
||||||
} from "./TemplatesList";
|
} from "./TemplatesList";
|
||||||
|
import TemplatesListItem from "./TemplatesListItem";
|
||||||
|
|
||||||
function WelcomeDialog(properties: {
|
function WelcomeDialog(properties: {
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ function sanitizeFileName(name: string): string {
|
|||||||
|
|
||||||
export async function uploadFile(
|
export async function uploadFile(
|
||||||
arrayBuffer: ArrayBuffer,
|
arrayBuffer: ArrayBuffer,
|
||||||
fileName: string
|
fileName: string,
|
||||||
): Promise<Blob> {
|
): Promise<Blob> {
|
||||||
// Fetch request to upload the file
|
// Fetch request to upload the file
|
||||||
const response = await fetch(`/api/upload/${fileName}`, {
|
const response = await fetch(`/api/upload/${fileName}`, {
|
||||||
@@ -40,15 +40,15 @@ export async function uploadFile(
|
|||||||
|
|
||||||
export async function get_model(modelHash: string): Promise<Uint8Array> {
|
export async function get_model(modelHash: string): Promise<Uint8Array> {
|
||||||
return new Uint8Array(
|
return new Uint8Array(
|
||||||
await (await fetch(`/api/model/${modelHash}`)).arrayBuffer()
|
await (await fetch(`/api/model/${modelHash}`)).arrayBuffer(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function get_documentation_model(
|
export async function get_documentation_model(
|
||||||
filename: string
|
filename: string,
|
||||||
): Promise<Uint8Array> {
|
): Promise<Uint8Array> {
|
||||||
return new Uint8Array(
|
return new Uint8Array(
|
||||||
await (await fetch(`/models/${filename}.ic`)).arrayBuffer()
|
await (await fetch(`/models/${filename}.ic`)).arrayBuffer(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user