bevy-ts 0.1.0-alpha.6 → 0.1.0-alpha.8

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.
Files changed (2) hide show
  1. package/package.json +6 -6
  2. package/protocol.d.ts +93 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bevy-ts",
3
- "version": "0.1.0-alpha.6",
3
+ "version": "0.1.0-alpha.8",
4
4
  "description": "TypeScript for Bevy: components, systems and hot reload without recompiling Rust",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "repository": {
@@ -59,11 +59,11 @@
59
59
  "examples"
60
60
  ],
61
61
  "optionalDependencies": {
62
- "@bevy-ts/darwin-arm64": "0.1.0-alpha.6",
63
- "@bevy-ts/darwin-x64": "0.1.0-alpha.6",
64
- "@bevy-ts/linux-arm64": "0.1.0-alpha.6",
65
- "@bevy-ts/linux-x64": "0.1.0-alpha.6",
66
- "@bevy-ts/win32-x64": "0.1.0-alpha.6"
62
+ "@bevy-ts/darwin-arm64": "0.1.0-alpha.8",
63
+ "@bevy-ts/darwin-x64": "0.1.0-alpha.8",
64
+ "@bevy-ts/linux-arm64": "0.1.0-alpha.8",
65
+ "@bevy-ts/linux-x64": "0.1.0-alpha.8",
66
+ "@bevy-ts/win32-x64": "0.1.0-alpha.8"
67
67
  },
68
68
  "devDependencies": {
69
69
  "json-schema-to-typescript": "^15.0.4",
package/protocol.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // @generated by packages/bevy-ts/scripts/gen-protocol.mjs from protocol/bevy-ts.openrpc.json. Do not edit.
2
2
 
3
3
  /** The protocol version these types describe. */
4
- export const PROTOCOL_VERSION: "1.19.0";
4
+ export const PROTOCOL_VERSION: "1.21.0";
5
5
 
6
6
  /**
7
7
  * An entity id: Entity::to_bits.
@@ -52,6 +52,13 @@ export type TsxNodeId = string;
52
52
  * via the `definition` "TsxProvenance".
53
53
  */
54
54
  export type TsxProvenance = "controlled" | "initial" | "default" | "bound" | "override";
55
+ /**
56
+ * (1.21) Why a level entry is a placeholder: no live code registers the type (`unregistered`), its code threw or the TS build failed (`failed`), or saved fields or props do not fit live code (`mismatch`).
57
+ *
58
+ * This interface was referenced by `ProtocolTypes`'s JSON-Schema
59
+ * via the `definition` "MissingReason".
60
+ */
61
+ export type MissingReason = "unregistered" | "failed" | "mismatch";
55
62
  /**
56
63
  * A ViewportInput type.
57
64
  *
@@ -842,6 +849,16 @@ export interface TsxTreeNode {
842
849
  * Written in that file, rather than coming from a prefab, an included level or the scene's TSX.
843
850
  */
844
851
  written: boolean;
852
+ /**
853
+ * (1.21) One per placeholder entry on the entity: a component the level writes whose code is missing, failed or does not fit. Absent when there is none.
854
+ */
855
+ missing?: {
856
+ /**
857
+ * The name the level writes.
858
+ */
859
+ component: string;
860
+ reason: MissingReason;
861
+ }[];
845
862
  };
846
863
  /**
847
864
  * (1.15) The root the node is in.
@@ -1155,6 +1172,10 @@ export interface TouchEvent {
1155
1172
  */
1156
1173
  touches: TouchPoint[];
1157
1174
  mods?: Modifiers;
1175
+ /**
1176
+ * (1.20) When the touch happened, in ms on the viewer device's own clock. Only compared within one stream, where it mostly rises: a move sent late keeps its own time.
1177
+ */
1178
+ t?: number;
1158
1179
  }
1159
1180
  /**
1160
1181
  * One touch down.
@@ -2025,7 +2046,7 @@ export interface LevelNodeResult {
2025
2046
  source?: SourceLocation[];
2026
2047
  overrides: LevelOverride[];
2027
2048
  /**
2028
- * The scene component the entity instances, if any.
2049
+ * The scene component the entity instances, if any; still named when it is a placeholder (1.21).
2029
2050
  */
2030
2051
  prefab?: string | null;
2031
2052
  /**
@@ -2036,6 +2057,10 @@ export interface LevelNodeResult {
2036
2057
  * (1.12) Components the file adds that the entity's prefab does not give, named as LevelOverride.component names them.
2037
2058
  */
2038
2059
  patches?: string[];
2060
+ /**
2061
+ * (1.21) The entity's placeholder entries; absent when there is none.
2062
+ */
2063
+ missing?: MissingComponent[];
2039
2064
  }
2040
2065
  /**
2041
2066
  * One @prop of a scene component instance: its type, the value it takes, and whether the level sets it.
@@ -2070,6 +2095,68 @@ export interface SourceLocation1 {
2070
2095
  line: number;
2071
2096
  column: number;
2072
2097
  }
2098
+ /**
2099
+ * (1.21) A component a level writes whose code is missing, failed or does not fit. Its saved text is kept in the file.
2100
+ *
2101
+ * This interface was referenced by `ProtocolTypes`'s JSON-Schema
2102
+ * via the `definition` "MissingComponent".
2103
+ */
2104
+ export interface MissingComponent {
2105
+ /**
2106
+ * The name the level writes (`game::Loot`).
2107
+ */
2108
+ component: string;
2109
+ reason: MissingReason;
2110
+ /**
2111
+ * One line of why.
2112
+ */
2113
+ message?: string;
2114
+ /**
2115
+ * Saved fields and props as written, each value its saved text; a prop keeps its `@`. A mismatch lists only the misfits.
2116
+ */
2117
+ fields: {
2118
+ [k: string]: string;
2119
+ };
2120
+ location: SourceLocation2;
2121
+ expected?: SourceLocation3;
2122
+ /**
2123
+ * mismatch: why each listed field or prop does not fit.
2124
+ */
2125
+ misfit?: {
2126
+ [k: string]: string;
2127
+ };
2128
+ /**
2129
+ * A missing scene component: the entries below it with no base of their own, kept and not spawned.
2130
+ */
2131
+ overrides?: {
2132
+ /**
2133
+ * The name path below the instance.
2134
+ */
2135
+ path: string[];
2136
+ /**
2137
+ * Its patches' saved text, keyed `Component.field`.
2138
+ */
2139
+ fields: {
2140
+ [k: string]: string;
2141
+ };
2142
+ }[];
2143
+ }
2144
+ /**
2145
+ * Where the level writes it.
2146
+ */
2147
+ export interface SourceLocation2 {
2148
+ file: string;
2149
+ line: number;
2150
+ column: number;
2151
+ }
2152
+ /**
2153
+ * Where its code was expected: the throw, the file that did not build, or the declaration this process last saw live. Absent when unknown, as after a restart.
2154
+ */
2155
+ export interface SourceLocation3 {
2156
+ file: string;
2157
+ line: number;
2158
+ column: number;
2159
+ }
2073
2160
  /**
2074
2161
  * This interface was referenced by `ProtocolTypes`'s JSON-Schema
2075
2162
  * via the `definition` "LevelWriteParams".
@@ -2092,7 +2179,7 @@ export interface LevelWriteResult {
2092
2179
  file: string;
2093
2180
  status: "written" | "rebased" | "conflict" | "refused";
2094
2181
  /**
2095
- * conflict: `target removed` or `changed on disk`; refused: `not-found`, `prefab-internal`, `exists`, `invalid`, `internal` or `io`.
2182
+ * conflict: `target removed` or `changed on disk`; refused: `not-found`, `prefab-internal`, `exists`, `invalid`, `internal` or `io`; (1.21) `missing`: a set, revert, set_prop or revert_prop on a placeholder component, `unknown`: a write of a type no live code registers.
2096
2183
  */
2097
2184
  reason?: string | null;
2098
2185
  message?: string | null;
@@ -2174,6 +2261,9 @@ export interface LevelWatchMessage {
2174
2261
  */
2175
2262
  id?: number | null;
2176
2263
  reason?: string | null;
2264
+ /**
2265
+ * failed: the errors; loaded (1.21): the level's diagnostics, a `warning:` per placeholder entry among them.
2266
+ */
2177
2267
  diagnostics?: LevelDiagnostic[];
2178
2268
  opener?: LevelOpener1;
2179
2269
  }