mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-23 06:08:12 +08:00
* Make `tauri build` just work * Move folder: frontend/wasm -> wasm * Create SvelteKit project with 'npx create-svelte' * Move wasm-communication into seperate npm package * Use wasm-pack directly and pack package.json * Got it to work * Add primitive build script for wasm npm module * Fix wasm build script (python) * Clean up glue code * Rewrite wasm build script in node.js * Add serde-reflection to trace types * Add traced types * Generate typescript (.d.ts) from Rust types * Update .d.ts * Finalize TS types * Add script to update .d.ts * Add watch command to build wasm-bindgen * Make wasm work again * Add sass; fix build script for windows * Describe requirement for wasm-pack * Add license * Copy and reorganize vue components * translate LayoutCol.vue * Split app.scss into pieces * Translate LayoutRow.svelte * Rename scss files * Fix compile issues on Windows * WIP port TitleBar * Support classes for LayoutCol/Row * Restructure based on Vue codebase * Port all components in window folder * Port FloatingMenu * Port Document panel component * Update readme after folder move * Update typegen: print discriminant by default * Update typegen: Merge from branch 'tailwind' 4f14fedb Fixes bigint & bytes * Made Vue/webpack/eslint to accept wasm package at new location This is quite a hack. Those two packages are both named the same. Yes, it's an npm package inside another npm package. - frontend/src/wasm-communication/ - frontend-svelte/glue/ 'wasm/pkg/index.js' imports the correct one registered when linking. * Port LayerTree * Port NodeGraph * Port Properties * Port components in /floating-menus * Finish porting all Vue -> Svelte components * Change import prefix * Revert type generation * Revert moved wasm folder * Revert all of @locriacyber's work on this branch - Remove Vite and restore Webpack - Remove SvelteKit - Remove everything except the components I ported to Svelte - Restore all frontend files from Vue code, now altered for Svelte * Convert Vue's 'reactive' and 'provide' to Svelte's stores and contexts * Fix event emitting and bi-di data flow * Undo removal of 'update:' events * Fix 'update:' event dispatching * Fix usage in parent of bi-di component props * Fix component typing, more progress towards no errors * The page builds and opens! * Add loading spinner and remove postcss dependency * Make the basics of document editing work * Fix rebase history Co-authored-by: Locria Cyber <74560659+locriacyber@users.noreply.github.com>
74 lines
2.5 KiB
HTML
74 lines
2.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=0.5, maximum-scale=0.5, minimum-scale=0.5">
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,wght@0,400;0,700;1,400;1,700&family=Inconsolata:wght@400;700">
|
|
<title>Graphite</title>
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
|
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
|
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
|
<link rel="manifest" href="/site.webmanifest">
|
|
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#473a3a">
|
|
<meta name="apple-mobile-web-app-title" content="Graphite">
|
|
<meta name="application-name" content="Graphite">
|
|
<meta name="msapplication-TileColor" content="#ffffff">
|
|
<meta name="theme-color" content="#ffffff">
|
|
</head>
|
|
<body>
|
|
<noscript>JavaScript is required</noscript>
|
|
<style>
|
|
body {
|
|
background: #222;
|
|
height: 100%;
|
|
margin: 0;
|
|
}
|
|
|
|
body::after {
|
|
content: "";
|
|
display: block;
|
|
position: absolute;
|
|
left: 50%;
|
|
top: 50%;
|
|
width: 60px;
|
|
height: 60px;
|
|
border-radius: 50%;
|
|
border: 4px solid #eee;
|
|
border-color: #eee transparent #eee transparent;
|
|
animation: spinning-loading-indicator 1s linear infinite;
|
|
}
|
|
|
|
@keyframes spinning-loading-indicator {
|
|
0% {
|
|
transform: translate(-30px, -30px) rotate(0deg);
|
|
}
|
|
100% {
|
|
transform: translate(-30px, -30px) rotate(360deg);
|
|
}
|
|
}
|
|
</style>
|
|
<script>
|
|
// Confirm the browser is compatible before initializing the application
|
|
|
|
// Display an error if the browser is incompatible with a required API
|
|
// This is run outside the JS code bundle in case unsupported features cause a syntax error when parsing the bundle, preventing the any bundle code from running
|
|
// TODO: Svelte: reenable this
|
|
let error;
|
|
if (!("BigUint64Array" in window)) {
|
|
error = `
|
|
<style>
|
|
body::after { content: none; }
|
|
h2, p, a { text-align: center; color: white; }
|
|
</style>
|
|
<h2>This browser is too old to run Graphite</h2>
|
|
<p>Please upgrade to a modern web browser such as the latest Firefox, Chrome, Edge, or Safari version 15 or newer.</p>
|
|
<p>(The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array#browser_compatibility" target="_blank"><code>BigInt64Array</code></a>
|
|
JavaScript API must be supported by the browser for Graphite to function.)</p>
|
|
`.trim();
|
|
}
|
|
if (error) document.body.innerHTML = error;
|
|
</script>
|
|
<script src="/build/bundle.js"></script>
|
|
</body>
|
|
</html>
|