paperclip-ui / legacy-paperclip Goto Github PK
View Code? Open in Web Editor NEWPaperclip is a common language for designers and developers
Home Page: http://paperclip.dev
License: Other
Paperclip is a common language for designers and developers
Home Page: http://paperclip.dev
License: Other
Just add <import src="fsfsfsfs.pc">
at top of pc file
TODOS:
Should create new project. See Gatsby for inspiration.
Currently, parsers stop & return syntax errors as they come up; this is terrible DX. Instead, all parsers should store syntax errors in a vector.
Forgot about this ๐
This will require more functionality to the paperclip engine - possible a suggestions()
engine prop which looks for patterns in tokens.
TODOS:
>>>
referencesE.g:
div {
& span {
color: red;
}
}
Todos
Steps:
Add <import src="fdsfdfndjfnfjsdf.css"> at the top of a file
Compile the PC file
โ๏ธ Error should show up at this point
E.g:
<import id="some-component" src="./some-component.pc">
๐๐๐๐๐
<some-component />
โ๐ป Location of tag name here is incorrect since emojis contain more than one u8 character
Inspiration:
Todos
Considerations:
needed for website
This is causing errors when meta + click is pressed on text elements in the preview.
Requires location to also be added to evaluated JS values
E.g:
<div export component id="something">
</div>
However, this wouldn't work without the component
attribute:
<div export id="something">
</div>
โ๏ธ Should result in an error: "component" attribute is needed for export
.
TODOS:
Should cover Rust, and TypeScript code
<import id="something" src="some-module">
index.pc
Depends on #11
Instead of replacing the entire source, we can persist changes from VS Code
The idea is to have the ability to use different browser renderers in the VS Code preview.
Having one <style />
block at the top is a bit unwieldy. Here's an alternative:
<div>
<style scoped>
div { color: red; }
</style>
</div>
Might not be fixable since .css
files use the builtin CSS language server. Alternatively, we could use .pcss
files.
Depends on #31
id
conflicts with styling. Instead, maybe as
attribute?
<import as="import" src="./something.pc">
<div export component as="something">
</div>
Based on https://www.w3schools.com/tags/att_scoped.asp
Slight deviation from native HTML:
<div>
<style>
div { color: red; }
</style>
this is red tex
</div>
<div>
this is black text
</div>
.list {
...list-styles
}
<import id="list" src="./list.pc">
<style>
list::list-styles {
color: red;
}
</style>
in CSS, and HTML
TODOS:
:nth-child
wouldn't work.Since components & exports will need to be explicitly defined (#40, #42), there should be a warning when bindings are used outside of components. For example, this would be invalid:
Hello {message}!
Since there wouldn't be any way to use the {message}
binding. Instead, the user would have to define the binding in a component. For example:
<span component id="Message">
Hello {children}
</span>
โ๏ธ This would still display a preview of Hello undefined
, but the user could then preview the component like so:
<span component id="Message">
Hello {children}
</span>
<fragment preview>
<Message>World!</Message>
</fragment>
e.g:
<div component="something">
{thisIsScoped}
</div>
<!-- alternative -->
<div component id="something-else">
{thisIsScoped}
</div>
<something />
To cover fragments, we can create an explicit tag:
<fragment component id="something">
some text
<an-element />
</fragment>
โ๏ธ This would replace <></>
syntax.
<self />
would also be deprecated since elements are all sitting at the root, you'd just need an id
, and component
attribute. Previews might look something like this:
<div component id="button">
{children}
</div>
<fragment preview>
This is a button: <button>Something</button>
</fragment>
preview
and component
attributes could also be combined:
<fragment preview component id="some-preview">
</fragment>
โ๏ธ There could be some discoverability in the preview UI that looks for all preview elements and allows the user to toggle between them. For example:
<fragment preview component id="MobilePreview" label="Mobile preview">
<!-- HTML here -->
</fragment>
<fragment preview component id="TabletPreview" label="Tabel Preview">
<!-- HTML here -->
</fragment>
โ๏ธ These preview fragments would also be exported as components.
Not this:
<style>
div[done] {
color: red;
}
</style>
<div {done}>something</div>
Stuff that needs to be covered:
โ with these two things covered we should be good! ๐
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.