@defold-typescript/types 0.52.0 → 0.53.0
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/api-signatures.json +2074 -1964
- package/examples/translations.json +15 -15
- package/generated/b2d.d.ts +39 -39
- package/generated/b2d_body.d.ts +11 -11
- package/generated/b2d_chain.d.ts +3 -3
- package/generated/b2d_fixture.d.ts +5 -5
- package/generated/b2d_joint.d.ts +29 -29
- package/generated/b2d_shape.d.ts +13 -13
- package/generated/b2d_world.d.ts +15 -15
- package/generated/buffer.d.ts +5 -6
- package/generated/bullet3d.d.ts +6 -6
- package/generated/bullet3d_collision_object.d.ts +9 -9
- package/generated/bullet3d_constraint.d.ts +78 -78
- package/generated/bullet3d_rigid_body.d.ts +3 -3
- package/generated/bullet3d_shape.d.ts +11 -11
- package/generated/bullet3d_world.d.ts +20 -20
- package/generated/camera.d.ts +4 -4
- package/generated/collectionfactory.d.ts +2 -3
- package/generated/collectionproxy.d.ts +5 -5
- package/generated/compute.d.ts +5 -5
- package/generated/crash.d.ts +7 -7
- package/generated/editor-vm/http.d.ts +13 -13
- package/generated/editor-vm/image.d.ts +4 -4
- package/generated/editor-vm/json.d.ts +1 -1
- package/generated/editor-vm/tilemap_tiles.d.ts +9 -9
- package/generated/editor-vm/zip.d.ts +4 -4
- package/generated/editor.d.ts +183 -183
- package/generated/factory.d.ts +2 -3
- package/generated/font.d.ts +4 -4
- package/generated/go.d.ts +10 -12
- package/generated/graphics.d.ts +23 -26
- package/generated/gui.d.ts +44 -58
- package/generated/http.d.ts +2 -2
- package/generated/image.d.ts +12 -12
- package/generated/json.d.ts +4 -4
- package/generated/label.d.ts +5 -5
- package/generated/liveupdate.d.ts +3 -3
- package/generated/material.d.ts +48 -48
- package/generated/model.d.ts +46 -14
- package/generated/particlefx.d.ts +5 -5
- package/generated/physics.d.ts +19 -19
- package/generated/profiler.d.ts +3 -5
- package/generated/render-script-modules/b2d.d.ts +39 -39
- package/generated/render-script-modules/bullet3d.d.ts +5 -5
- package/generated/render-script-modules/collectionfactory.d.ts +1 -2
- package/generated/render-script-modules/collectionproxy.d.ts +3 -3
- package/generated/render-script-modules/factory.d.ts +1 -2
- package/generated/render-script-modules/go.d.ts +8 -10
- package/generated/render-script-modules/label.d.ts +2 -2
- package/generated/render-script-modules/model.d.ts +43 -11
- package/generated/render-script-modules/particlefx.d.ts +3 -3
- package/generated/render-script-modules/physics.d.ts +12 -12
- package/generated/render-script-modules/resource.d.ts +52 -53
- package/generated/render-script-modules/sound.d.ts +4 -4
- package/generated/render-script-modules/sprite.d.ts +2 -2
- package/generated/render-script-modules/tilemap.d.ts +2 -2
- package/generated/render.d.ts +44 -45
- package/generated/resource.d.ts +58 -59
- package/generated/socket.d.ts +18 -23
- package/generated/sound.d.ts +6 -6
- package/generated/sprite.d.ts +3 -3
- package/generated/sys.d.ts +20 -21
- package/generated/tilemap.d.ts +3 -3
- package/generated/timer.d.ts +3 -3
- package/generated/versions/defold-1.12.4/b2d.d.ts +2 -2
- package/generated/versions/defold-1.12.4/b2d_body.d.ts +2 -2
- package/generated/versions/defold-1.12.4/go.d.ts +2 -2
- package/generated/versions/defold-1.12.4/graphics.d.ts +1 -1
- package/generated/versions/defold-1.12.4/gui.d.ts +18 -19
- package/generated/versions/defold-1.12.4/label.d.ts +1 -1
- package/generated/versions/defold-1.12.4/model.d.ts +42 -10
- package/generated/versions/defold-1.12.4/particlefx.d.ts +1 -1
- package/generated/versions/defold-1.12.4/physics.d.ts +1 -1
- package/generated/versions/defold-1.12.4/render.d.ts +5 -5
- package/generated/versions/defold-1.12.4/resource.d.ts +8 -8
- package/generated/versions/defold-1.12.4/socket.d.ts +12 -12
- package/generated/versions/defold-1.12.4/sound.d.ts +1 -1
- package/generated/versions/defold-1.12.4/sprite.d.ts +1 -1
- package/generated/versions/defold-1.12.4/sys.d.ts +2 -2
- package/generated/versions/defold-1.12.4/tilemap.d.ts +1 -1
- package/generated/versions/defold-1.12.4/window.d.ts +3 -4
- package/generated/versions/defold-1.13.0/b2d.d.ts +2 -2
- package/generated/versions/defold-1.13.0/b2d_body.d.ts +2 -2
- package/generated/versions/defold-1.13.0/b2d_chain.d.ts +1 -1
- package/generated/versions/defold-1.13.0/b2d_joint.d.ts +1 -1
- package/generated/versions/defold-1.13.0/b2d_shape.d.ts +1 -1
- package/generated/versions/defold-1.13.0/camera.d.ts +1 -1
- package/generated/versions/defold-1.13.0/go.d.ts +2 -2
- package/generated/versions/defold-1.13.0/graphics.d.ts +1 -1
- package/generated/versions/defold-1.13.0/gui.d.ts +18 -19
- package/generated/versions/defold-1.13.0/label.d.ts +1 -1
- package/generated/versions/defold-1.13.0/model.d.ts +42 -10
- package/generated/versions/defold-1.13.0/particlefx.d.ts +1 -1
- package/generated/versions/defold-1.13.0/physics.d.ts +1 -1
- package/generated/versions/defold-1.13.0/render.d.ts +5 -5
- package/generated/versions/defold-1.13.0/resource.d.ts +8 -8
- package/generated/versions/defold-1.13.0/socket.d.ts +12 -12
- package/generated/versions/defold-1.13.0/sound.d.ts +1 -1
- package/generated/versions/defold-1.13.0/sprite.d.ts +1 -1
- package/generated/versions/defold-1.13.0/sys.d.ts +2 -2
- package/generated/versions/defold-1.13.0/tilemap.d.ts +1 -1
- package/generated/versions/defold-1.13.0/window.d.ts +3 -4
- package/generated/versions/defold-1.13.1/b2d.d.ts +2 -2
- package/generated/versions/defold-1.13.1/b2d_body.d.ts +2 -2
- package/generated/versions/defold-1.13.1/b2d_chain.d.ts +1 -1
- package/generated/versions/defold-1.13.1/b2d_joint.d.ts +1 -1
- package/generated/versions/defold-1.13.1/b2d_shape.d.ts +1 -1
- package/generated/versions/defold-1.13.1/camera.d.ts +1 -1
- package/generated/versions/defold-1.13.1/go.d.ts +2 -2
- package/generated/versions/defold-1.13.1/graphics.d.ts +1 -1
- package/generated/versions/defold-1.13.1/gui.d.ts +18 -19
- package/generated/versions/defold-1.13.1/label.d.ts +1 -1
- package/generated/versions/defold-1.13.1/model.d.ts +42 -10
- package/generated/versions/defold-1.13.1/particlefx.d.ts +1 -1
- package/generated/versions/defold-1.13.1/physics.d.ts +1 -1
- package/generated/versions/defold-1.13.1/render.d.ts +5 -5
- package/generated/versions/defold-1.13.1/resource.d.ts +8 -8
- package/generated/versions/defold-1.13.1/socket.d.ts +12 -12
- package/generated/versions/defold-1.13.1/sound.d.ts +1 -1
- package/generated/versions/defold-1.13.1/sprite.d.ts +1 -1
- package/generated/versions/defold-1.13.1/sys.d.ts +2 -2
- package/generated/versions/defold-1.13.1/tilemap.d.ts +1 -1
- package/generated/versions/defold-1.13.1/window.d.ts +3 -4
- package/generated/versions/defold-1.13.2/b2d.d.ts +39 -39
- package/generated/versions/defold-1.13.2/b2d_body.d.ts +11 -11
- package/generated/versions/defold-1.13.2/b2d_chain.d.ts +3 -3
- package/generated/versions/defold-1.13.2/b2d_fixture.d.ts +5 -5
- package/generated/versions/defold-1.13.2/b2d_joint.d.ts +29 -29
- package/generated/versions/defold-1.13.2/b2d_shape.d.ts +13 -13
- package/generated/versions/defold-1.13.2/b2d_world.d.ts +15 -15
- package/generated/versions/defold-1.13.2/buffer.d.ts +5 -6
- package/generated/versions/defold-1.13.2/bullet3d.d.ts +6 -6
- package/generated/versions/defold-1.13.2/bullet3d_collision_object.d.ts +9 -9
- package/generated/versions/defold-1.13.2/bullet3d_constraint.d.ts +78 -78
- package/generated/versions/defold-1.13.2/bullet3d_rigid_body.d.ts +3 -3
- package/generated/versions/defold-1.13.2/bullet3d_shape.d.ts +11 -11
- package/generated/versions/defold-1.13.2/bullet3d_world.d.ts +20 -20
- package/generated/versions/defold-1.13.2/camera.d.ts +4 -4
- package/generated/versions/defold-1.13.2/collectionfactory.d.ts +2 -3
- package/generated/versions/defold-1.13.2/collectionproxy.d.ts +5 -5
- package/generated/versions/defold-1.13.2/compute.d.ts +5 -5
- package/generated/versions/defold-1.13.2/crash.d.ts +7 -7
- package/generated/versions/defold-1.13.2/editor-vm/http.d.ts +13 -13
- package/generated/versions/defold-1.13.2/editor-vm/image.d.ts +4 -4
- package/generated/versions/defold-1.13.2/editor-vm/json.d.ts +1 -1
- package/generated/versions/defold-1.13.2/editor-vm/tilemap_tiles.d.ts +9 -9
- package/generated/versions/defold-1.13.2/editor-vm/zip.d.ts +4 -4
- package/generated/versions/defold-1.13.2/editor.d.ts +183 -183
- package/generated/versions/defold-1.13.2/factory.d.ts +2 -3
- package/generated/versions/defold-1.13.2/font.d.ts +4 -4
- package/generated/versions/defold-1.13.2/go.d.ts +10 -12
- package/generated/versions/defold-1.13.2/graphics.d.ts +22 -25
- package/generated/versions/defold-1.13.2/gui.d.ts +44 -58
- package/generated/versions/defold-1.13.2/http.d.ts +2 -2
- package/generated/versions/defold-1.13.2/image.d.ts +12 -12
- package/generated/versions/defold-1.13.2/json.d.ts +4 -4
- package/generated/versions/defold-1.13.2/label.d.ts +5 -5
- package/generated/versions/defold-1.13.2/liveupdate.d.ts +3 -3
- package/generated/versions/defold-1.13.2/material.d.ts +48 -48
- package/generated/versions/defold-1.13.2/model.d.ts +46 -14
- package/generated/versions/defold-1.13.2/particlefx.d.ts +5 -5
- package/generated/versions/defold-1.13.2/physics.d.ts +19 -19
- package/generated/versions/defold-1.13.2/profiler.d.ts +3 -5
- package/generated/versions/defold-1.13.2/render.d.ts +43 -44
- package/generated/versions/defold-1.13.2/resource.d.ts +58 -59
- package/generated/versions/defold-1.13.2/socket.d.ts +18 -23
- package/generated/versions/defold-1.13.2/sound.d.ts +6 -6
- package/generated/versions/defold-1.13.2/sprite.d.ts +3 -3
- package/generated/versions/defold-1.13.2/sys.d.ts +20 -21
- package/generated/versions/defold-1.13.2/tilemap.d.ts +3 -3
- package/generated/versions/defold-1.13.2/timer.d.ts +3 -3
- package/generated/versions/defold-1.13.2/vmath.d.ts +0 -1
- package/generated/versions/defold-1.13.2/window.d.ts +8 -10
- package/generated/vmath.d.ts +0 -1
- package/generated/window.d.ts +8 -10
- package/identity-vocabulary.json +41 -34
- package/package.json +2 -1
- package/scripts/generate-api-availability.ts +9 -3
- package/scripts/shared-handle-methods.ts +3 -2
- package/src/api-doc.ts +8 -0
- package/src/api-identity.ts +32 -1
- package/src/component-properties.d.ts +8 -8
- package/src/core-types.ts +29 -13
- package/src/doc-corrections.ts +9 -0
- package/src/emit-dts.ts +664 -202
- package/src/engine-type-name.ts +33 -0
- package/src/go-overloads.d.ts +10 -10
- package/src/gui-overloads.d.ts +11 -11
- package/src/index.ts +1 -0
- package/src/lifecycle.ts +2 -2
- package/src/socket-types.d.ts +3 -3
|
@@ -6,13 +6,13 @@ declare global {
|
|
|
6
6
|
* Editor scripting documentation
|
|
7
7
|
*/
|
|
8
8
|
namespace editor {
|
|
9
|
-
type
|
|
10
|
-
type
|
|
11
|
-
type
|
|
12
|
-
type
|
|
13
|
-
type
|
|
14
|
-
type
|
|
15
|
-
type
|
|
9
|
+
type Command = Opaque<"command">;
|
|
10
|
+
type Component = Opaque<"component">;
|
|
11
|
+
type Image = Opaque<"editor.image">;
|
|
12
|
+
type Message = Opaque<"message">;
|
|
13
|
+
type Schema = Opaque<"editor.schema">;
|
|
14
|
+
type Tiles = Opaque<"editor.tiles">;
|
|
15
|
+
type TransactionStep = Opaque<"transaction_step">;
|
|
16
16
|
/**
|
|
17
17
|
* A string, SHA1 of Defold editor
|
|
18
18
|
*/
|
|
@@ -137,7 +137,7 @@ declare global {
|
|
|
137
137
|
* editor.create_resources([{ 1: "/npc.script", 2: "go.property('hp', 100)" }]);
|
|
138
138
|
* ```
|
|
139
139
|
*/
|
|
140
|
-
function create_resources(resources: (string | editor.create_resources.
|
|
140
|
+
function create_resources(resources: (string | editor.create_resources.Resource)[]): void;
|
|
141
141
|
/**
|
|
142
142
|
* Delete a directory if it exists, and all existent child directories and files.
|
|
143
143
|
* Throws an error if the directory can't be deleted.
|
|
@@ -172,14 +172,14 @@ declare global {
|
|
|
172
172
|
* });
|
|
173
173
|
* ```
|
|
174
174
|
*/
|
|
175
|
-
function execute(command: string, ...args: (string | editor.execute.
|
|
175
|
+
function execute(command: string, ...args: (string | editor.execute.Options)[]): undefined | string;
|
|
176
176
|
/**
|
|
177
177
|
* Query information about file system path
|
|
178
178
|
*
|
|
179
179
|
* @param path - External file path, resolved against project root if relative
|
|
180
180
|
* @returns external file attributes
|
|
181
181
|
*/
|
|
182
|
-
function external_file_attributes(path: string): editor.external_file_attributes.
|
|
182
|
+
function external_file_attributes(path: string): editor.external_file_attributes.Result;
|
|
183
183
|
/**
|
|
184
184
|
* Download the latest version of the project library dependencies and reload library-provided editor scripts.
|
|
185
185
|
* This function may replace library-provided editor commands, hooks, routes, and UI contributed by editor scripts, so it should typically be the last operation performed by a command.
|
|
@@ -214,7 +214,7 @@ declare global {
|
|
|
214
214
|
* @param resource_path - Resource path (starting with `/`)
|
|
215
215
|
* @returns resource attributes
|
|
216
216
|
*/
|
|
217
|
-
function resource_attributes(resource_path: string): editor.resource_attributes.
|
|
217
|
+
function resource_attributes(resource_path: string): editor.resource_attributes.Result;
|
|
218
218
|
/**
|
|
219
219
|
* Persist any unsaved changes to disk
|
|
220
220
|
*/
|
|
@@ -229,7 +229,7 @@ declare global {
|
|
|
229
229
|
/**
|
|
230
230
|
* Context provided to editor command handler functions
|
|
231
231
|
*/
|
|
232
|
-
interface
|
|
232
|
+
interface Context {
|
|
233
233
|
/**
|
|
234
234
|
* current selection, populated when requested by the command query
|
|
235
235
|
*/
|
|
@@ -243,11 +243,11 @@ declare global {
|
|
|
243
243
|
*/
|
|
244
244
|
argument?: unknown;
|
|
245
245
|
}
|
|
246
|
-
type
|
|
246
|
+
type Location = "Assets" | "Bundle" | "Code" | "Debug" | "Edit" | "Help" | "Outline" | "Project" | "Scene" | "View";
|
|
247
247
|
/**
|
|
248
248
|
* Options used to create an editor command
|
|
249
249
|
*/
|
|
250
|
-
interface
|
|
250
|
+
interface Options {
|
|
251
251
|
/**
|
|
252
252
|
* user-visible command name, either a string or a localization message
|
|
253
253
|
*/
|
|
@@ -255,11 +255,11 @@ declare global {
|
|
|
255
255
|
/**
|
|
256
256
|
* non-empty list of locations where the command is displayed
|
|
257
257
|
*/
|
|
258
|
-
locations: editor.command.
|
|
258
|
+
locations: editor.command.Location[];
|
|
259
259
|
/**
|
|
260
260
|
* query that controls command availability and provides context to its handler functions
|
|
261
261
|
*/
|
|
262
|
-
query?: editor.command.
|
|
262
|
+
query?: editor.command.Query;
|
|
263
263
|
/**
|
|
264
264
|
* keyword identifier that may be used for assigning a shortcut to a command; should be a dot-separated identifier string, e.g. `"my-extension.do-stuff"`
|
|
265
265
|
*/
|
|
@@ -267,24 +267,24 @@ declare global {
|
|
|
267
267
|
/**
|
|
268
268
|
* function that additionally checks if a command is active in the current context; should be fast to execute since the editor might invoke it in response to UI interactions
|
|
269
269
|
*/
|
|
270
|
-
active?: (opts: editor.command.
|
|
270
|
+
active?: (opts: editor.command.Context) => boolean;
|
|
271
271
|
/**
|
|
272
272
|
* function that is invoked when the user decides to execute the command
|
|
273
273
|
*/
|
|
274
|
-
run?: (opts: editor.command.
|
|
274
|
+
run?: (opts: editor.command.Context) => unknown;
|
|
275
275
|
}
|
|
276
276
|
/**
|
|
277
277
|
* A query that controls command availability and provides context to its handler functions
|
|
278
278
|
*/
|
|
279
|
-
interface
|
|
279
|
+
interface Query {
|
|
280
280
|
/**
|
|
281
281
|
* current selection request
|
|
282
282
|
*/
|
|
283
|
-
selection?: editor.command.query.
|
|
283
|
+
selection?: editor.command.query.Selection;
|
|
284
284
|
/**
|
|
285
285
|
* current active editor view request
|
|
286
286
|
*/
|
|
287
|
-
active_view?: editor.command.query.
|
|
287
|
+
active_view?: editor.command.query.ActiveView;
|
|
288
288
|
/**
|
|
289
289
|
* set to true to provide the command argument to the handler functions
|
|
290
290
|
*/
|
|
@@ -294,7 +294,7 @@ declare global {
|
|
|
294
294
|
/**
|
|
295
295
|
* Active editor view requested by an editor command
|
|
296
296
|
*/
|
|
297
|
-
interface
|
|
297
|
+
interface ActiveView {
|
|
298
298
|
/**
|
|
299
299
|
* active editor view type
|
|
300
300
|
*/
|
|
@@ -303,7 +303,7 @@ declare global {
|
|
|
303
303
|
/**
|
|
304
304
|
* Selection requested by an editor command
|
|
305
305
|
*/
|
|
306
|
-
interface
|
|
306
|
+
interface Selection {
|
|
307
307
|
/**
|
|
308
308
|
* selection type
|
|
309
309
|
*/
|
|
@@ -316,13 +316,13 @@ declare global {
|
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
namespace create_resources {
|
|
319
|
-
type
|
|
319
|
+
type Resource = { 1: string; 2?: string };
|
|
320
320
|
}
|
|
321
321
|
namespace execute {
|
|
322
322
|
/**
|
|
323
323
|
* Options for editor.execute
|
|
324
324
|
*/
|
|
325
|
-
interface
|
|
325
|
+
interface Options {
|
|
326
326
|
/**
|
|
327
327
|
* whether the editor reloads resources from disk after the command is executed; defaults to true
|
|
328
328
|
*/
|
|
@@ -341,7 +341,7 @@ declare global {
|
|
|
341
341
|
/**
|
|
342
342
|
* External file attributes
|
|
343
343
|
*/
|
|
344
|
-
interface
|
|
344
|
+
interface Result {
|
|
345
345
|
/**
|
|
346
346
|
* resolved file path
|
|
347
347
|
*/
|
|
@@ -361,7 +361,7 @@ declare global {
|
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
namespace prefs {
|
|
364
|
-
type
|
|
364
|
+
type Scope = typeof editor.prefs.SCOPE.GLOBAL | typeof editor.prefs.SCOPE.PROJECT;
|
|
365
365
|
/**
|
|
366
366
|
* Get preference value
|
|
367
367
|
* The schema for the preference value should be defined beforehand.
|
|
@@ -393,28 +393,28 @@ declare global {
|
|
|
393
393
|
* @param opts - schema options
|
|
394
394
|
* @returns Prefs schema
|
|
395
395
|
*/
|
|
396
|
-
export function array(opts: editor.prefs.schema.array.
|
|
396
|
+
export function array(opts: editor.prefs.schema.array.Options): editor.Schema;
|
|
397
397
|
/**
|
|
398
398
|
* boolean schema
|
|
399
399
|
*
|
|
400
400
|
* @param opts - schema options
|
|
401
401
|
* @returns Prefs schema
|
|
402
402
|
*/
|
|
403
|
-
export function boolean(opts?: editor.prefs.schema.boolean.
|
|
403
|
+
export function boolean(opts?: editor.prefs.schema.boolean.Options): editor.Schema;
|
|
404
404
|
/**
|
|
405
405
|
* enum value schema
|
|
406
406
|
*
|
|
407
407
|
* @param opts - schema options
|
|
408
408
|
* @returns Prefs schema
|
|
409
409
|
*/
|
|
410
|
-
function _enum(opts: editor.prefs.schema.enum.
|
|
410
|
+
function _enum(opts: editor.prefs.schema.enum.Options): editor.Schema;
|
|
411
411
|
/**
|
|
412
412
|
* integer schema
|
|
413
413
|
*
|
|
414
414
|
* @param opts - schema options
|
|
415
415
|
* @returns Prefs schema
|
|
416
416
|
*/
|
|
417
|
-
export function integer(opts?: editor.prefs.schema.integer.
|
|
417
|
+
export function integer(opts?: editor.prefs.schema.integer.Options): editor.Schema;
|
|
418
418
|
/**
|
|
419
419
|
* keyword schema
|
|
420
420
|
* A keyword is a short string that is interned within the editor runtime, useful e.g. for identifiers
|
|
@@ -422,35 +422,35 @@ declare global {
|
|
|
422
422
|
* @param opts - schema options
|
|
423
423
|
* @returns Prefs schema
|
|
424
424
|
*/
|
|
425
|
-
export function keyword(opts?: editor.prefs.schema.keyword.
|
|
425
|
+
export function keyword(opts?: editor.prefs.schema.keyword.Options): editor.Schema;
|
|
426
426
|
/**
|
|
427
427
|
* floating-point number schema
|
|
428
428
|
*
|
|
429
429
|
* @param opts - schema options
|
|
430
430
|
* @returns Prefs schema
|
|
431
431
|
*/
|
|
432
|
-
export function number(opts?: editor.prefs.schema.number.
|
|
432
|
+
export function number(opts?: editor.prefs.schema.number.Options): editor.Schema;
|
|
433
433
|
/**
|
|
434
434
|
* heterogeneous object schema
|
|
435
435
|
*
|
|
436
436
|
* @param opts - schema options
|
|
437
437
|
* @returns Prefs schema
|
|
438
438
|
*/
|
|
439
|
-
export function object(opts: editor.prefs.schema.object.
|
|
439
|
+
export function object(opts: editor.prefs.schema.object.Options): editor.Schema;
|
|
440
440
|
/**
|
|
441
441
|
* homogeneous object schema
|
|
442
442
|
*
|
|
443
443
|
* @param opts - schema options
|
|
444
444
|
* @returns Prefs schema
|
|
445
445
|
*/
|
|
446
|
-
export function object_of(opts: editor.prefs.schema.object_of.
|
|
446
|
+
export function object_of(opts: editor.prefs.schema.object_of.Options): editor.Schema;
|
|
447
447
|
/**
|
|
448
448
|
* one of schema
|
|
449
449
|
*
|
|
450
450
|
* @param opts - schema options
|
|
451
451
|
* @returns Prefs schema
|
|
452
452
|
*/
|
|
453
|
-
export function one_of(opts: editor.prefs.schema.one_of.
|
|
453
|
+
export function one_of(opts: editor.prefs.schema.one_of.Options): editor.Schema;
|
|
454
454
|
/**
|
|
455
455
|
* password schema
|
|
456
456
|
* A password is a string that is encrypted when stored in a preference file
|
|
@@ -458,7 +458,7 @@ declare global {
|
|
|
458
458
|
* @param opts - schema options
|
|
459
459
|
* @returns Prefs schema
|
|
460
460
|
*/
|
|
461
|
-
export function password(opts?: editor.prefs.schema.password.
|
|
461
|
+
export function password(opts?: editor.prefs.schema.password.Options): editor.Schema;
|
|
462
462
|
/**
|
|
463
463
|
* set schema
|
|
464
464
|
* Set is represented as a lua table with `true` values
|
|
@@ -466,14 +466,14 @@ declare global {
|
|
|
466
466
|
* @param opts - schema options
|
|
467
467
|
* @returns Prefs schema
|
|
468
468
|
*/
|
|
469
|
-
export function set(opts: editor.prefs.schema.set.
|
|
469
|
+
export function set(opts: editor.prefs.schema.set.Options): editor.Schema;
|
|
470
470
|
/**
|
|
471
471
|
* string schema
|
|
472
472
|
*
|
|
473
473
|
* @param opts - schema options
|
|
474
474
|
* @returns Prefs schema
|
|
475
475
|
*/
|
|
476
|
-
export function string(opts?: editor.prefs.schema.string.
|
|
476
|
+
export function string(opts?: editor.prefs.schema.string.Options): editor.Schema;
|
|
477
477
|
/**
|
|
478
478
|
* tuple schema
|
|
479
479
|
* A tuple is a fixed-length array where each item has its own defined type
|
|
@@ -481,17 +481,17 @@ declare global {
|
|
|
481
481
|
* @param opts - schema options
|
|
482
482
|
* @returns Prefs schema
|
|
483
483
|
*/
|
|
484
|
-
export function tuple(opts: editor.prefs.schema.tuple.
|
|
484
|
+
export function tuple(opts: editor.prefs.schema.tuple.Options): editor.Schema;
|
|
485
485
|
export { _enum as enum };
|
|
486
486
|
export namespace array {
|
|
487
487
|
/**
|
|
488
488
|
* Options for editor.prefs.schema.array
|
|
489
489
|
*/
|
|
490
|
-
interface
|
|
490
|
+
interface Options {
|
|
491
491
|
/**
|
|
492
492
|
* array item schema
|
|
493
493
|
*/
|
|
494
|
-
item: editor.
|
|
494
|
+
item: editor.Schema;
|
|
495
495
|
/**
|
|
496
496
|
* default value
|
|
497
497
|
*/
|
|
@@ -499,14 +499,14 @@ declare global {
|
|
|
499
499
|
/**
|
|
500
500
|
* preference scope; global values are shared by every project on this computer, while project values are stored separately per project
|
|
501
501
|
*/
|
|
502
|
-
scope?: editor.prefs.
|
|
502
|
+
scope?: editor.prefs.Scope;
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
export namespace boolean {
|
|
506
506
|
/**
|
|
507
507
|
* Options for editor.prefs.schema.boolean
|
|
508
508
|
*/
|
|
509
|
-
interface
|
|
509
|
+
interface Options {
|
|
510
510
|
/**
|
|
511
511
|
* default value
|
|
512
512
|
*/
|
|
@@ -514,14 +514,14 @@ declare global {
|
|
|
514
514
|
/**
|
|
515
515
|
* preference scope; global values are shared by every project on this computer, while project values are stored separately per project
|
|
516
516
|
*/
|
|
517
|
-
scope?: editor.prefs.
|
|
517
|
+
scope?: editor.prefs.Scope;
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
520
|
namespace _enum {
|
|
521
521
|
/**
|
|
522
522
|
* Options for editor.prefs.schema.enum
|
|
523
523
|
*/
|
|
524
|
-
interface
|
|
524
|
+
interface Options {
|
|
525
525
|
/**
|
|
526
526
|
* allowed values, must be scalar (nil, boolean, number or string)
|
|
527
527
|
*/
|
|
@@ -533,14 +533,14 @@ declare global {
|
|
|
533
533
|
/**
|
|
534
534
|
* preference scope; global values are shared by every project on this computer, while project values are stored separately per project
|
|
535
535
|
*/
|
|
536
|
-
scope?: editor.prefs.
|
|
536
|
+
scope?: editor.prefs.Scope;
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
539
|
export namespace integer {
|
|
540
540
|
/**
|
|
541
541
|
* Options for editor.prefs.schema.integer
|
|
542
542
|
*/
|
|
543
|
-
interface
|
|
543
|
+
interface Options {
|
|
544
544
|
/**
|
|
545
545
|
* default value
|
|
546
546
|
*/
|
|
@@ -548,14 +548,14 @@ declare global {
|
|
|
548
548
|
/**
|
|
549
549
|
* preference scope; global values are shared by every project on this computer, while project values are stored separately per project
|
|
550
550
|
*/
|
|
551
|
-
scope?: editor.prefs.
|
|
551
|
+
scope?: editor.prefs.Scope;
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
554
|
export namespace keyword {
|
|
555
555
|
/**
|
|
556
556
|
* Options for editor.prefs.schema.keyword
|
|
557
557
|
*/
|
|
558
|
-
interface
|
|
558
|
+
interface Options {
|
|
559
559
|
/**
|
|
560
560
|
* default value
|
|
561
561
|
*/
|
|
@@ -563,14 +563,14 @@ declare global {
|
|
|
563
563
|
/**
|
|
564
564
|
* preference scope; global values are shared by every project on this computer, while project values are stored separately per project
|
|
565
565
|
*/
|
|
566
|
-
scope?: editor.prefs.
|
|
566
|
+
scope?: editor.prefs.Scope;
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
569
|
export namespace number {
|
|
570
570
|
/**
|
|
571
571
|
* Options for editor.prefs.schema.number
|
|
572
572
|
*/
|
|
573
|
-
interface
|
|
573
|
+
interface Options {
|
|
574
574
|
/**
|
|
575
575
|
* default value
|
|
576
576
|
*/
|
|
@@ -578,18 +578,18 @@ declare global {
|
|
|
578
578
|
/**
|
|
579
579
|
* preference scope; global values are shared by every project on this computer, while project values are stored separately per project
|
|
580
580
|
*/
|
|
581
|
-
scope?: editor.prefs.
|
|
581
|
+
scope?: editor.prefs.Scope;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
584
|
export namespace object {
|
|
585
585
|
/**
|
|
586
586
|
* Options for editor.prefs.schema.object
|
|
587
587
|
*/
|
|
588
|
-
interface
|
|
588
|
+
interface Options {
|
|
589
589
|
/**
|
|
590
590
|
* a table from property key (string) to value schema
|
|
591
591
|
*/
|
|
592
|
-
properties: LuaTable<string, editor.
|
|
592
|
+
properties: LuaTable<string, editor.Schema>;
|
|
593
593
|
/**
|
|
594
594
|
* default value
|
|
595
595
|
*/
|
|
@@ -597,22 +597,22 @@ declare global {
|
|
|
597
597
|
/**
|
|
598
598
|
* preference scope; global values are shared by every project on this computer, while project values are stored separately per project
|
|
599
599
|
*/
|
|
600
|
-
scope?: editor.prefs.
|
|
600
|
+
scope?: editor.prefs.Scope;
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
603
|
export namespace object_of {
|
|
604
604
|
/**
|
|
605
605
|
* Options for editor.prefs.schema.object_of
|
|
606
606
|
*/
|
|
607
|
-
interface
|
|
607
|
+
interface Options {
|
|
608
608
|
/**
|
|
609
609
|
* table key schema
|
|
610
610
|
*/
|
|
611
|
-
key: editor.
|
|
611
|
+
key: editor.Schema;
|
|
612
612
|
/**
|
|
613
613
|
* table value schema
|
|
614
614
|
*/
|
|
615
|
-
val: editor.
|
|
615
|
+
val: editor.Schema;
|
|
616
616
|
/**
|
|
617
617
|
* default value
|
|
618
618
|
*/
|
|
@@ -620,18 +620,18 @@ declare global {
|
|
|
620
620
|
/**
|
|
621
621
|
* preference scope; global values are shared by every project on this computer, while project values are stored separately per project
|
|
622
622
|
*/
|
|
623
|
-
scope?: editor.prefs.
|
|
623
|
+
scope?: editor.prefs.Scope;
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
626
|
export namespace one_of {
|
|
627
627
|
/**
|
|
628
628
|
* Options for editor.prefs.schema.one_of
|
|
629
629
|
*/
|
|
630
|
-
interface
|
|
630
|
+
interface Options {
|
|
631
631
|
/**
|
|
632
632
|
* alternative schemas
|
|
633
633
|
*/
|
|
634
|
-
schemas: editor.
|
|
634
|
+
schemas: editor.Schema[];
|
|
635
635
|
/**
|
|
636
636
|
* default value
|
|
637
637
|
*/
|
|
@@ -639,14 +639,14 @@ declare global {
|
|
|
639
639
|
/**
|
|
640
640
|
* preference scope; global values are shared by every project on this computer, while project values are stored separately per project
|
|
641
641
|
*/
|
|
642
|
-
scope?: editor.prefs.
|
|
642
|
+
scope?: editor.prefs.Scope;
|
|
643
643
|
}
|
|
644
644
|
}
|
|
645
645
|
export namespace password {
|
|
646
646
|
/**
|
|
647
647
|
* Options for editor.prefs.schema.password
|
|
648
648
|
*/
|
|
649
|
-
interface
|
|
649
|
+
interface Options {
|
|
650
650
|
/**
|
|
651
651
|
* default value
|
|
652
652
|
*/
|
|
@@ -654,18 +654,18 @@ declare global {
|
|
|
654
654
|
/**
|
|
655
655
|
* preference scope; global values are shared by every project on this computer, while project values are stored separately per project
|
|
656
656
|
*/
|
|
657
|
-
scope?: editor.prefs.
|
|
657
|
+
scope?: editor.prefs.Scope;
|
|
658
658
|
}
|
|
659
659
|
}
|
|
660
660
|
export namespace set {
|
|
661
661
|
/**
|
|
662
662
|
* Options for editor.prefs.schema.set
|
|
663
663
|
*/
|
|
664
|
-
interface
|
|
664
|
+
interface Options {
|
|
665
665
|
/**
|
|
666
666
|
* set item schema
|
|
667
667
|
*/
|
|
668
|
-
item: editor.
|
|
668
|
+
item: editor.Schema;
|
|
669
669
|
/**
|
|
670
670
|
* default value
|
|
671
671
|
*/
|
|
@@ -673,14 +673,14 @@ declare global {
|
|
|
673
673
|
/**
|
|
674
674
|
* preference scope; global values are shared by every project on this computer, while project values are stored separately per project
|
|
675
675
|
*/
|
|
676
|
-
scope?: editor.prefs.
|
|
676
|
+
scope?: editor.prefs.Scope;
|
|
677
677
|
}
|
|
678
678
|
}
|
|
679
679
|
export namespace string {
|
|
680
680
|
/**
|
|
681
681
|
* Options for editor.prefs.schema.string
|
|
682
682
|
*/
|
|
683
|
-
interface
|
|
683
|
+
interface Options {
|
|
684
684
|
/**
|
|
685
685
|
* default value
|
|
686
686
|
*/
|
|
@@ -688,18 +688,18 @@ declare global {
|
|
|
688
688
|
/**
|
|
689
689
|
* preference scope; global values are shared by every project on this computer, while project values are stored separately per project
|
|
690
690
|
*/
|
|
691
|
-
scope?: editor.prefs.
|
|
691
|
+
scope?: editor.prefs.Scope;
|
|
692
692
|
}
|
|
693
693
|
}
|
|
694
694
|
export namespace tuple {
|
|
695
695
|
/**
|
|
696
696
|
* Options for editor.prefs.schema.tuple
|
|
697
697
|
*/
|
|
698
|
-
interface
|
|
698
|
+
interface Options {
|
|
699
699
|
/**
|
|
700
700
|
* schemas for the items
|
|
701
701
|
*/
|
|
702
|
-
items: editor.
|
|
702
|
+
items: editor.Schema[];
|
|
703
703
|
/**
|
|
704
704
|
* default value
|
|
705
705
|
*/
|
|
@@ -707,7 +707,7 @@ declare global {
|
|
|
707
707
|
/**
|
|
708
708
|
* preference scope; global values are shared by every project on this computer, while project values are stored separately per project
|
|
709
709
|
*/
|
|
710
|
-
scope?: editor.prefs.
|
|
710
|
+
scope?: editor.prefs.Scope;
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
713
|
}
|
|
@@ -726,7 +726,7 @@ declare global {
|
|
|
726
726
|
/**
|
|
727
727
|
* Project resource attributes
|
|
728
728
|
*/
|
|
729
|
-
interface
|
|
729
|
+
interface Result {
|
|
730
730
|
/**
|
|
731
731
|
* whether a resource identified by the path exists in the project
|
|
732
732
|
*/
|
|
@@ -799,7 +799,7 @@ declare global {
|
|
|
799
799
|
/**
|
|
800
800
|
* External file dialog filter
|
|
801
801
|
*/
|
|
802
|
-
interface
|
|
802
|
+
interface ExternalFileFilter {
|
|
803
803
|
/**
|
|
804
804
|
* text explaining the filter, either a literal string like `"Text files (*.txt)"` or a localization message
|
|
805
805
|
*/
|
|
@@ -812,39 +812,39 @@ declare global {
|
|
|
812
812
|
/**
|
|
813
813
|
* Issue associated with an input component
|
|
814
814
|
*/
|
|
815
|
-
interface
|
|
815
|
+
interface Issue {
|
|
816
816
|
/**
|
|
817
817
|
* issue severity
|
|
818
818
|
*/
|
|
819
|
-
severity: editor.ui.
|
|
819
|
+
severity: editor.ui.IssueSeverity;
|
|
820
820
|
/**
|
|
821
821
|
* issue message shown in a tooltip, either a string or a localization message
|
|
822
822
|
*/
|
|
823
823
|
message: string | Opaque<"message">;
|
|
824
824
|
}
|
|
825
|
-
type
|
|
826
|
-
type
|
|
827
|
-
type
|
|
828
|
-
type
|
|
829
|
-
type
|
|
830
|
-
type
|
|
831
|
-
type
|
|
832
|
-
type
|
|
833
|
-
type
|
|
825
|
+
type Alignment = typeof editor.ui.ALIGNMENT.TOP_LEFT | typeof editor.ui.ALIGNMENT.TOP | typeof editor.ui.ALIGNMENT.TOP_RIGHT | typeof editor.ui.ALIGNMENT.LEFT | typeof editor.ui.ALIGNMENT.CENTER | typeof editor.ui.ALIGNMENT.RIGHT | typeof editor.ui.ALIGNMENT.BOTTOM_LEFT | typeof editor.ui.ALIGNMENT.BOTTOM | typeof editor.ui.ALIGNMENT.BOTTOM_RIGHT;
|
|
826
|
+
type Color = typeof editor.ui.COLOR.TEXT | typeof editor.ui.COLOR.HINT | typeof editor.ui.COLOR.OVERRIDE | typeof editor.ui.COLOR.WARNING | typeof editor.ui.COLOR.ERROR;
|
|
827
|
+
type HeadingStyle = typeof editor.ui.HEADING_STYLE.H1 | typeof editor.ui.HEADING_STYLE.H2 | typeof editor.ui.HEADING_STYLE.H3 | typeof editor.ui.HEADING_STYLE.H4 | typeof editor.ui.HEADING_STYLE.H5 | typeof editor.ui.HEADING_STYLE.H6 | typeof editor.ui.HEADING_STYLE.DIALOG | typeof editor.ui.HEADING_STYLE.FORM;
|
|
828
|
+
type Icon = typeof editor.ui.ICON.OPEN_RESOURCE | typeof editor.ui.ICON.PLUS | typeof editor.ui.ICON.MINUS | typeof editor.ui.ICON.CLEAR;
|
|
829
|
+
type IssueSeverity = typeof editor.ui.ISSUE_SEVERITY.WARNING | typeof editor.ui.ISSUE_SEVERITY.ERROR;
|
|
830
|
+
type Orientation = typeof editor.ui.ORIENTATION.VERTICAL | typeof editor.ui.ORIENTATION.HORIZONTAL;
|
|
831
|
+
type Padding = typeof editor.ui.PADDING.NONE | typeof editor.ui.PADDING.SMALL | typeof editor.ui.PADDING.MEDIUM | typeof editor.ui.PADDING.LARGE;
|
|
832
|
+
type Spacing = typeof editor.ui.SPACING.NONE | typeof editor.ui.SPACING.SMALL | typeof editor.ui.SPACING.MEDIUM | typeof editor.ui.SPACING.LARGE;
|
|
833
|
+
type TextAlignment = typeof editor.ui.TEXT_ALIGNMENT.LEFT | typeof editor.ui.TEXT_ALIGNMENT.CENTER | typeof editor.ui.TEXT_ALIGNMENT.RIGHT | typeof editor.ui.TEXT_ALIGNMENT.JUSTIFY;
|
|
834
834
|
/**
|
|
835
835
|
* Button with a label and/or an icon
|
|
836
836
|
*
|
|
837
837
|
* @param props - component properties
|
|
838
838
|
* @returns UI component
|
|
839
839
|
*/
|
|
840
|
-
function button(props: editor.ui.button.
|
|
840
|
+
function button(props: editor.ui.button.Props): Opaque<"component">;
|
|
841
841
|
/**
|
|
842
842
|
* Check box with a label
|
|
843
843
|
*
|
|
844
844
|
* @param props - component properties
|
|
845
845
|
* @returns UI component
|
|
846
846
|
*/
|
|
847
|
-
function check_box(props: editor.ui.check_box.
|
|
847
|
+
function check_box(props: editor.ui.check_box.Props): Opaque<"component">;
|
|
848
848
|
/**
|
|
849
849
|
* Convert a function to a UI component.
|
|
850
850
|
* The wrapped function may call any hooks functions (`editor.ui.use_*`), but on any function invocation, the hooks calls must be the same, and in the same order. This means that hooks should not be used inside loops and conditions or after a conditional return statement.
|
|
@@ -860,77 +860,77 @@ declare global {
|
|
|
860
860
|
* @param props - component properties
|
|
861
861
|
* @returns UI component
|
|
862
862
|
*/
|
|
863
|
-
function dialog(props: editor.ui.dialog.
|
|
863
|
+
function dialog(props: editor.ui.dialog.Props): Opaque<"component">;
|
|
864
864
|
/**
|
|
865
865
|
* Dialog button shown in the footer of a dialog
|
|
866
866
|
*
|
|
867
867
|
* @param props - component properties
|
|
868
868
|
* @returns UI component
|
|
869
869
|
*/
|
|
870
|
-
function dialog_button(props: editor.ui.dialog_button.
|
|
870
|
+
function dialog_button(props: editor.ui.dialog_button.Props): Opaque<"component">;
|
|
871
871
|
/**
|
|
872
872
|
* Input component for selecting files from the file system
|
|
873
873
|
*
|
|
874
874
|
* @param props - component properties
|
|
875
875
|
* @returns UI component
|
|
876
876
|
*/
|
|
877
|
-
function external_file_field(props: editor.ui.external_file_field.
|
|
877
|
+
function external_file_field(props: editor.ui.external_file_field.Props): Opaque<"component">;
|
|
878
878
|
/**
|
|
879
879
|
* Layout container that places its children in a 2D grid
|
|
880
880
|
*
|
|
881
881
|
* @param props - component properties
|
|
882
882
|
* @returns UI component
|
|
883
883
|
*/
|
|
884
|
-
function grid(props: editor.ui.grid.
|
|
884
|
+
function grid(props: editor.ui.grid.Props): Opaque<"component">;
|
|
885
885
|
/**
|
|
886
886
|
* A text heading
|
|
887
887
|
*
|
|
888
888
|
* @param props - component properties
|
|
889
889
|
* @returns UI component
|
|
890
890
|
*/
|
|
891
|
-
function heading(props: editor.ui.heading.
|
|
891
|
+
function heading(props: editor.ui.heading.Props): Opaque<"component">;
|
|
892
892
|
/**
|
|
893
893
|
* Layout container that places its children in a horizontal row one after another
|
|
894
894
|
*
|
|
895
895
|
* @param props - component properties
|
|
896
896
|
* @returns UI component
|
|
897
897
|
*/
|
|
898
|
-
function horizontal(props: editor.ui.horizontal.
|
|
898
|
+
function horizontal(props: editor.ui.horizontal.Props): Opaque<"component">;
|
|
899
899
|
/**
|
|
900
900
|
* An icon from a predefined set
|
|
901
901
|
*
|
|
902
902
|
* @param props - component properties
|
|
903
903
|
* @returns UI component
|
|
904
904
|
*/
|
|
905
|
-
function icon(props: editor.ui.icon.
|
|
905
|
+
function icon(props: editor.ui.icon.Props): Opaque<"component">;
|
|
906
906
|
/**
|
|
907
907
|
* An image
|
|
908
908
|
*
|
|
909
909
|
* @param props - component properties
|
|
910
910
|
* @returns UI component
|
|
911
911
|
*/
|
|
912
|
-
function image(props: editor.ui.image.
|
|
912
|
+
function image(props: editor.ui.image.Props): Opaque<"component">;
|
|
913
913
|
/**
|
|
914
914
|
* Integer input component based on a text field, reports changes on commit (`Enter` or focus loss)
|
|
915
915
|
*
|
|
916
916
|
* @param props - component properties
|
|
917
917
|
* @returns UI component
|
|
918
918
|
*/
|
|
919
|
-
function integer_field(props: editor.ui.integer_field.
|
|
919
|
+
function integer_field(props: editor.ui.integer_field.Props): Opaque<"component">;
|
|
920
920
|
/**
|
|
921
921
|
* Label intended for use with input components
|
|
922
922
|
*
|
|
923
923
|
* @param props - component properties
|
|
924
924
|
* @returns UI component
|
|
925
925
|
*/
|
|
926
|
-
function label(props: editor.ui.label.
|
|
926
|
+
function label(props: editor.ui.label.Props): Opaque<"component">;
|
|
927
927
|
/**
|
|
928
928
|
* Number input component based on a text field, reports changes on commit (`Enter` or focus loss)
|
|
929
929
|
*
|
|
930
930
|
* @param props - component properties
|
|
931
931
|
* @returns UI component
|
|
932
932
|
*/
|
|
933
|
-
function number_field(props: editor.ui.number_field.
|
|
933
|
+
function number_field(props: editor.ui.number_field.Props): Opaque<"component">;
|
|
934
934
|
/**
|
|
935
935
|
* Open a resource using its primary or selected view, either in the editor or in a third-party app. Code and Text views accept a one-based cursor or range in `args`: `{line = 42}`, `{line = 42, column = 12}`, or `{from = {line = 42, column = 12}, to = {line = 43, column = 4}}`
|
|
936
936
|
*
|
|
@@ -945,35 +945,35 @@ declare global {
|
|
|
945
945
|
* @param props - component properties
|
|
946
946
|
* @returns UI component
|
|
947
947
|
*/
|
|
948
|
-
function paragraph(props: editor.ui.paragraph.
|
|
948
|
+
function paragraph(props: editor.ui.paragraph.Props): Opaque<"component">;
|
|
949
949
|
/**
|
|
950
950
|
* Input component for selecting project resources
|
|
951
951
|
*
|
|
952
952
|
* @param props - component properties
|
|
953
953
|
* @returns UI component
|
|
954
954
|
*/
|
|
955
|
-
function resource_field(props: editor.ui.resource_field.
|
|
955
|
+
function resource_field(props: editor.ui.resource_field.Props): Opaque<"component">;
|
|
956
956
|
/**
|
|
957
957
|
* Layout container that optionally shows scroll bars if child contents overflow the assigned bounds
|
|
958
958
|
*
|
|
959
959
|
* @param props - component properties
|
|
960
960
|
* @returns UI component
|
|
961
961
|
*/
|
|
962
|
-
function scroll(props: editor.ui.scroll.
|
|
962
|
+
function scroll(props: editor.ui.scroll.Props): Opaque<"component">;
|
|
963
963
|
/**
|
|
964
964
|
* Dropdown select box with an array of options
|
|
965
965
|
*
|
|
966
966
|
* @param props - component properties
|
|
967
967
|
* @returns UI component
|
|
968
968
|
*/
|
|
969
|
-
function select_box(props: editor.ui.select_box.
|
|
969
|
+
function select_box(props: editor.ui.select_box.Props): Opaque<"component">;
|
|
970
970
|
/**
|
|
971
971
|
* Thin line for visual content separation, by default horizontal and aligned to center
|
|
972
972
|
*
|
|
973
973
|
* @param props - component properties
|
|
974
974
|
* @returns UI component
|
|
975
975
|
*/
|
|
976
|
-
function separator(props: editor.ui.separator.
|
|
976
|
+
function separator(props: editor.ui.separator.Props): Opaque<"component">;
|
|
977
977
|
/**
|
|
978
978
|
* Show a dialog and await a result
|
|
979
979
|
*
|
|
@@ -987,42 +987,42 @@ declare global {
|
|
|
987
987
|
* @param opts - dialog options
|
|
988
988
|
* @returns either absolute directory path or nil if user canceled directory selection
|
|
989
989
|
*/
|
|
990
|
-
function show_external_directory_dialog(opts?: editor.ui.show_external_directory_dialog.
|
|
990
|
+
function show_external_directory_dialog(opts?: editor.ui.show_external_directory_dialog.Options): string | undefined;
|
|
991
991
|
/**
|
|
992
992
|
* Show a modal OS file selection dialog and await a result
|
|
993
993
|
*
|
|
994
994
|
* @param opts - dialog options
|
|
995
995
|
* @returns either absolute file path or nil if user canceled file selection
|
|
996
996
|
*/
|
|
997
|
-
function show_external_file_dialog(opts?: editor.ui.show_external_file_dialog.
|
|
997
|
+
function show_external_file_dialog(opts?: editor.ui.show_external_file_dialog.Options): string | undefined;
|
|
998
998
|
/**
|
|
999
999
|
* Show a modal resource selection dialog and await a result
|
|
1000
1000
|
*
|
|
1001
1001
|
* @param opts - dialog options
|
|
1002
1002
|
* @returns if user made no selection, returns `nil`. Otherwise, if selection mode is `"single"`, returns selected resource path; otherwise returns a non-empty array of selected resource paths.
|
|
1003
1003
|
*/
|
|
1004
|
-
function show_resource_dialog(opts?: editor.ui.show_resource_dialog.
|
|
1004
|
+
function show_resource_dialog(opts?: editor.ui.show_resource_dialog.Options): string | string[] | undefined;
|
|
1005
1005
|
/**
|
|
1006
1006
|
* String input component based on a text field, reports changes on commit (`Enter` or focus loss)
|
|
1007
1007
|
*
|
|
1008
1008
|
* @param props - component properties
|
|
1009
1009
|
* @returns UI component
|
|
1010
1010
|
*/
|
|
1011
|
-
function string_field(props: editor.ui.string_field.
|
|
1011
|
+
function string_field(props: editor.ui.string_field.Props): Opaque<"component">;
|
|
1012
1012
|
/**
|
|
1013
1013
|
* Tab used in the `tabs` prop of `editor.ui.tabs(...)`
|
|
1014
1014
|
*
|
|
1015
1015
|
* @param props - component properties
|
|
1016
1016
|
* @returns UI component
|
|
1017
1017
|
*/
|
|
1018
|
-
function tab(props: editor.ui.tab.
|
|
1018
|
+
function tab(props: editor.ui.tab.Props): Opaque<"component">;
|
|
1019
1019
|
/**
|
|
1020
1020
|
* Layout container that shows one selected tab content at a time
|
|
1021
1021
|
*
|
|
1022
1022
|
* @param props - component properties
|
|
1023
1023
|
* @returns UI component
|
|
1024
1024
|
*/
|
|
1025
|
-
function tabs(props: editor.ui.tabs.
|
|
1025
|
+
function tabs(props: editor.ui.tabs.Props): Opaque<"component">;
|
|
1026
1026
|
/**
|
|
1027
1027
|
* A hook that caches the result of a computation between re-renders.
|
|
1028
1028
|
* See `editor.ui.component` for hooks caveats and rules. If any of the arguments to `use_memo` change during a component refresh (checked with `==`), the value will be recomputed.
|
|
@@ -1083,7 +1083,7 @@ declare global {
|
|
|
1083
1083
|
* @param props - component properties
|
|
1084
1084
|
* @returns UI component
|
|
1085
1085
|
*/
|
|
1086
|
-
function vertical(props: editor.ui.vertical.
|
|
1086
|
+
function vertical(props: editor.ui.vertical.Props): Opaque<"component">;
|
|
1087
1087
|
namespace ALIGNMENT {
|
|
1088
1088
|
/**
|
|
1089
1089
|
* `"bottom"`
|
|
@@ -1126,7 +1126,7 @@ declare global {
|
|
|
1126
1126
|
/**
|
|
1127
1127
|
* Properties for editor.ui.button
|
|
1128
1128
|
*/
|
|
1129
|
-
interface
|
|
1129
|
+
interface Props {
|
|
1130
1130
|
/**
|
|
1131
1131
|
* button press callback, will be invoked without arguments when the user presses the button
|
|
1132
1132
|
*/
|
|
@@ -1138,11 +1138,11 @@ declare global {
|
|
|
1138
1138
|
/**
|
|
1139
1139
|
* text alignment within paragraph bounds
|
|
1140
1140
|
*/
|
|
1141
|
-
text_alignment?: editor.ui.
|
|
1141
|
+
text_alignment?: editor.ui.TextAlignment;
|
|
1142
1142
|
/**
|
|
1143
1143
|
* predefined icon name
|
|
1144
1144
|
*/
|
|
1145
|
-
icon?: editor.ui.
|
|
1145
|
+
icon?: editor.ui.Icon;
|
|
1146
1146
|
/**
|
|
1147
1147
|
* determines if the input component can be interacted with
|
|
1148
1148
|
*/
|
|
@@ -1150,7 +1150,7 @@ declare global {
|
|
|
1150
1150
|
/**
|
|
1151
1151
|
* alignment of the component content within its assigned bounds, defaults to `editor.ui.ALIGNMENT.TOP_LEFT`
|
|
1152
1152
|
*/
|
|
1153
|
-
alignment?: editor.ui.
|
|
1153
|
+
alignment?: editor.ui.Alignment;
|
|
1154
1154
|
/**
|
|
1155
1155
|
* determines if the component should grow to fill available space in a `horizontal` or `vertical` layout container
|
|
1156
1156
|
*/
|
|
@@ -1169,7 +1169,7 @@ declare global {
|
|
|
1169
1169
|
/**
|
|
1170
1170
|
* Properties for editor.ui.check_box
|
|
1171
1171
|
*/
|
|
1172
|
-
interface
|
|
1172
|
+
interface Props {
|
|
1173
1173
|
/**
|
|
1174
1174
|
* determines if the checkbox should appear checked
|
|
1175
1175
|
*/
|
|
@@ -1189,11 +1189,11 @@ declare global {
|
|
|
1189
1189
|
/**
|
|
1190
1190
|
* text alignment within paragraph bounds
|
|
1191
1191
|
*/
|
|
1192
|
-
text_alignment?: editor.ui.
|
|
1192
|
+
text_alignment?: editor.ui.TextAlignment;
|
|
1193
1193
|
/**
|
|
1194
1194
|
* issue related to the input, or false if there is no issue
|
|
1195
1195
|
*/
|
|
1196
|
-
issue?: editor.ui.
|
|
1196
|
+
issue?: editor.ui.Issue | false;
|
|
1197
1197
|
/**
|
|
1198
1198
|
* tooltip message shown on hover; either a string or a localization message
|
|
1199
1199
|
*/
|
|
@@ -1205,7 +1205,7 @@ declare global {
|
|
|
1205
1205
|
/**
|
|
1206
1206
|
* alignment of the component content within its assigned bounds, defaults to `editor.ui.ALIGNMENT.TOP_LEFT`
|
|
1207
1207
|
*/
|
|
1208
|
-
alignment?: editor.ui.
|
|
1208
|
+
alignment?: editor.ui.Alignment;
|
|
1209
1209
|
/**
|
|
1210
1210
|
* determines if the component should grow to fill available space in a `horizontal` or `vertical` layout container
|
|
1211
1211
|
*/
|
|
@@ -1246,7 +1246,7 @@ declare global {
|
|
|
1246
1246
|
/**
|
|
1247
1247
|
* Properties for editor.ui.dialog
|
|
1248
1248
|
*/
|
|
1249
|
-
interface
|
|
1249
|
+
interface Props {
|
|
1250
1250
|
/**
|
|
1251
1251
|
* OS dialog window title, either a string or a localization message
|
|
1252
1252
|
*/
|
|
@@ -1285,7 +1285,7 @@ declare global {
|
|
|
1285
1285
|
/**
|
|
1286
1286
|
* Properties for editor.ui.dialog_button
|
|
1287
1287
|
*/
|
|
1288
|
-
interface
|
|
1288
|
+
interface Props {
|
|
1289
1289
|
/**
|
|
1290
1290
|
* button text, either a string or a localization message
|
|
1291
1291
|
*/
|
|
@@ -1312,7 +1312,7 @@ declare global {
|
|
|
1312
1312
|
/**
|
|
1313
1313
|
* Properties for editor.ui.external_file_field
|
|
1314
1314
|
*/
|
|
1315
|
-
interface
|
|
1315
|
+
interface Props {
|
|
1316
1316
|
/**
|
|
1317
1317
|
* file or directory path; resolved against project root if relative
|
|
1318
1318
|
*/
|
|
@@ -1328,11 +1328,11 @@ declare global {
|
|
|
1328
1328
|
/**
|
|
1329
1329
|
* File filters
|
|
1330
1330
|
*/
|
|
1331
|
-
filters?: editor.ui.
|
|
1331
|
+
filters?: editor.ui.ExternalFileFilter[];
|
|
1332
1332
|
/**
|
|
1333
1333
|
* issue related to the input, or false if there is no issue
|
|
1334
1334
|
*/
|
|
1335
|
-
issue?: editor.ui.
|
|
1335
|
+
issue?: editor.ui.Issue | false;
|
|
1336
1336
|
/**
|
|
1337
1337
|
* tooltip message shown on hover; either a string or a localization message
|
|
1338
1338
|
*/
|
|
@@ -1344,7 +1344,7 @@ declare global {
|
|
|
1344
1344
|
/**
|
|
1345
1345
|
* alignment of the component content within its assigned bounds, defaults to `editor.ui.ALIGNMENT.TOP_LEFT`
|
|
1346
1346
|
*/
|
|
1347
|
-
alignment?: editor.ui.
|
|
1347
|
+
alignment?: editor.ui.Alignment;
|
|
1348
1348
|
/**
|
|
1349
1349
|
* determines if the component should grow to fill available space in a `horizontal` or `vertical` layout container
|
|
1350
1350
|
*/
|
|
@@ -1363,7 +1363,7 @@ declare global {
|
|
|
1363
1363
|
/**
|
|
1364
1364
|
* Grid row or column constraint
|
|
1365
1365
|
*/
|
|
1366
|
-
interface
|
|
1366
|
+
interface Constraint {
|
|
1367
1367
|
/**
|
|
1368
1368
|
* whether the row or column should grow to fill available space
|
|
1369
1369
|
*/
|
|
@@ -1372,7 +1372,7 @@ declare global {
|
|
|
1372
1372
|
/**
|
|
1373
1373
|
* Properties for editor.ui.grid
|
|
1374
1374
|
*/
|
|
1375
|
-
interface
|
|
1375
|
+
interface Props {
|
|
1376
1376
|
/**
|
|
1377
1377
|
* array of arrays of child components
|
|
1378
1378
|
*/
|
|
@@ -1380,23 +1380,23 @@ declare global {
|
|
|
1380
1380
|
/**
|
|
1381
1381
|
* separate configuration for each row
|
|
1382
1382
|
*/
|
|
1383
|
-
rows?: (editor.ui.grid.
|
|
1383
|
+
rows?: (editor.ui.grid.Constraint | false)[];
|
|
1384
1384
|
/**
|
|
1385
1385
|
* separate configuration for each column
|
|
1386
1386
|
*/
|
|
1387
|
-
columns?: (editor.ui.grid.
|
|
1387
|
+
columns?: (editor.ui.grid.Constraint | false)[];
|
|
1388
1388
|
/**
|
|
1389
1389
|
* empty space from the edges of the container to its children, either a predefined padding value or a non-negative number of pixels
|
|
1390
1390
|
*/
|
|
1391
|
-
padding?: editor.ui.
|
|
1391
|
+
padding?: editor.ui.Padding | number;
|
|
1392
1392
|
/**
|
|
1393
1393
|
* empty space between child components, either a predefined spacing value or a non-negative number of pixels; defaults to `editor.ui.SPACING.MEDIUM`
|
|
1394
1394
|
*/
|
|
1395
|
-
spacing?: editor.ui.
|
|
1395
|
+
spacing?: editor.ui.Spacing | number;
|
|
1396
1396
|
/**
|
|
1397
1397
|
* alignment of the component content within its assigned bounds, defaults to `editor.ui.ALIGNMENT.TOP_LEFT`
|
|
1398
1398
|
*/
|
|
1399
|
-
alignment?: editor.ui.
|
|
1399
|
+
alignment?: editor.ui.Alignment;
|
|
1400
1400
|
/**
|
|
1401
1401
|
* determines if the component should grow to fill available space in a `horizontal` or `vertical` layout container
|
|
1402
1402
|
*/
|
|
@@ -1415,7 +1415,7 @@ declare global {
|
|
|
1415
1415
|
/**
|
|
1416
1416
|
* Properties for editor.ui.heading
|
|
1417
1417
|
*/
|
|
1418
|
-
interface
|
|
1418
|
+
interface Props {
|
|
1419
1419
|
/**
|
|
1420
1420
|
* the text, either a string or a localization message
|
|
1421
1421
|
*/
|
|
@@ -1423,11 +1423,11 @@ declare global {
|
|
|
1423
1423
|
/**
|
|
1424
1424
|
* text alignment within paragraph bounds
|
|
1425
1425
|
*/
|
|
1426
|
-
text_alignment?: editor.ui.
|
|
1426
|
+
text_alignment?: editor.ui.TextAlignment;
|
|
1427
1427
|
/**
|
|
1428
1428
|
* semantic color, defaults to `editor.ui.COLOR.TEXT`
|
|
1429
1429
|
*/
|
|
1430
|
-
color?: editor.ui.
|
|
1430
|
+
color?: editor.ui.Color;
|
|
1431
1431
|
/**
|
|
1432
1432
|
* determines if the lines of text are word-wrapped when they don't fit in the assigned bounds, defaults to true
|
|
1433
1433
|
*/
|
|
@@ -1435,11 +1435,11 @@ declare global {
|
|
|
1435
1435
|
/**
|
|
1436
1436
|
* heading style, defaults to `editor.ui.HEADING_STYLE.H3`
|
|
1437
1437
|
*/
|
|
1438
|
-
style?: editor.ui.
|
|
1438
|
+
style?: editor.ui.HeadingStyle;
|
|
1439
1439
|
/**
|
|
1440
1440
|
* alignment of the component content within its assigned bounds, defaults to `editor.ui.ALIGNMENT.TOP_LEFT`
|
|
1441
1441
|
*/
|
|
1442
|
-
alignment?: editor.ui.
|
|
1442
|
+
alignment?: editor.ui.Alignment;
|
|
1443
1443
|
/**
|
|
1444
1444
|
* determines if the component should grow to fill available space in a `horizontal` or `vertical` layout container
|
|
1445
1445
|
*/
|
|
@@ -1492,7 +1492,7 @@ declare global {
|
|
|
1492
1492
|
/**
|
|
1493
1493
|
* Properties for editor.ui.horizontal
|
|
1494
1494
|
*/
|
|
1495
|
-
interface
|
|
1495
|
+
interface Props {
|
|
1496
1496
|
/**
|
|
1497
1497
|
* array of child components
|
|
1498
1498
|
*/
|
|
@@ -1500,15 +1500,15 @@ declare global {
|
|
|
1500
1500
|
/**
|
|
1501
1501
|
* empty space from the edges of the container to its children, either a predefined padding value or a non-negative number of pixels
|
|
1502
1502
|
*/
|
|
1503
|
-
padding?: editor.ui.
|
|
1503
|
+
padding?: editor.ui.Padding | number;
|
|
1504
1504
|
/**
|
|
1505
1505
|
* empty space between child components, either a predefined spacing value or a non-negative number of pixels; defaults to `editor.ui.SPACING.MEDIUM`
|
|
1506
1506
|
*/
|
|
1507
|
-
spacing?: editor.ui.
|
|
1507
|
+
spacing?: editor.ui.Spacing | number;
|
|
1508
1508
|
/**
|
|
1509
1509
|
* alignment of the component content within its assigned bounds, defaults to `editor.ui.ALIGNMENT.TOP_LEFT`
|
|
1510
1510
|
*/
|
|
1511
|
-
alignment?: editor.ui.
|
|
1511
|
+
alignment?: editor.ui.Alignment;
|
|
1512
1512
|
/**
|
|
1513
1513
|
* determines if the component should grow to fill available space in a `horizontal` or `vertical` layout container
|
|
1514
1514
|
*/
|
|
@@ -1527,15 +1527,15 @@ declare global {
|
|
|
1527
1527
|
/**
|
|
1528
1528
|
* Properties for editor.ui.icon
|
|
1529
1529
|
*/
|
|
1530
|
-
interface
|
|
1530
|
+
interface Props {
|
|
1531
1531
|
/**
|
|
1532
1532
|
* predefined icon name
|
|
1533
1533
|
*/
|
|
1534
|
-
icon: editor.ui.
|
|
1534
|
+
icon: editor.ui.Icon;
|
|
1535
1535
|
/**
|
|
1536
1536
|
* alignment of the component content within its assigned bounds, defaults to `editor.ui.ALIGNMENT.TOP_LEFT`
|
|
1537
1537
|
*/
|
|
1538
|
-
alignment?: editor.ui.
|
|
1538
|
+
alignment?: editor.ui.Alignment;
|
|
1539
1539
|
/**
|
|
1540
1540
|
* determines if the component should grow to fill available space in a `horizontal` or `vertical` layout container
|
|
1541
1541
|
*/
|
|
@@ -1572,7 +1572,7 @@ declare global {
|
|
|
1572
1572
|
/**
|
|
1573
1573
|
* Properties for editor.ui.image
|
|
1574
1574
|
*/
|
|
1575
|
-
interface
|
|
1575
|
+
interface Props {
|
|
1576
1576
|
/**
|
|
1577
1577
|
* either a resource path (starts with `/`), or an URL
|
|
1578
1578
|
*/
|
|
@@ -1588,7 +1588,7 @@ declare global {
|
|
|
1588
1588
|
/**
|
|
1589
1589
|
* alignment of the component content within its assigned bounds, defaults to `editor.ui.ALIGNMENT.TOP_LEFT`
|
|
1590
1590
|
*/
|
|
1591
|
-
alignment?: editor.ui.
|
|
1591
|
+
alignment?: editor.ui.Alignment;
|
|
1592
1592
|
/**
|
|
1593
1593
|
* determines if the component should grow to fill available space in a `horizontal` or `vertical` layout container
|
|
1594
1594
|
*/
|
|
@@ -1607,7 +1607,7 @@ declare global {
|
|
|
1607
1607
|
/**
|
|
1608
1608
|
* Properties for editor.ui.integer_field
|
|
1609
1609
|
*/
|
|
1610
|
-
interface
|
|
1610
|
+
interface Props {
|
|
1611
1611
|
/**
|
|
1612
1612
|
* value
|
|
1613
1613
|
*/
|
|
@@ -1619,7 +1619,7 @@ declare global {
|
|
|
1619
1619
|
/**
|
|
1620
1620
|
* issue related to the input, or false if there is no issue
|
|
1621
1621
|
*/
|
|
1622
|
-
issue?: editor.ui.
|
|
1622
|
+
issue?: editor.ui.Issue | false;
|
|
1623
1623
|
/**
|
|
1624
1624
|
* tooltip message shown on hover; either a string or a localization message
|
|
1625
1625
|
*/
|
|
@@ -1631,7 +1631,7 @@ declare global {
|
|
|
1631
1631
|
/**
|
|
1632
1632
|
* alignment of the component content within its assigned bounds, defaults to `editor.ui.ALIGNMENT.TOP_LEFT`
|
|
1633
1633
|
*/
|
|
1634
|
-
alignment?: editor.ui.
|
|
1634
|
+
alignment?: editor.ui.Alignment;
|
|
1635
1635
|
/**
|
|
1636
1636
|
* determines if the component should grow to fill available space in a `horizontal` or `vertical` layout container
|
|
1637
1637
|
*/
|
|
@@ -1660,7 +1660,7 @@ declare global {
|
|
|
1660
1660
|
/**
|
|
1661
1661
|
* Properties for editor.ui.label
|
|
1662
1662
|
*/
|
|
1663
|
-
interface
|
|
1663
|
+
interface Props {
|
|
1664
1664
|
/**
|
|
1665
1665
|
* the text, either a string or a localization message
|
|
1666
1666
|
*/
|
|
@@ -1668,11 +1668,11 @@ declare global {
|
|
|
1668
1668
|
/**
|
|
1669
1669
|
* text alignment within paragraph bounds
|
|
1670
1670
|
*/
|
|
1671
|
-
text_alignment?: editor.ui.
|
|
1671
|
+
text_alignment?: editor.ui.TextAlignment;
|
|
1672
1672
|
/**
|
|
1673
1673
|
* semantic color, defaults to `editor.ui.COLOR.TEXT`
|
|
1674
1674
|
*/
|
|
1675
|
-
color?: editor.ui.
|
|
1675
|
+
color?: editor.ui.Color;
|
|
1676
1676
|
/**
|
|
1677
1677
|
* tooltip message shown on hover; either a string or a localization message
|
|
1678
1678
|
*/
|
|
@@ -1680,7 +1680,7 @@ declare global {
|
|
|
1680
1680
|
/**
|
|
1681
1681
|
* alignment of the component content within its assigned bounds, defaults to `editor.ui.ALIGNMENT.TOP_LEFT`
|
|
1682
1682
|
*/
|
|
1683
|
-
alignment?: editor.ui.
|
|
1683
|
+
alignment?: editor.ui.Alignment;
|
|
1684
1684
|
/**
|
|
1685
1685
|
* determines if the component should grow to fill available space in a `horizontal` or `vertical` layout container
|
|
1686
1686
|
*/
|
|
@@ -1699,7 +1699,7 @@ declare global {
|
|
|
1699
1699
|
/**
|
|
1700
1700
|
* Properties for editor.ui.number_field
|
|
1701
1701
|
*/
|
|
1702
|
-
interface
|
|
1702
|
+
interface Props {
|
|
1703
1703
|
/**
|
|
1704
1704
|
* value
|
|
1705
1705
|
*/
|
|
@@ -1711,7 +1711,7 @@ declare global {
|
|
|
1711
1711
|
/**
|
|
1712
1712
|
* issue related to the input, or false if there is no issue
|
|
1713
1713
|
*/
|
|
1714
|
-
issue?: editor.ui.
|
|
1714
|
+
issue?: editor.ui.Issue | false;
|
|
1715
1715
|
/**
|
|
1716
1716
|
* tooltip message shown on hover; either a string or a localization message
|
|
1717
1717
|
*/
|
|
@@ -1723,7 +1723,7 @@ declare global {
|
|
|
1723
1723
|
/**
|
|
1724
1724
|
* alignment of the component content within its assigned bounds, defaults to `editor.ui.ALIGNMENT.TOP_LEFT`
|
|
1725
1725
|
*/
|
|
1726
|
-
alignment?: editor.ui.
|
|
1726
|
+
alignment?: editor.ui.Alignment;
|
|
1727
1727
|
/**
|
|
1728
1728
|
* determines if the component should grow to fill available space in a `horizontal` or `vertical` layout container
|
|
1729
1729
|
*/
|
|
@@ -1770,7 +1770,7 @@ declare global {
|
|
|
1770
1770
|
/**
|
|
1771
1771
|
* Properties for editor.ui.paragraph
|
|
1772
1772
|
*/
|
|
1773
|
-
interface
|
|
1773
|
+
interface Props {
|
|
1774
1774
|
/**
|
|
1775
1775
|
* the text, either a string or a localization message
|
|
1776
1776
|
*/
|
|
@@ -1778,11 +1778,11 @@ declare global {
|
|
|
1778
1778
|
/**
|
|
1779
1779
|
* text alignment within paragraph bounds
|
|
1780
1780
|
*/
|
|
1781
|
-
text_alignment?: editor.ui.
|
|
1781
|
+
text_alignment?: editor.ui.TextAlignment;
|
|
1782
1782
|
/**
|
|
1783
1783
|
* semantic color, defaults to `editor.ui.COLOR.TEXT`
|
|
1784
1784
|
*/
|
|
1785
|
-
color?: editor.ui.
|
|
1785
|
+
color?: editor.ui.Color;
|
|
1786
1786
|
/**
|
|
1787
1787
|
* determines if the lines of text are word-wrapped when they don't fit in the assigned bounds, defaults to true
|
|
1788
1788
|
*/
|
|
@@ -1790,7 +1790,7 @@ declare global {
|
|
|
1790
1790
|
/**
|
|
1791
1791
|
* alignment of the component content within its assigned bounds, defaults to `editor.ui.ALIGNMENT.TOP_LEFT`
|
|
1792
1792
|
*/
|
|
1793
|
-
alignment?: editor.ui.
|
|
1793
|
+
alignment?: editor.ui.Alignment;
|
|
1794
1794
|
/**
|
|
1795
1795
|
* determines if the component should grow to fill available space in a `horizontal` or `vertical` layout container
|
|
1796
1796
|
*/
|
|
@@ -1809,7 +1809,7 @@ declare global {
|
|
|
1809
1809
|
/**
|
|
1810
1810
|
* Properties for editor.ui.resource_field
|
|
1811
1811
|
*/
|
|
1812
|
-
interface
|
|
1812
|
+
interface Props {
|
|
1813
1813
|
/**
|
|
1814
1814
|
* resource path (must start with `/`)
|
|
1815
1815
|
*/
|
|
@@ -1829,7 +1829,7 @@ declare global {
|
|
|
1829
1829
|
/**
|
|
1830
1830
|
* issue related to the input, or false if there is no issue
|
|
1831
1831
|
*/
|
|
1832
|
-
issue?: editor.ui.
|
|
1832
|
+
issue?: editor.ui.Issue | false;
|
|
1833
1833
|
/**
|
|
1834
1834
|
* tooltip message shown on hover; either a string or a localization message
|
|
1835
1835
|
*/
|
|
@@ -1841,7 +1841,7 @@ declare global {
|
|
|
1841
1841
|
/**
|
|
1842
1842
|
* alignment of the component content within its assigned bounds, defaults to `editor.ui.ALIGNMENT.TOP_LEFT`
|
|
1843
1843
|
*/
|
|
1844
|
-
alignment?: editor.ui.
|
|
1844
|
+
alignment?: editor.ui.Alignment;
|
|
1845
1845
|
/**
|
|
1846
1846
|
* determines if the component should grow to fill available space in a `horizontal` or `vertical` layout container
|
|
1847
1847
|
*/
|
|
@@ -1860,7 +1860,7 @@ declare global {
|
|
|
1860
1860
|
/**
|
|
1861
1861
|
* Properties for editor.ui.scroll
|
|
1862
1862
|
*/
|
|
1863
|
-
interface
|
|
1863
|
+
interface Props {
|
|
1864
1864
|
/**
|
|
1865
1865
|
* content component
|
|
1866
1866
|
*/
|
|
@@ -1883,7 +1883,7 @@ declare global {
|
|
|
1883
1883
|
/**
|
|
1884
1884
|
* Properties for editor.ui.select_box
|
|
1885
1885
|
*/
|
|
1886
|
-
interface
|
|
1886
|
+
interface Props {
|
|
1887
1887
|
/**
|
|
1888
1888
|
* selected value
|
|
1889
1889
|
*/
|
|
@@ -1903,7 +1903,7 @@ declare global {
|
|
|
1903
1903
|
/**
|
|
1904
1904
|
* issue related to the input, or false if there is no issue
|
|
1905
1905
|
*/
|
|
1906
|
-
issue?: editor.ui.
|
|
1906
|
+
issue?: editor.ui.Issue | false;
|
|
1907
1907
|
/**
|
|
1908
1908
|
* tooltip message shown on hover; either a string or a localization message
|
|
1909
1909
|
*/
|
|
@@ -1915,7 +1915,7 @@ declare global {
|
|
|
1915
1915
|
/**
|
|
1916
1916
|
* alignment of the component content within its assigned bounds, defaults to `editor.ui.ALIGNMENT.TOP_LEFT`
|
|
1917
1917
|
*/
|
|
1918
|
-
alignment?: editor.ui.
|
|
1918
|
+
alignment?: editor.ui.Alignment;
|
|
1919
1919
|
/**
|
|
1920
1920
|
* determines if the component should grow to fill available space in a `horizontal` or `vertical` layout container
|
|
1921
1921
|
*/
|
|
@@ -1934,15 +1934,15 @@ declare global {
|
|
|
1934
1934
|
/**
|
|
1935
1935
|
* Properties for editor.ui.separator
|
|
1936
1936
|
*/
|
|
1937
|
-
interface
|
|
1937
|
+
interface Props {
|
|
1938
1938
|
/**
|
|
1939
1939
|
* separator line orientation, `editor.ui.ORIENTATION.VERTICAL` or `editor.ui.ORIENTATION.HORIZONTAL`
|
|
1940
1940
|
*/
|
|
1941
|
-
orientation?: editor.ui.
|
|
1941
|
+
orientation?: editor.ui.Orientation;
|
|
1942
1942
|
/**
|
|
1943
1943
|
* alignment of the component content within its assigned bounds, defaults to `editor.ui.ALIGNMENT.TOP_LEFT`
|
|
1944
1944
|
*/
|
|
1945
|
-
alignment?: editor.ui.
|
|
1945
|
+
alignment?: editor.ui.Alignment;
|
|
1946
1946
|
/**
|
|
1947
1947
|
* determines if the component should grow to fill available space in a `horizontal` or `vertical` layout container
|
|
1948
1948
|
*/
|
|
@@ -1961,7 +1961,7 @@ declare global {
|
|
|
1961
1961
|
/**
|
|
1962
1962
|
* Options for editor.ui.show_external_directory_dialog
|
|
1963
1963
|
*/
|
|
1964
|
-
interface
|
|
1964
|
+
interface Options {
|
|
1965
1965
|
/**
|
|
1966
1966
|
* initial file or directory path; resolved against project root if relative
|
|
1967
1967
|
*/
|
|
@@ -1976,7 +1976,7 @@ declare global {
|
|
|
1976
1976
|
/**
|
|
1977
1977
|
* Options for editor.ui.show_external_file_dialog
|
|
1978
1978
|
*/
|
|
1979
|
-
interface
|
|
1979
|
+
interface Options {
|
|
1980
1980
|
/**
|
|
1981
1981
|
* initial file or directory path; resolved against project root if relative
|
|
1982
1982
|
*/
|
|
@@ -1988,14 +1988,14 @@ declare global {
|
|
|
1988
1988
|
/**
|
|
1989
1989
|
* File filters
|
|
1990
1990
|
*/
|
|
1991
|
-
filters?: editor.ui.
|
|
1991
|
+
filters?: editor.ui.ExternalFileFilter[];
|
|
1992
1992
|
}
|
|
1993
1993
|
}
|
|
1994
1994
|
namespace show_resource_dialog {
|
|
1995
1995
|
/**
|
|
1996
1996
|
* Options for editor.ui.show_resource_dialog
|
|
1997
1997
|
*/
|
|
1998
|
-
interface
|
|
1998
|
+
interface Options {
|
|
1999
1999
|
/**
|
|
2000
2000
|
* if specified, restricts selectable resources in the dialog to specified file extensions; e.g. `{"collection", "go"}`
|
|
2001
2001
|
*/
|
|
@@ -2032,7 +2032,7 @@ declare global {
|
|
|
2032
2032
|
/**
|
|
2033
2033
|
* Properties for editor.ui.string_field
|
|
2034
2034
|
*/
|
|
2035
|
-
interface
|
|
2035
|
+
interface Props {
|
|
2036
2036
|
/**
|
|
2037
2037
|
* value
|
|
2038
2038
|
*/
|
|
@@ -2044,7 +2044,7 @@ declare global {
|
|
|
2044
2044
|
/**
|
|
2045
2045
|
* issue related to the input, or false if there is no issue
|
|
2046
2046
|
*/
|
|
2047
|
-
issue?: editor.ui.
|
|
2047
|
+
issue?: editor.ui.Issue | false;
|
|
2048
2048
|
/**
|
|
2049
2049
|
* tooltip message shown on hover; either a string or a localization message
|
|
2050
2050
|
*/
|
|
@@ -2056,7 +2056,7 @@ declare global {
|
|
|
2056
2056
|
/**
|
|
2057
2057
|
* alignment of the component content within its assigned bounds, defaults to `editor.ui.ALIGNMENT.TOP_LEFT`
|
|
2058
2058
|
*/
|
|
2059
|
-
alignment?: editor.ui.
|
|
2059
|
+
alignment?: editor.ui.Alignment;
|
|
2060
2060
|
/**
|
|
2061
2061
|
* determines if the component should grow to fill available space in a `horizontal` or `vertical` layout container
|
|
2062
2062
|
*/
|
|
@@ -2075,7 +2075,7 @@ declare global {
|
|
|
2075
2075
|
/**
|
|
2076
2076
|
* Properties for editor.ui.tab
|
|
2077
2077
|
*/
|
|
2078
|
-
interface
|
|
2078
|
+
interface Props {
|
|
2079
2079
|
/**
|
|
2080
2080
|
* tab header text, either a string or a localization message
|
|
2081
2081
|
*/
|
|
@@ -2098,7 +2098,7 @@ declare global {
|
|
|
2098
2098
|
/**
|
|
2099
2099
|
* Properties for editor.ui.tabs
|
|
2100
2100
|
*/
|
|
2101
|
-
interface
|
|
2101
|
+
interface Props {
|
|
2102
2102
|
/**
|
|
2103
2103
|
* array of `editor.ui.tab(...)` components
|
|
2104
2104
|
*/
|
|
@@ -2139,7 +2139,7 @@ declare global {
|
|
|
2139
2139
|
/**
|
|
2140
2140
|
* Properties for editor.ui.vertical
|
|
2141
2141
|
*/
|
|
2142
|
-
interface
|
|
2142
|
+
interface Props {
|
|
2143
2143
|
/**
|
|
2144
2144
|
* array of child components
|
|
2145
2145
|
*/
|
|
@@ -2147,15 +2147,15 @@ declare global {
|
|
|
2147
2147
|
/**
|
|
2148
2148
|
* empty space from the edges of the container to its children, either a predefined padding value or a non-negative number of pixels
|
|
2149
2149
|
*/
|
|
2150
|
-
padding?: editor.ui.
|
|
2150
|
+
padding?: editor.ui.Padding | number;
|
|
2151
2151
|
/**
|
|
2152
2152
|
* empty space between child components, either a predefined spacing value or a non-negative number of pixels; defaults to `editor.ui.SPACING.MEDIUM`
|
|
2153
2153
|
*/
|
|
2154
|
-
spacing?: editor.ui.
|
|
2154
|
+
spacing?: editor.ui.Spacing | number;
|
|
2155
2155
|
/**
|
|
2156
2156
|
* alignment of the component content within its assigned bounds, defaults to `editor.ui.ALIGNMENT.TOP_LEFT`
|
|
2157
2157
|
*/
|
|
2158
|
-
alignment?: editor.ui.
|
|
2158
|
+
alignment?: editor.ui.Alignment;
|
|
2159
2159
|
/**
|
|
2160
2160
|
* determines if the component should grow to fill available space in a `horizontal` or `vertical` layout container
|
|
2161
2161
|
*/
|