更新 UI 编辑器类型定义格式和引号风格
Project CI / Repository checks (pull_request) Failing after 15s
Project CI / Backend tests (pull_request) Failing after 15s
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled

- 使用ts-rs重新生成绑定
- 调整 `.eslintrc.cjs` 和 `.prettierignore` 配置忽略生成文件
This commit is contained in:
2026-08-19 19:32:08 +08:00
parent 67c050ee5d
commit ba131d5775
14 changed files with 37 additions and 90 deletions
+1
View File
@@ -163,6 +163,7 @@ module.exports = {
'server-rs/target',
'server-rs/target-*',
'apps/desktop-shell/src-tauri/target',
'apps/ai-game-creator-shell/src/features/ui-editor/types/**',
'target',
'src/main.tsx',
'src/App.tsx',
+1
View File
@@ -3,6 +3,7 @@ node_modules
.git
.codex-logs
public/Icons
apps/ai-game-creator-shell/src/features/ui-editor/types/
media
*.log
.preview.*
@@ -1,3 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type ChildrenDisplayMode = 'Stack' | 'Exclusive';
export type ChildrenDisplayMode = "Stack" | "Exclusive";
@@ -1,20 +1,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ContainerAlignment } from './ContainerAlignment';
import type { ContainerAlignment } from "./ContainerAlignment";
/**
* 互斥 Container 定义。没有 Container 即普通 Control。
*/
export type Container =
| 'None'
| { HBox: { alignment: ContainerAlignment; separation: number } }
| { VBox: { alignment: ContainerAlignment; separation: number } }
| { Grid: { columns: number; h_separation: number; v_separation: number } }
| {
Margin: {
margin_left: number;
margin_top: number;
margin_right: number;
margin_bottom: number;
};
}
| { Center: { use_top_left: boolean } };
export type Container = "None" | { "HBox": { alignment: ContainerAlignment, separation: number, } } | { "VBox": { alignment: ContainerAlignment, separation: number, } } | { "Grid": { columns: number, h_separation: number, v_separation: number, } } | { "Margin": { margin_left: number, margin_top: number, margin_right: number, margin_bottom: number, } } | { "Center": { use_top_left: boolean, } };
@@ -1,3 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type ContainerAlignment = 'Begin' | 'Center' | 'End';
export type ContainerAlignment = "Begin" | "Center" | "End";
@@ -1,6 +1,6 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Container } from './Container';
import type { Transform } from './Transform';
import type { Container } from "./Container";
import type { Transform } from "./Transform";
/**
* Godot Control 的 Container 相关布局属性。
@@ -8,11 +8,4 @@ import type { Transform } from './Transform';
* `Transform` 始终被保留。只有直接父节点为 Container 时,父节点才会
* 忽略 child 的 anchors / offsets,改读 minimum size 与 size flags。
*/
export type ControlLayout = {
transform: Transform;
custom_minimum_size: [number, number];
size_flags_horizontal: number;
size_flags_vertical: number;
size_flags_stretch_ratio: number;
container: Container;
};
export type ControlLayout = { transform: Transform, custom_minimum_size: [number, number], size_flags_horizontal: number, size_flags_vertical: number, size_flags_stretch_ratio: number, container: Container, };
@@ -1,13 +1,8 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { HorizontalFillOrigin } from './HorizontalFillOrigin';
import type { Radial90Origin } from './Radial90Origin';
import type { Radial180Origin } from './Radial180Origin';
import type { Radial360Origin } from './Radial360Origin';
import type { VerticalFillOrigin } from './VerticalFillOrigin';
import type { HorizontalFillOrigin } from "./HorizontalFillOrigin";
import type { Radial180Origin } from "./Radial180Origin";
import type { Radial360Origin } from "./Radial360Origin";
import type { Radial90Origin } from "./Radial90Origin";
import type { VerticalFillOrigin } from "./VerticalFillOrigin";
export type FillMethod =
| { Horizontal: HorizontalFillOrigin }
| { Vertical: VerticalFillOrigin }
| { Radial90: { origin: Radial90Origin; clockwise: boolean } }
| { Radial180: { origin: Radial180Origin; clockwise: boolean } }
| { Radial360: { origin: Radial360Origin; clockwise: boolean } };
export type FillMethod = { "Horizontal": HorizontalFillOrigin } | { "Vertical": VerticalFillOrigin } | { "Radial90": { origin: Radial90Origin, clockwise: boolean, } } | { "Radial180": { origin: Radial180Origin, clockwise: boolean, } } | { "Radial360": { origin: Radial360Origin, clockwise: boolean, } };
@@ -1,10 +1,5 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { FontAssetId } from './FontAssetId';
import type { FontAssetMetadata } from './FontAssetMetadata';
import type { FontAssetId } from "./FontAssetId";
import type { FontAssetMetadata } from "./FontAssetMetadata";
export type FontAsset = {
asset_id: FontAssetId;
metadata: FontAssetMetadata;
path: string;
content_sha256: string;
};
export type FontAsset = { asset_id: FontAssetId, metadata: FontAssetMetadata, path: string, content_sha256: string, };
@@ -1,11 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { FontFormat } from './FontFormat';
import type { FontFormat } from "./FontFormat";
export type FontAssetMetadata = {
family_name: string;
face_name: string;
weight: number;
italic: boolean;
format: FontFormat;
source_file_name: string;
};
export type FontAssetMetadata = { family_name: string, face_name: string, weight: number, italic: boolean, format: FontFormat, source_file_name: string, };
@@ -1,3 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type FontFormat = 'TrueType' | 'OpenType' | 'Woff' | 'Woff2';
export type FontFormat = "TrueType" | "OpenType" | "Woff" | "Woff2";
@@ -1,7 +1,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { FontAssetId } from './FontAssetId';
import type { FontAssetId } from "./FontAssetId";
/**
* 文本的字体来源。系统字体是一个明确的有效选择,而不是缺失的字体绑定。
*/
export type FontSource = 'SystemFont' | { Bound: FontAssetId };
export type FontSource = "SystemFont" | { "Bound": FontAssetId };
@@ -1,15 +1,8 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ChildrenDisplayMode } from './ChildrenDisplayMode';
import type { Component } from './Component';
import type { ControlLayout } from './ControlLayout';
import type { NodeId } from './NodeId';
import type { NodeMetadata } from './NodeMetadata';
import type { ChildrenDisplayMode } from "./ChildrenDisplayMode";
import type { Component } from "./Component";
import type { ControlLayout } from "./ControlLayout";
import type { NodeId } from "./NodeId";
import type { NodeMetadata } from "./NodeMetadata";
export type Node = {
id: NodeId;
layout: ControlLayout;
metadata: NodeMetadata;
components: Array<Component>;
children_display_mode: ChildrenDisplayMode;
children: Array<Node>;
};
export type Node = { id: NodeId, layout: ControlLayout, metadata: NodeMetadata, components: Array<Component>, children_display_mode: ChildrenDisplayMode, children: Array<Node>, };
@@ -1,4 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type StageStatus =
'NoProblem' | { NeedReview: string } | { Blocked: string };
export type StageStatus = "NoProblem" | { "NeedReview": string } | { "Blocked": string };
@@ -1,22 +1,12 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { FontSizing } from './FontSizing';
import type { FontSource } from './FontSource';
import type { FontStyle } from './FontStyle';
import type { HorizontalTextOverflow } from './HorizontalTextOverflow';
import type { TextAlignment } from './TextAlignment';
import type { VerticalTextOverflow } from './VerticalTextOverflow';
import type { FontSizing } from "./FontSizing";
import type { FontSource } from "./FontSource";
import type { FontStyle } from "./FontStyle";
import type { HorizontalTextOverflow } from "./HorizontalTextOverflow";
import type { TextAlignment } from "./TextAlignment";
import type { VerticalTextOverflow } from "./VerticalTextOverflow";
/**
* Text / Label 渲染组件;布局由同一 Entity 上独立的 `Control` 提供。
*/
export type TextComponent = {
content: string;
font: FontSource;
font_style: FontStyle;
font_sizing: FontSizing;
color: [number, number, number, number];
alignment: TextAlignment;
horizontal_overflow: HorizontalTextOverflow;
vertical_overflow: VerticalTextOverflow;
line_spacing: number;
};
export type TextComponent = { content: string, font: FontSource, font_style: FontStyle, font_sizing: FontSizing, color: [number, number, number, number], alignment: TextAlignment, horizontal_overflow: HorizontalTextOverflow, vertical_overflow: VerticalTextOverflow, line_spacing: number, };