aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2026-10-09 14:01:20 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2026-10-09 14:01:20 +0200
commit32a251aa9645de070727a6ec91490d3e9219ec7c (patch)
tree5dd55205c5df68fa449e766ec2a8d248e21bd2be /src/app
parent09e8d4548361ece6151b914709c39e254eba65e3 (diff)
rename z framework to zeroscript
Diffstat (limited to 'src/app')
-rw-r--r--src/app/components/icons/root.zig8
-rw-r--r--src/app/components/navbutton/root.zig16
-rw-r--r--src/app/components/root.zig4
-rw-r--r--src/app/root.zig12
4 files changed, 20 insertions, 20 deletions
diff --git a/src/app/components/icons/root.zig b/src/app/components/icons/root.zig
index a2b0fa6..298cfa6 100644
--- a/src/app/components/icons/root.zig
+++ b/src/app/components/icons/root.zig
@@ -1,16 +1,16 @@
-const z = @import("z");
+const zs = @import("zeroscript");
-pub const icons: []const z.Component = &.{
+pub const icons: []const zs.Component = &.{
icon("menu"),
icon("upload"),
icon("settings"),
};
const Icon = struct {
- pub fn init(_: *@This(), _: *z.Object) void {}
+ pub fn init(_: *@This(), _: *zs.Object) void {}
};
-pub fn icon(name: []const u8) z.Component {
+pub fn icon(name: []const u8) zs.Component {
return .{
.namespace = "icon",
.name = name,
diff --git a/src/app/components/navbutton/root.zig b/src/app/components/navbutton/root.zig
index 1078924..7704b90 100644
--- a/src/app/components/navbutton/root.zig
+++ b/src/app/components/navbutton/root.zig
@@ -1,23 +1,23 @@
const std = @import("std");
-const z = @import("z");
+const zs = @import("zeroscript");
const Self = @This();
-pub const component: z.Component = .{
+pub const component: zs.Component = .{
.name = "navbutton",
.html = .parse(@embedFile("index.html")),
.css = @embedFile("index.css"),
.link = @This(),
};
-element: *z.Object,
-shadow_root: *z.Object,
+element: *zs.Object,
+shadow_root: *zs.Object,
button: struct {
- classList: *z.Object,
+ classList: *zs.Object,
},
-pub fn init(self: *Self, element: *z.Object) !void {
- var env: z.Env = .default;
+pub fn init(self: *Self, element: *zs.Object) !void {
+ var env: zs.Env = .default;
defer env.deinit();
self.element = element;
@@ -28,7 +28,7 @@ pub fn init(self: *Self, element: *z.Object) !void {
}
pub fn open(self: *Self) !void {
- var env: z.Env = .default;
+ var env: zs.Env = .default;
defer env.deinit();
_ = self.button.classList.call(&env, "toggle", .{"open"});
diff --git a/src/app/components/root.zig b/src/app/components/root.zig
index 934279f..131ddb7 100644
--- a/src/app/components/root.zig
+++ b/src/app/components/root.zig
@@ -1,7 +1,7 @@
-const z = @import("z");
+const zs = @import("zeroscript");
const icons = @import("icons/root.zig").icons;
-pub const components: []const z.Component = &[_]z.Component{
+pub const components = &[_]zs.Component{
@import("navbutton/root.zig").component,
} ++ icons;
diff --git a/src/app/root.zig b/src/app/root.zig
index 2b3554c..bbd07d2 100644
--- a/src/app/root.zig
+++ b/src/app/root.zig
@@ -1,19 +1,19 @@
const builtin = @import("builtin");
const std = @import("std");
-const z = @import("z");
+const zs = @import("zeroscript");
-pub const panic = z.panic;
+pub const panic = zs.panic;
pub const std_options: std.Options = .{
- .logFn = z.log.default,
+ .logFn = zs.log.default,
};
const components = @import("components/root.zig").components;
-pub const app: z.App(.{
+pub const app: zs.App(.{
.name = "Memora",
.globals = &.{
- z.Object.global(.window),
- z.Object.global(.Object),
+ zs.Object.global(.window),
+ zs.Object.global(.Object),
},
.components = components,
.body = .parse(@embedFile("index.html")),