@zenithbuild/core 0.1.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +24 -40
- package/bin/zen-build.ts +2 -0
- package/bin/zen-dev.ts +2 -0
- package/bin/zen-preview.ts +2 -0
- package/bin/zenith.ts +2 -0
- package/cli/commands/add.ts +37 -0
- package/cli/commands/build.ts +37 -0
- package/cli/commands/create.ts +702 -0
- package/cli/commands/dev.ts +197 -0
- package/cli/commands/index.ts +112 -0
- package/cli/commands/preview.ts +62 -0
- package/cli/commands/remove.ts +33 -0
- package/cli/index.ts +10 -0
- package/cli/main.ts +101 -0
- package/cli/utils/branding.ts +153 -0
- package/cli/utils/logger.ts +40 -0
- package/cli/utils/plugin-manager.ts +114 -0
- package/cli/utils/project.ts +71 -0
- package/compiler/build-analyzer.ts +122 -0
- package/compiler/discovery/layouts.ts +61 -0
- package/compiler/index.ts +40 -24
- package/compiler/ir/types.ts +1 -0
- package/compiler/parse/parseScript.ts +29 -5
- package/compiler/parse/parseTemplate.ts +96 -58
- package/compiler/parse/scriptAnalysis.ts +77 -0
- package/compiler/runtime/dataExposure.ts +49 -31
- package/compiler/runtime/generateDOM.ts +18 -17
- package/compiler/runtime/generateHydrationBundle.ts +24 -5
- package/compiler/runtime/transformIR.ts +140 -49
- package/compiler/runtime/wrapExpressionWithLoop.ts +11 -11
- package/compiler/spa-build.ts +70 -153
- package/compiler/ssg-build.ts +412 -0
- package/compiler/transform/layoutProcessor.ts +132 -0
- package/compiler/transform/transformNode.ts +19 -19
- package/dist/cli.js +11648 -0
- package/dist/zen-build.js +11659 -0
- package/dist/zen-dev.js +11659 -0
- package/dist/zen-preview.js +11659 -0
- package/dist/zenith.js +11659 -0
- package/package.json +22 -2
- package/runtime/bundle-generator.ts +416 -0
- package/runtime/client-runtime.ts +532 -0
- package/.eslintignore +0 -15
- package/.gitattributes +0 -2
- package/.github/ISSUE_TEMPLATE/compiler-errors-for-invalid-state-declarations.md +0 -25
- package/.github/ISSUE_TEMPLATE/new_ticket.yaml +0 -34
- package/.github/pull_request_template.md +0 -15
- package/.github/workflows/discord-changelog.yml +0 -141
- package/.github/workflows/discord-notify.yml +0 -242
- package/.github/workflows/discord-version.yml +0 -195
- package/.prettierignore +0 -13
- package/.prettierrc +0 -21
- package/.zen.d.ts +0 -15
- package/app/components/Button.zen +0 -46
- package/app/components/Link.zen +0 -11
- package/app/favicon.ico +0 -0
- package/app/layouts/Main.zen +0 -59
- package/app/pages/about.zen +0 -23
- package/app/pages/blog/[id].zen +0 -53
- package/app/pages/blog/index.zen +0 -32
- package/app/pages/dynamic-dx.zen +0 -712
- package/app/pages/dynamic-primitives.zen +0 -453
- package/app/pages/index.zen +0 -154
- package/app/pages/navigation-demo.zen +0 -229
- package/app/pages/posts/[...slug].zen +0 -61
- package/app/pages/primitives-demo.zen +0 -273
- package/assets/logos/0E3B5DDD-605C-4839-BB2E-DFCA8ADC9604.PNG +0 -0
- package/assets/logos/760971E5-79A1-44F9-90B9-925DF30F4278.PNG +0 -0
- package/assets/logos/8A06ED80-9ED2-4689-BCBD-13B2E95EE8E4.JPG +0 -0
- package/assets/logos/C691FF58-ED13-4E8D-B6A3-02E835849340.PNG +0 -0
- package/assets/logos/C691FF58-ED13-4E8D-B6A3-02E835849340.svg +0 -601
- package/assets/logos/README.md +0 -54
- package/assets/logos/zen.icns +0 -0
- package/bun.lock +0 -39
- package/compiler/legacy/binding.ts +0 -254
- package/compiler/legacy/bindings.ts +0 -338
- package/compiler/legacy/component-process.ts +0 -1208
- package/compiler/legacy/component.ts +0 -301
- package/compiler/legacy/event.ts +0 -50
- package/compiler/legacy/expression.ts +0 -1149
- package/compiler/legacy/mutation.ts +0 -280
- package/compiler/legacy/parse.ts +0 -299
- package/compiler/legacy/split.ts +0 -608
- package/compiler/legacy/types.ts +0 -32
- package/docs/COMMENTS.md +0 -111
- package/docs/COMMITS.md +0 -36
- package/docs/CONTRIBUTING.md +0 -116
- package/docs/STYLEGUIDE.md +0 -62
- package/scripts/webhook-proxy.ts +0 -213
package/app/layouts/Main.zen
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
<html>
|
|
2
|
-
<head>
|
|
3
|
-
<title>Zenith - Phase 3 Components</title>
|
|
4
|
-
</head>
|
|
5
|
-
<body>
|
|
6
|
-
<script>
|
|
7
|
-
type Props = {
|
|
8
|
-
title?: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
state title = props.title || 'My App'
|
|
12
|
-
</script>
|
|
13
|
-
<style>
|
|
14
|
-
* {
|
|
15
|
-
box-sizing: border-box;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
body {
|
|
19
|
-
font-family: Arial, sans-serif;
|
|
20
|
-
margin: 0;
|
|
21
|
-
padding: 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.layout-header {
|
|
25
|
-
background: #f0f0f0;
|
|
26
|
-
padding: 16px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.layout-footer {
|
|
30
|
-
background: #f0f0f0;
|
|
31
|
-
padding: 16px;
|
|
32
|
-
margin-top: 20px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.layout-main {
|
|
36
|
-
min-height: calc(100vh - 120px);
|
|
37
|
-
width: 100%;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/* Hide layout header/footer for pages that have their own full design */
|
|
41
|
-
.full-page ~ .layout-header,
|
|
42
|
-
.full-page ~ .layout-footer {
|
|
43
|
-
display: none;
|
|
44
|
-
}
|
|
45
|
-
</style>
|
|
46
|
-
|
|
47
|
-
<header class="layout-header">
|
|
48
|
-
<h1>{ title }</h1>
|
|
49
|
-
</header>
|
|
50
|
-
|
|
51
|
-
<main class="layout-main">
|
|
52
|
-
<Slot />
|
|
53
|
-
</main>
|
|
54
|
-
|
|
55
|
-
<footer class="layout-footer">Footer content here</footer>
|
|
56
|
-
</body>
|
|
57
|
-
|
|
58
|
-
</html>
|
|
59
|
-
|
package/app/pages/about.zen
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<Main title="About Us">
|
|
2
|
-
<div>
|
|
3
|
-
<h1>About Zenith</h1>
|
|
4
|
-
<p>Zenith is a modern web framework with file-based routing.</p>
|
|
5
|
-
|
|
6
|
-
<div style="margin: 20px 0; padding: 20px; border: 1px solid #ccc; border-radius: 8px;">
|
|
7
|
-
<h3>Route Information</h3>
|
|
8
|
-
<p>This page is rendered from <code>pages/about.zen</code></p>
|
|
9
|
-
<p>Current path: <code>/about</code></p>
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
<nav style="margin-top: 20px;">
|
|
13
|
-
<h3>Navigation</h3>
|
|
14
|
-
<ul style="list-style: none; padding: 0;">
|
|
15
|
-
<li><a href="/">Home</a></li>
|
|
16
|
-
<li><a href="/about">About (current)</a></li>
|
|
17
|
-
<li><a href="/blog">Blog</a></li>
|
|
18
|
-
<li><a href="/blog/123">Blog Post 123</a></li>
|
|
19
|
-
<li><a href="/posts/hello/world">Posts Catch-all</a></li>
|
|
20
|
-
</ul>
|
|
21
|
-
</nav>
|
|
22
|
-
</div>
|
|
23
|
-
</Main>
|
package/app/pages/blog/[id].zen
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
// Access route params from the global route state
|
|
3
|
-
const route = window.__zenith_route || { params: {} };
|
|
4
|
-
const postId = route.params.id || 'unknown';
|
|
5
|
-
|
|
6
|
-
// Update the display when route changes
|
|
7
|
-
if (window.__zenith_router) {
|
|
8
|
-
window.__zenith_router.onRouteChange(function(newRoute) {
|
|
9
|
-
const idEl = document.getElementById('post-id');
|
|
10
|
-
if (idEl) {
|
|
11
|
-
idEl.textContent = newRoute.params.id || 'unknown';
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<Main title="Blog Post">
|
|
18
|
-
<div>
|
|
19
|
-
<h1>Blog Post</h1>
|
|
20
|
-
|
|
21
|
-
<div style="margin: 20px 0; padding: 20px; background: #e8f4f8; border-radius: 8px;">
|
|
22
|
-
<h2>Post ID: <span id="post-id" data-zen-bind="postId"></span></h2>
|
|
23
|
-
<p>This is a dynamic route page!</p>
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<div style="margin: 20px 0; padding: 20px; border: 1px solid #ccc; border-radius: 8px;">
|
|
27
|
-
<h3>Route Information</h3>
|
|
28
|
-
<p>This page is rendered from <code>pages/blog/[id].zen</code></p>
|
|
29
|
-
<p>Route pattern: <code>/blog/:id</code></p>
|
|
30
|
-
<p>The <code>id</code> parameter is extracted from the URL.</p>
|
|
31
|
-
</div>
|
|
32
|
-
|
|
33
|
-
<div style="margin: 20px 0;">
|
|
34
|
-
<h3>Try Different IDs</h3>
|
|
35
|
-
<ul>
|
|
36
|
-
<li><a href="/blog/1">Post 1</a></li>
|
|
37
|
-
<li><a href="/blog/42">Post 42</a></li>
|
|
38
|
-
<li><a href="/blog/hello-world">Post hello-world</a></li>
|
|
39
|
-
<li><a href="/blog/my-awesome-post">Post my-awesome-post</a></li>
|
|
40
|
-
</ul>
|
|
41
|
-
</div>
|
|
42
|
-
|
|
43
|
-
<nav style="margin-top: 20px;">
|
|
44
|
-
<h3>Navigation</h3>
|
|
45
|
-
<ul style="list-style: none; padding: 0;">
|
|
46
|
-
<li><a href="/">Home</a></li>
|
|
47
|
-
<li><a href="/about">About</a></li>
|
|
48
|
-
<li><a href="/blog">Blog Index</a></li>
|
|
49
|
-
</ul>
|
|
50
|
-
</nav>
|
|
51
|
-
</div>
|
|
52
|
-
</Main>
|
|
53
|
-
|
package/app/pages/blog/index.zen
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<Main title="Blog">
|
|
2
|
-
<div>
|
|
3
|
-
<h1>Blog</h1>
|
|
4
|
-
<p>Welcome to our blog! Here are some recent posts:</p>
|
|
5
|
-
|
|
6
|
-
<div style="margin: 20px 0; padding: 20px; border: 1px solid #ccc; border-radius: 8px;">
|
|
7
|
-
<h3>Route Information</h3>
|
|
8
|
-
<p>This page is rendered from <code>pages/blog/index.zen</code></p>
|
|
9
|
-
<p>Current path: <code>/blog</code></p>
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
<div style="margin: 20px 0;">
|
|
13
|
-
<h3>Recent Posts</h3>
|
|
14
|
-
<ul>
|
|
15
|
-
<li><a href="/blog/1">Getting Started with Zenith</a></li>
|
|
16
|
-
<li><a href="/blog/2">File-Based Routing Explained</a></li>
|
|
17
|
-
<li><a href="/blog/3">Building Components</a></li>
|
|
18
|
-
<li><a href="/blog/hello-world">Hello World Post</a></li>
|
|
19
|
-
</ul>
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
<nav style="margin-top: 20px;">
|
|
23
|
-
<h3>Navigation</h3>
|
|
24
|
-
<ul style="list-style: none; padding: 0;">
|
|
25
|
-
<li><a href="/">Home</a></li>
|
|
26
|
-
<li><a href="/about">About</a></li>
|
|
27
|
-
<li><a href="/blog">Blog (current)</a></li>
|
|
28
|
-
</ul>
|
|
29
|
-
</nav>
|
|
30
|
-
</div>
|
|
31
|
-
</Main>
|
|
32
|
-
|