ziex 0.0.1-dev.2 → 0.0.1-dev.3
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/README.md +7 -7
- package/index.d.ts +9 -2
- package/index.js +1 -1
- package/package.json +6 -1
- package/{dom.d.ts → react/dom.d.ts} +1 -0
- package/react/index.d.ts +2 -0
- package/react/index.js +1 -0
- package/{types.d.ts → react/types.d.ts} +6 -0
- package/wasm/dom.d.ts +4 -0
- package/wasm/index.d.ts +2 -0
- package/wasm/index.js +1 -0
- package/wasm/types.d.ts +1 -0
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ winget install -e --id zig.zig # Windows
|
|
|
27
27
|
|
|
28
28
|
## Quick Example
|
|
29
29
|
|
|
30
|
-
```tsx site/pages/
|
|
30
|
+
```tsx site/pages/examples/overview.zx
|
|
31
31
|
pub fn QuickExample(allocator: zx.Allocator) zx.Component {
|
|
32
32
|
const is_loading = true;
|
|
33
33
|
const chars = "Hello, ZX Dev!";
|
|
@@ -84,10 +84,10 @@ const zx = @import("zx");
|
|
|
84
84
|
- [x] Routing
|
|
85
85
|
- [x] File-system Routing
|
|
86
86
|
- [x] Search Parameters
|
|
87
|
-
- [
|
|
87
|
+
- [x] Path Segments
|
|
88
88
|
- [x] Components
|
|
89
89
|
- [x] Control Flow
|
|
90
|
-
- [
|
|
90
|
+
- [x] `if`
|
|
91
91
|
- [ ] `if` nested
|
|
92
92
|
- [x] `if/else`
|
|
93
93
|
- [x] `if/else` nested
|
|
@@ -95,8 +95,8 @@ const zx = @import("zx");
|
|
|
95
95
|
- [x] `for` nested
|
|
96
96
|
- [x] `switch`
|
|
97
97
|
- [x] `switch` nested
|
|
98
|
-
- [
|
|
99
|
-
- [
|
|
98
|
+
- [x] `while`
|
|
99
|
+
- [x] `while` nested
|
|
100
100
|
- [x] Assets
|
|
101
101
|
- [x] Copying
|
|
102
102
|
- [x] Serving
|
|
@@ -108,14 +108,14 @@ const zx = @import("zx");
|
|
|
108
108
|
- [ ] Middleware
|
|
109
109
|
- [ ] API Endpoints
|
|
110
110
|
- [ ] Server Actions
|
|
111
|
-
- [
|
|
111
|
+
- [x] CLI
|
|
112
112
|
- [x] `init` Project Template
|
|
113
113
|
- [x] `transpile` Transpile .zx files to Zig source code
|
|
114
114
|
- [x] `serve` Serve the project
|
|
115
115
|
- [x] `dev` HMR or Rebuild on Change
|
|
116
116
|
- [x] `fmt` Format the ZX source code (_Alpha_)
|
|
117
117
|
- [x] `export` Generate static site assets
|
|
118
|
-
- [
|
|
118
|
+
- [x] `bundle` Bundle the ZX executable with public/assets and exe
|
|
119
119
|
- [x] `version` Show the version of the ZX CLI
|
|
120
120
|
- [x] `update` Update the version of ZX dependency
|
|
121
121
|
- [x] `upgrade` Upgrade the version of ZX CLI
|
package/index.d.ts
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
1
|
+
export declare const zx: BuildZon;
|
|
2
|
+
type BuildZon = {
|
|
3
|
+
version: string;
|
|
4
|
+
description: string;
|
|
5
|
+
repository: string;
|
|
6
|
+
fingerprint: number;
|
|
7
|
+
minimum_zig_version: string;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var i={name:"zx",version:"0.0.1-dev.228",description:"ZX is a framework for building web applications with Zig.",repository:"https://github.com/nurulhudaapon/zx",fingerprint:14616285862371232000,minimum_zig_version:"0.15.2",dependencies:{httpz:{url:"git+https://github.com/nurulhudaapon/httpz.git#7268154f43f5827bf78668e8e79a00f2ebe4db13",hash:"httpz-0.0.0-PNVzrBgtBwCVkSJyophIX6WHwDR0r8XhBGQr96Kk-1El"},zli:{url:"git+https://github.com/nurulhudaapon/cliz.git#aff3b54879e7514afaf8c87f1abe22121b8992d4",hash:"zli-4.3.0-LeUjpu_fAABOSVASSCW2fFh8SFVNHrxQGDXGPNzcSE_i"}},paths:["build.zig","build.zig.zon","src"]};export{i as zx};
|
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ziex",
|
|
3
|
-
"version": "0.0.1-dev.2",
|
|
4
3
|
"description": "ZX is a framework for building web applications with Zig.",
|
|
5
4
|
"main": "index.js",
|
|
6
5
|
"type": "module",
|
|
6
|
+
"version": "0.0.1-dev.3",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./index.js",
|
|
9
|
+
"./react": "./react/index.js",
|
|
10
|
+
"./wasm": "./wasm/index.js"
|
|
11
|
+
},
|
|
7
12
|
"homepage": "https://github.com/nurulhudaapon/zx",
|
|
8
13
|
"repository": {
|
|
9
14
|
"type": "git",
|
package/react/index.d.ts
ADDED
package/react/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
async function S(k){let G=document.getElementById(k.id);if(!G)throw Error(`Root element ${k.id} not found`,{cause:k});let J=JSON.parse(G.getAttribute("data-props")||"{}"),K=G.getAttribute("data-children")??void 0;if(K)J.dangerouslySetInnerHTML={__html:K};let Q=await k.import();return{domNode:G,props:J,Component:Q}}function U(k){let G=window.location.pathname;return k.filter((J)=>J.route===G||!J.route)}export{S as prepareComponent,U as filterComponents};
|
|
@@ -78,6 +78,12 @@ export type ComponentMetadata = {
|
|
|
78
78
|
* ```
|
|
79
79
|
*/
|
|
80
80
|
path: string;
|
|
81
|
+
/**
|
|
82
|
+
* The route of of the component in which page the component was used,
|
|
83
|
+
* null in case the component was used in other non-page/layout context.
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
route: string | null;
|
|
81
87
|
/**
|
|
82
88
|
* A unique HTML element identifier for the component's root DOM node.
|
|
83
89
|
*
|
package/wasm/dom.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ComponentMetadata } from "./types";
|
|
2
|
+
export type PreparedComponent = {};
|
|
3
|
+
export declare function prepareComponent(component: ComponentMetadata): Promise<PreparedComponent>;
|
|
4
|
+
export declare function filterComponents(components: ComponentMetadata[]): ComponentMetadata[];
|
package/wasm/index.d.ts
ADDED
package/wasm/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
async function o(e){throw Error("Not implemented")}function t(e){throw Error("Not implemented")}export{o as prepareComponent,t as filterComponents};
|
package/wasm/types.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ComponentMetadata = {};
|