├── README.md └── LICENSE /README.md: -------------------------------------------------------------------------------- 1 | # unity-component-specification 2 | This is a WIP draft of the Unity (Single File Web Component) Specification 3 | 4 | # Abstract 5 | Unity Component Specification describes a new hypertext-like file format for creating Single-File Web Components (SFWC). 6 | 7 | ## Goals 8 | * rosetta stone-like capabilities component interop between frameworks. 9 | * provides a promise for users, companies, lib authors to have a single "meta" description of how their "ui component" should function, meanwhile using modern tooling, and small compiler chains, could compile this "meta" information into the framework's actual representation. 10 | 11 | * allow users to ship way less JavaScript and CSS to the browser 12 | 13 | * 60fps scroll lists, fast dom changes, fast paints. "Does it beat the Ken Wheeler Test" (long term platform goal) 14 | 15 | ## Scenario: 16 | Giant company (A) is silo'd and has a variety of different frameworks that they use in house, and they all love the workflows that they have, however there is massive amounts of overlap because they cannot write components that both teams can use. 17 | 18 | With "unity components" (Single File Components) this could be possible: Team A using `Preact` _(Figure 1)_, could use this component in the same way that Team B using 'Vue' _(Figure 2)_ does. 19 | 20 | **Figure 1: Using `Button.sfc` in `.js` file and consumed with preact `render()` fn** 21 | ```js 22 | import {Button} from "material-unity" // returns a SFC "module" .sfc or .vue, etc whatever 23 | 24 | render( 25 |