Files
Chris Tate 04b97cc2b7 feat: add native code editor example (#245)
* feat: add native code editor example

- Add an editable syntax-highlighted code surface with robust selection, large-file rendering, and expanded language coverage.
- Add the declarative Code Editor example with folder navigation, previews, permanent tabs, inline rename, save, and multi-window support.
- Extend tree interactions, macOS folder picking, component docs, tests, and live WASM previews.

* fix: address code editor review findings

* fix code editor large-file stability

* fix: harden large code editor state

* fix: polish code editor interactions

* fix: title empty code explorer windows

* fix: stabilize code editor rendering

* fix: harden code editor edge cases

* fix: address code editor review findings

* fix: resolve remaining code editor review findings

* fix: harden code editing and click handling

* fix: balance code editor tree spacing

* fix: load code editor folders on demand
2026-07-31 20:09:24 -05:00

45 lines
1.9 KiB
Zig

.{
.id = "dev.native_sdk.code_editor",
.name = "code-editor",
.display_name = "Code Editor",
.description = "Choose a folder and edit its source files in a native two-pane window.",
.version = "0.1.0",
.platforms = .{"macos"},
.permissions = .{ "view", "command", "dialog" },
.capabilities = .{ "native_views", "gpu_surfaces" },
.shortcuts = .{
.{ .id = "save-file", .key = "s", .modifiers = .{ "primary" } },
.{ .id = "close-tab", .key = "w", .modifiers = .{ "primary" } },
.{ .id = "open-folder", .key = "o", .modifiers = .{ "primary" } },
.{ .id = "new-window", .key = "n", .modifiers = .{ "primary" } },
.{ .id = "previous-tab", .key = "[", .modifiers = .{ "primary", "shift" } },
.{ .id = "next-tab", .key = "]", .modifiers = .{ "primary", "shift" } },
},
.shell = .{
.windows = .{
.{
.label = "main",
.title = "Native SDK Code Editor",
.width = 1120,
.height = 720,
.min_width = 760,
.min_height = 480,
.restore_state = false,
.restore_policy = "center_on_primary",
.titlebar = "hidden_inset_tall",
.views = .{
.{ .label = "code-editor-canvas", .kind = "gpu_surface", .fill = true, .role = "Code editor canvas", .accessibility_label = "Code editor", .gpu_backend = "metal", .gpu_pixel_format = "bgra8_unorm", .gpu_present_mode = "timer", .gpu_alpha_mode = "opaque", .gpu_color_space = "srgb", .gpu_vsync = true },
},
},
},
},
.security = .{
.navigation = .{
.allowed_origins = .{ "zero://app", "zero://inline" },
.external_links = .{ .action = "deny" },
},
},
.web_engine = "system",
.cef = .{ .dir = "third_party/cef/macos", .auto_install = false },
}