stencil
structured-text | stencil | |
---|---|---|
1 | 55 | |
22 | 12,309 | |
- | 0.5% | |
6.1 | 9.9 | |
16 days ago | 1 day ago | |
TypeScript | TypeScript | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
structured-text
-
Ask HN: Help me pick a front-end framework
Can you elaborate a bit more on this part, please?
> I'm thinking of building a text-annotation based app _alone in my spare time_. The core usage loop is about viewing and interacting with "visual markup" applied to a body of text. So lots of tooltips/hoverbars I guess.
Or show us a mockup... doesn't have to be anything fancy, just like a pen and paper sketch or a simple Figma.
I'm asking because it kinda sounds like you're wanting to do something like an online IDE or Google Docs, where you're manipulating a body of text in the style of a rich text editor. If that's the case, it's possible the HTML DOM model isn't quite the right fit for you... you may find it better to abstract over a Canvas or WebGL object instead of trying to shoehorn that experience into the raw DOM. That way you have full control over rendering, outside of the normal layout/styling/rendering loop. It might also make a good case for a single-page app (at least the majority of the editor itself would be, and the other stuff -- marketing, blog, etc. -- can be routed to individual pages).
In that case, it wouldn't be so much a question of "framework" in the sense of React, Vue, etc., which traditionally work on the DOM. It might be more a question of "engine", like whether to use something like PixiJS to manipulate the graphics layer vs rolling your own. State management can be done with something like Redux (even without React), or if you choose to use a frontend framework for the rest of it, you can maybe use their state solution with your rendering engine.
In addition to choosing a low-level graphics lib, you can also look at some existing rich text markup solutions. A CMS I used had a good blog post on this: https://www.datocms.com/docs/structured-text/dast#datocms-ab... along with their open-source editor: https://github.com/datocms/structured-text
A more widespread one is the toast UI editor: https://ui.toast.com/tui-editor
I know you're not just working in Markdown, but these give you an idea of what it's like to work with complex text trees in JS.
Once you have the actual text editor part figured out, choosing the wrapper around it (again, just for marketing pages, etc.) is relatively trivial compared to the difficulty of your editor app. I really like Next.js myself (if you choose React), but I don't think you could really go wrong with any of the major choices today... React/Vue/Svelte/etc. And it looks to me like the complexity of your site wouldn't really be around that anyway, but the editor portion.
Lastly: I don't think ANY JS tool or package is going to be maintained in 10 years. Frankly, 2 years is a long time in the JS ecosystem :( I'm not defending this phenomenon, I hate it too, but that's the reality of it. If long-term maintenance is a goal of yours, you might want to consider writing abstraction layers over third-party tools you use, so you can easily swap them out when future things come out (because they will). The web itself is changing too fast for libraries to keep up; instead, people just write new ones every few years. An example of this is the pathway from the Canvas to WebGL to workers to WASM (and how to juggle heavy computational vs rendering loops around)... a lot of the old Canvas-based renderers, which were super powerful in their time, are now too slow vs the modern alternatives. Nobody is going to port the old stuff over, they just make new libs. It's likely that trend will continue in the JS world (that whatever you write today will be obsoleted by a new web API in a few years).
Lastly, as an aside, TypeScript is a superset of JS... if you find a JS project/lib/plugin that you want to use, there will often be types for it made by the community (https://github.com/DefinitelyTyped/DefinitelyTyped) , or you can write your own types for it. I don't really have an opinion about TypeScript vs writing in some other language and compiling to JS, but it would probably be easier to find help (especially frontend) in the future if you stick with TypeScript instead of convoluting your stack with multiple languages. Sounds like most of your app will be clientside anyway with limited backend needs.
---------
Tech aside... have you considered partnering with a frontend dev for this? I know you said "alone", but just having someone set up the basic skeleton of such an app with you for the first month or two could be super helpful. Or a UX person to help you with some of the interactions before you start serious coding. They don't have to be with you the whole journey, but maybe they can help jumpstart your project so you can then work on adding features & polish in your spare time, instead of figuring out basic architecture? Unless, of course, that's the part you actually enjoy. In that case, don't let anyone rob of you that :)
Have fun! Sounds like a cool project.
stencil
- Ajout de l'auto-complétion sur les Web Components avec Stencil
-
Making Web Component properties behave closer to the platform
First a disclosure: I never actually used Stencil, only played with it a bit locally in a hello-world project while writing this post.
-
Plasmic.app – the visual builder for your tech stack
This is my main concern too.
I don't understand why tools like this "pick a winner" with a specific framework instead of rendering to Web Components with a framework wrapper, or using something like Stencil[1] that can render to any framework.
[1] https://stenciljs.com/
-
Design Systems with Web Components
I was recently able to sit down with some of the core members of Ionic, who also created Stencil a toolchain for building Design Systems and Progressive Web Apps. We talked at great length how typically companies are approaching Ionic from a Design Team and need help building components. As a developer I wanted to talk about the Web Components that are used within the Design System first. There was a decent amount of surprise, so I thought I would break down what a Design System is and why it doesn't matter which end you start with, as long as you have both your Design and Development teams working together to build your Design System.
- Nue: A React/Vue/Vite/Astro Alternative
-
If Web Components are so great, why am I not using them?
Examples like this bug me. The React example is using a high level abstraction, the web component is directly using the API. A more accurate example would show how those React calls eventually boil down to document.createElement()
I don’t think the Web Components API was meant to be used directly all the time. You can use a framework like StencilJS:
https://stenciljs.com/
- Use Stencil / the ionic framework with emberjs [video]
-
World Wide Web Wars
You might say that this is the same vicious cycle as JavaScript frameworks. That's wrong, because Web Components are interoperable by design. Choosing Stencil or Lit or any other library is a development convenience that has little to do with the interoperability of the resulting components.
-
React Component in vue/angular
Not sure about Vue but you can in Angular, though my experience with React components in Angular has not been pleasant. Libraries such as Stencil allow you to create native Web Componets from React components.
-
Is there a plugin that abstracts registering web components with React?
I guess my problem is more specific to my overall architecture. I have components that when are placed in the DOM, have props rendered on them by their parent elements. I'm using stencil to do this.
What are some alternatives?
vitesse-modular-naiveui - If you are really into the "Vitesse" starter template created by Anthony Fu (Vue core team member) but want to use the clean architectural pattern instead of monolithic architecture, then you can clone this repo and use your own project. Have fun 🙂!
lit - Lit is a simple library for building fast, lightweight web components.
Svelte - Cybernetically enhanced web apps
Mithril.js - A JavaScript Framework for Building Brilliant Applications
vite-ssg - Static site generation for Vue 3 on Vite
DefinitelyTyped - The repository for high quality TypeScript type definitions.
css-modules - Documentation about css-modules
lexical - Lexical is an extensible text editor framework that provides excellent reliability, accessibility and performance.
catalyst - Catalyst is a set of patterns and techniques for developing components within a complex application.
create-t3-app - The best way to start a full-stack, typesafe Next.js app
shoelace-css - A collection of professionally designed, every day UI components built on Web standards. SHOELACE IS BECOMING WEB AWESOME 👇👇👇