Skip to content

Commit 70884c4

Browse files
Merge pull request #28 from gridaco/merge-web-builder
Merge web builder
2 parents 4f14db0 + c469ce0 commit 70884c4

110 files changed

Lines changed: 3395 additions & 11 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
[submodule "packages/reflect-core"]
1111
path = packages/reflect-core
1212
url = https://github.com/bridgedxyz/reflect-core-ts
13-
[submodule "packages/coli-web-builder"]
14-
path = packages/coli-web-builder
15-
url = https://github.com/bridgedxyz/coli-web-builder
1613
[submodule "ui/editor-ui"]
1714
path = ui/editor-ui
1815
url = https://github.com/bridgedxyz/reflect-editor-ui

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"packages/reflect-core/packages/*",
1212
"packages/design-sdk/*",
1313
"packages/coli/packages/*",
14-
"packages/coli-web-builder/*"
14+
"packages/web-builder/*"
1515
]
1616
}

packages/coli-web-builder

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/designto-web/package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
"description": "design to web (styles and html/jsx)",
55
"main": "dist/index.js",
66
"repository": "https://github.com/bridgedxyz/design-to-code",
7-
"author": "Bridged authors",
7+
"author": "Grida authors",
88
"license": "Apache 2.0",
9-
"private": false,
10-
"dependencies": {
11-
"@reflect-ui/core": "0.0.2-rc.7-local"
12-
}
9+
"private": false
1310
}

packages/reflect-core

packages/web-builder/.gitignore

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
.DS_Store
10+
11+
# Diagnostic reports (https://nodejs.org/api/report.html)
12+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
13+
14+
# Runtime data
15+
pids
16+
*.pid
17+
*.seed
18+
*.pid.lock
19+
20+
# Directory for instrumented libs generated by jscoverage/JSCover
21+
lib-cov
22+
23+
# Coverage directory used by tools like istanbul
24+
coverage
25+
*.lcov
26+
27+
# nyc test coverage
28+
.nyc_output
29+
30+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
31+
.grunt
32+
33+
# Bower dependency directory (https://bower.io/)
34+
bower_components
35+
36+
# node-waf configuration
37+
.lock-wscript
38+
39+
# Compiled binary addons (https://nodejs.org/api/addons.html)
40+
build/Release
41+
42+
# Dependency directories
43+
node_modules/
44+
jspm_packages/
45+
46+
# TypeScript v1 declaration files
47+
typings/
48+
49+
# TypeScript cache
50+
*.tsbuildinfo
51+
52+
# Optional npm cache directory
53+
.npm
54+
55+
# Optional eslint cache
56+
.eslintcache
57+
58+
# Microbundle cache
59+
.rpt2_cache/
60+
.rts2_cache_cjs/
61+
.rts2_cache_es/
62+
.rts2_cache_umd/
63+
64+
# Optional REPL history
65+
.node_repl_history
66+
67+
# Output of 'npm pack'
68+
*.tgz
69+
70+
# Yarn Integrity file
71+
.yarn-integrity
72+
73+
# dotenv environment variables file
74+
.env
75+
.env.test
76+
77+
# parcel-bundler cache (https://parceljs.org/)
78+
.cache
79+
80+
# Next.js build output
81+
.next
82+
83+
# Nuxt.js build / generate output
84+
.nuxt
85+
dist
86+
87+
# Gatsby files
88+
.cache/
89+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
90+
# https://nextjs.org/blog/next-9-1#public-directory-support
91+
# public
92+
93+
# vuepress build output
94+
.vuepress/dist
95+
96+
# Serverless directories
97+
.serverless/
98+
99+
# FuseBox cache
100+
.fusebox/
101+
102+
# DynamoDB Local files
103+
.dynamodb/
104+
105+
# TernJS port file
106+
.tern-port

packages/web-builder/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Bridged
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

packages/web-builder/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# web-builder
2+
3+
jsx syntex tree builder for web applications. react, vue, svelte, etc..
4+
5+
> A [CoLI](coli.codes) Based Technology
6+
7+
## installation
8+
9+
```shell
10+
yarn add @coli.codes/web-builder
11+
```
12+
13+
## platforms
14+
15+
- react
16+
- vue
17+
- svelte
18+
- css
19+
- sass
20+
- less
21+
- mui
22+
- tailwind css
23+
- bootstrap
24+
- [reflect](https://reflect-ui.com)
25+
26+
## Usage
27+
28+
```
29+
new Component()
30+
```
31+
32+
```tsx
33+
<Component style={{ color: CSS.black }}>
34+
<Child />
35+
</Component>
36+
37+
// <>
38+
```
39+
40+
## references
41+
42+
- [flutter builder for building flutter applications dynamically](https://github.com/bridgedxyz/flutter-builder)
43+
- Built with [CoLI](https://coli.codes/)
44+
- css-builder
45+
- jsx-builder

packages/web-builder/core/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export * from "./widget";
2+
export * from "./widget-with-style";
3+
export * from "./key-from-reflect-widget";
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { WidgetKey } from "./widget";
2+
import * as core from "@reflect-ui/core";
3+
import { nameit, NameCases } from "@coli.codes/naming";
4+
export function keyFromWidget(widget: core.Widget): WidgetKey {
5+
if (!widget.key) {
6+
throw `cannot create web widget key from reflect widget because the input reflect widget key is empty or contains invalid value. the givven reflect widget was - ${
7+
widget._type
8+
} {${JSON.stringify(widget, undefined, 2)}}`;
9+
}
10+
const name = nameit(widget.key.originName, {
11+
case: NameCases.pascal,
12+
});
13+
return new WidgetKey(widget.key.id, name.name);
14+
}

0 commit comments

Comments
 (0)