Skip to content

Commit

Permalink
Prepare movement to shared package
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-gordon committed Feb 28, 2024
1 parent c9b9a4b commit a8a3798
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 2 deletions.
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion shared/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "./ImportDataFormType";
export * from "./src/ImportDataFormType";
File renamed without changes.
20 changes: 20 additions & 0 deletions shared/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"compilerOptions": {
"esModuleInterop": true,
"skipLibCheck": true,
"target": "es2022",
"allowJs": true,
"resolveJsonModule": true,
"moduleDetection": "force",
"isolatedModules": true,
"strict": true,
"noUncheckedIndexedAccess": true,
"composite": true,
"declarationMap": true,
"moduleResolution": "Node",
"module": "ESNext",
"noEmit": true,
"lib": ["es2022"]
},
"include": ["./index.ts", "src"]
}
14 changes: 14 additions & 0 deletions static/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ export async function getPng({ elements }: { elements: ElementDefinition[] }) {
window.cy.json({ elements });
window.cy.layout({ name: "grid" }).run();

// const themeEditor = getThemeEditor(doc);
// const { layout, style: themeStyle } = toTheme(themeEditor);
// const { style } = preprocessStyle(
// customCssOnly ? customCss : [themeStyle, customCss].join("\n")
// );
// window.cy
// .layout({
// ...layout,
// // @ts-ignore
// fit: true,
// padding: 20,
// })
// .run();

// json stringify the elements, and write them to a fixed position
// div on the page so we can read them out in the next step
const elementsDiv = document.createElement("div");
Expand Down
3 changes: 2 additions & 1 deletion static/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@sparticuz/chromium-min": "119.0.0",
"cytoscape": "^3.26.0",
"cytoscape-dagre": "^2.5.0",
"puppeteer-core": "21.5.1"
"puppeteer-core": "21.5.1",
"shared": "workspace:*"
}
}

0 comments on commit a8a3798

Please sign in to comment.