this is deta
deta / tela Goto Github PK
View Code? Open in Web Editor NEWdeclarative infinite canvas library for svelte using native DOM elements.
Home Page: https://deta.github.io/tela/?path=/docs/tela--docs
License: MIT License
declarative infinite canvas library for svelte using native DOM elements.
Home Page: https://deta.github.io/tela/?path=/docs/tela--docs
License: MIT License
Hi! I would love to try out your liblary but I'm having an issue with installation.
First when I tried installing your liblary I got this error
npm ERR! code 1
npm ERR! path C:\Users\...\node_modules\@deta\tela\node_modules\esbuild
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node install.js
npm ERR! C:\Users\...\node_modules\@deta\tela\node_modules\esbuild\install.js:132
npm ERR! throw new Error(`Expected ${JSON.stringify(versionFromPackageJSON)} but got ${JSON.stringify(stdout)}`);
npm ERR! ^
npm ERR!
npm ERR! Error: Expected "0.18.20" but got "0.19.12"
npm ERR! at validateBinaryVersion (C:\Users\...\node_modules\@deta\tela\node_modules\esbuild\install.js:132:11)
npm ERR! at C:\Users\...\node_modules\@deta\tela\node_modules\esbuild\install.js:283:5
npm ERR!
npm ERR! Node.js v20.11.0
But as I was able to resolve that by instaling older version of esbuild another obstacle come into way.
Missing C:\Users\...\node_modules\@deta\tela\svelte.config.js — skipping
> src\lib does not exist
at do_build (file:///C:/Users/.../node_modules/@deta/tela/node_modules/@sveltejs/package/src/index.js:28:9)
at Module.build (file:///C:/Users/.../node_modules/@deta/tela/node_modules/@sveltejs/package/src/index.js:16:8)
at file:///C:/Users/.../node_modules/@deta/tela/node_modules/@sveltejs/package/src/cli.js:49:61
And I dot know how to move from here. Is it possible I'm using wrong version of Svelte altogether? I don't quite understand the concept of "manually build tela as installing it from github does only ship the source files."
I'm new in this stuff so I'm sorry it's something trivial. :) Thanks!
bun i deta/tela && cd ./node_modules/@deta/tela && bun i && bun run package
(Which already kinda sucks because now I need to modify my entire build process with a kludge for one package – and seems to add a bunch of stuff that I really don't want in my bundle, like storybook)
<script lang="ts">
import Board from "@deta/tela/Board.svelte";
import Positionable from "@deta/tela/Positionable.svelte";
import type { TBoard, TBoardSettings } from "@deta/tela/index.js";
import { writable } from "svelte/store";
const settings = writable({} satisfies TBoardSettings);
const board = writable({} satisfies TBoard);
</script>
<main>
<Board {settings} {board}>
<Positionable pos={{ x: 10, y: 10 }} size={{ x: 400, y: 300 }} z={1}>
Hello, I am tela.
</Positionable>
<Positionable pos={{ x: 200, y: 150 }} size={{ x: 400, y: 300 }} z={1}>
Try moving the canvas around with the trackpad or by using META + Left Mouse.
</Positionable>
</Board>
</main>
<style>
main {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
</style>
(I do wish it was a one liner:
import {Board, Positionable, type TBoard, type TBoardSettings} from "@deta/tela";
)
Error: Missing "./Board.svelte" specifier in "@deta/tela" package
at e (file:///Users/.../node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:21445:25)
at n (file:///Users/.../node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:21445:627)
at o (file:///Users/.../node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:21445:1297)
at resolveExportsOrImports (file:///Users/.../node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:28741:20)
at resolveDeepImport (file:///Users/.../node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:28760:31)
at tryNodeResolve (file:///Users/.../node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:28448:20)
at Context.resolveId (file:///Users/.../node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:28207:28)
at Object.resolveId (file:///Users/.../node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:44269:64)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async TransformContext.resolve (file:///Users/.../node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:43985:23
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.