@defold-typescript/types 0.39.0 → 0.41.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-availability.json +4024 -716
- package/api-migrations.json +27 -0
- package/api-signatures.json +18118 -10264
- package/api-targets.json +448 -11
- package/examples/translations.json +619 -148
- package/fixtures/messages_doc.json +96 -0
- package/generated/b2d.d.ts +680 -4
- package/generated/b2d_body.d.ts +29 -103
- package/generated/b2d_chain.d.ts +5 -6
- package/generated/b2d_fixture.d.ts +34 -38
- package/generated/b2d_joint.d.ts +503 -25
- package/generated/b2d_shape.d.ts +199 -14
- package/generated/b2d_world.d.ts +57 -63
- package/generated/buffer.d.ts +33 -29
- package/generated/builtin-messages.d.ts +7 -1
- package/generated/bullet3d.d.ts +91 -0
- package/generated/bullet3d_collision_object.d.ts +433 -0
- package/generated/bullet3d_constraint.d.ts +818 -0
- package/generated/bullet3d_rigid_body.d.ts +429 -0
- package/generated/bullet3d_shape.d.ts +123 -0
- package/generated/bullet3d_world.d.ts +492 -0
- package/generated/camera.d.ts +31 -34
- package/generated/collectionfactory.d.ts +26 -27
- package/generated/collectionproxy.d.ts +22 -6
- package/generated/compute.d.ts +12 -238
- package/generated/crash.d.ts +24 -10
- package/generated/editor-vm/http.d.ts +90 -7
- package/generated/editor-vm/image.d.ts +7 -7
- package/generated/editor-vm/json.d.ts +11 -0
- package/generated/editor-vm/localization.d.ts +7 -7
- package/generated/editor-vm/tilemap_tiles.d.ts +56 -10
- package/generated/editor-vm/zip.d.ts +28 -0
- package/generated/editor.d.ts +1496 -430
- package/generated/factory.d.ts +21 -25
- package/generated/font.d.ts +64 -22
- package/generated/go.d.ts +243 -186
- package/generated/graphics.d.ts +374 -84
- package/generated/gui.d.ts +282 -492
- package/generated/html5.d.ts +5 -3
- package/generated/http.d.ts +31 -36
- package/generated/image.d.ts +127 -85
- package/generated/json.d.ts +34 -16
- package/generated/kinds/gui-script.d.ts +8 -0
- package/generated/kinds/render-script.d.ts +8 -0
- package/generated/kinds/script.d.ts +8 -0
- package/generated/label.d.ts +77 -7
- package/generated/liveupdate.d.ts +13 -10
- package/generated/material.d.ts +312 -360
- package/generated/model.d.ts +72 -42
- package/generated/particlefx.d.ts +19 -28
- package/generated/physics.d.ts +378 -144
- package/generated/profiler.d.ts +14 -24
- package/generated/render.d.ts +294 -297
- package/generated/resource.d.ts +753 -641
- package/generated/socket.d.ts +131 -134
- package/generated/sound.d.ts +65 -34
- package/generated/sprite.d.ts +39 -17
- package/generated/sys.d.ts +237 -182
- package/generated/tilemap.d.ts +21 -16
- package/generated/timer.d.ts +34 -21
- package/generated/versions/defold-1.12.4/b2d_body.d.ts +0 -7
- package/generated/versions/defold-1.12.4/buffer.d.ts +18 -17
- package/generated/versions/defold-1.12.4/camera.d.ts +23 -23
- package/generated/versions/defold-1.12.4/collectionfactory.d.ts +21 -19
- package/generated/versions/defold-1.12.4/collectionproxy.d.ts +2 -2
- package/generated/versions/defold-1.12.4/crash.d.ts +2 -2
- package/generated/versions/defold-1.12.4/factory.d.ts +15 -16
- package/generated/versions/defold-1.12.4/go.d.ts +15 -17
- package/generated/versions/defold-1.12.4/gui.d.ts +111 -193
- package/generated/versions/defold-1.12.4/html5.d.ts +4 -2
- package/generated/versions/defold-1.12.4/http.d.ts +4 -15
- package/generated/versions/defold-1.12.4/image.d.ts +38 -46
- package/generated/versions/defold-1.12.4/index.d.ts +2 -0
- package/generated/versions/defold-1.12.4/json.d.ts +10 -6
- package/generated/versions/defold-1.12.4/label.d.ts +2 -3
- package/generated/versions/defold-1.12.4/liveupdate.d.ts +5 -3
- package/generated/versions/defold-1.12.4/model.d.ts +34 -13
- package/generated/versions/defold-1.12.4/particlefx.d.ts +2 -5
- package/generated/versions/defold-1.12.4/physics.d.ts +82 -78
- package/generated/versions/defold-1.12.4/profiler.d.ts +3 -6
- package/generated/versions/defold-1.12.4/render.d.ts +160 -132
- package/generated/versions/defold-1.12.4/resource.d.ts +212 -209
- package/generated/versions/defold-1.12.4/socket.d.ts +45 -61
- package/generated/versions/defold-1.12.4/sound.d.ts +11 -11
- package/generated/versions/defold-1.12.4/sprite.d.ts +24 -6
- package/generated/versions/defold-1.12.4/sys.d.ts +45 -68
- package/generated/versions/defold-1.12.4/tilemap.d.ts +18 -11
- package/generated/versions/defold-1.12.4/timer.d.ts +5 -3
- package/generated/versions/defold-1.12.4/vmath.d.ts +5 -26
- package/generated/versions/defold-1.12.4/window.d.ts +1 -16
- package/generated/versions/defold-1.13.0/b2d_body.d.ts +10 -55
- package/generated/versions/defold-1.13.0/b2d_fixture.d.ts +25 -25
- package/generated/versions/defold-1.13.0/b2d_shape.d.ts +188 -5
- package/generated/versions/defold-1.13.0/b2d_world.d.ts +16 -10
- package/generated/versions/defold-1.13.0/buffer.d.ts +18 -17
- package/generated/versions/defold-1.13.0/camera.d.ts +27 -27
- package/generated/versions/defold-1.13.0/collectionfactory.d.ts +21 -19
- package/generated/versions/defold-1.13.0/collectionproxy.d.ts +2 -2
- package/generated/versions/defold-1.13.0/compute.d.ts +1 -70
- package/generated/versions/defold-1.13.0/crash.d.ts +2 -2
- package/generated/versions/defold-1.13.0/editor-vm/tilemap_tiles.d.ts +3 -3
- package/generated/versions/defold-1.13.0/editor.d.ts +34 -24
- package/generated/versions/defold-1.13.0/factory.d.ts +15 -16
- package/generated/versions/defold-1.13.0/go.d.ts +15 -17
- package/generated/versions/defold-1.13.0/graphics.d.ts +121 -37
- package/generated/versions/defold-1.13.0/gui.d.ts +111 -193
- package/generated/versions/defold-1.13.0/html5.d.ts +4 -2
- package/generated/versions/defold-1.13.0/http.d.ts +4 -15
- package/generated/versions/defold-1.13.0/image.d.ts +38 -46
- package/generated/versions/defold-1.13.0/index.d.ts +2 -0
- package/generated/versions/defold-1.13.0/json.d.ts +10 -6
- package/generated/versions/defold-1.13.0/label.d.ts +2 -3
- package/generated/versions/defold-1.13.0/liveupdate.d.ts +7 -5
- package/generated/versions/defold-1.13.0/material.d.ts +69 -107
- package/generated/versions/defold-1.13.0/model.d.ts +34 -13
- package/generated/versions/defold-1.13.0/particlefx.d.ts +2 -5
- package/generated/versions/defold-1.13.0/physics.d.ts +82 -78
- package/generated/versions/defold-1.13.0/profiler.d.ts +3 -6
- package/generated/versions/defold-1.13.0/render.d.ts +160 -132
- package/generated/versions/defold-1.13.0/resource.d.ts +217 -210
- package/generated/versions/defold-1.13.0/socket.d.ts +45 -61
- package/generated/versions/defold-1.13.0/sound.d.ts +11 -11
- package/generated/versions/defold-1.13.0/sprite.d.ts +24 -6
- package/generated/versions/defold-1.13.0/sys.d.ts +45 -68
- package/generated/versions/defold-1.13.0/tilemap.d.ts +18 -11
- package/generated/versions/defold-1.13.0/timer.d.ts +5 -3
- package/generated/versions/defold-1.13.0/vmath.d.ts +5 -26
- package/generated/versions/defold-1.13.0/window.d.ts +1 -16
- package/generated/versions/defold-1.13.1/b2d.d.ts +33 -0
- package/generated/versions/defold-1.13.1/b2d_body.d.ts +636 -0
- package/generated/versions/defold-1.13.1/b2d_chain.d.ts +106 -0
- package/generated/versions/defold-1.13.1/b2d_fixture.d.ts +157 -0
- package/generated/versions/defold-1.13.1/b2d_joint.d.ts +823 -0
- package/generated/versions/defold-1.13.1/b2d_shape.d.ts +400 -0
- package/generated/versions/defold-1.13.1/b2d_world.d.ts +320 -0
- package/generated/versions/defold-1.13.1/buffer.d.ts +189 -0
- package/generated/versions/defold-1.13.1/camera.d.ts +303 -0
- package/generated/versions/defold-1.13.1/collectionfactory.d.ts +151 -0
- package/generated/versions/defold-1.13.1/collectionproxy.d.ts +93 -0
- package/generated/versions/defold-1.13.1/compute.d.ts +237 -0
- package/generated/versions/defold-1.13.1/crash.d.ts +143 -0
- package/generated/versions/defold-1.13.1/editor-vm/http.d.ts +56 -0
- package/generated/versions/defold-1.13.1/editor-vm/image.d.ts +48 -0
- package/generated/versions/defold-1.13.1/editor-vm/json.d.ts +10 -0
- package/generated/versions/defold-1.13.1/editor-vm/localization.d.ts +42 -0
- package/generated/versions/defold-1.13.1/editor-vm/tilemap_tiles.d.ts +80 -0
- package/generated/versions/defold-1.13.1/editor-vm/zip.d.ts +10 -0
- package/generated/versions/defold-1.13.1/editor-vm/zlib.d.ts +24 -0
- package/generated/versions/defold-1.13.1/editor.d.ts +1121 -0
- package/generated/versions/defold-1.13.1/factory.d.ts +124 -0
- package/generated/versions/defold-1.13.1/font.d.ts +81 -0
- package/generated/versions/defold-1.13.1/go.d.ts +1107 -0
- package/generated/versions/defold-1.13.1/graphics.d.ts +411 -0
- package/generated/versions/defold-1.13.1/gui.d.ts +2353 -0
- package/generated/versions/defold-1.13.1/html5.d.ts +55 -0
- package/generated/versions/defold-1.13.1/http.d.ts +77 -0
- package/generated/versions/defold-1.13.1/image.d.ts +131 -0
- package/generated/versions/defold-1.13.1/index.d.ts +57 -0
- package/generated/versions/defold-1.13.1/json.d.ts +80 -0
- package/generated/versions/defold-1.13.1/kinds/editor-script.d.ts +14 -0
- package/generated/versions/defold-1.13.1/label.d.ts +93 -0
- package/generated/versions/defold-1.13.1/liveupdate.d.ts +142 -0
- package/generated/versions/defold-1.13.1/material.d.ts +408 -0
- package/generated/versions/defold-1.13.1/model.d.ts +272 -0
- package/generated/versions/defold-1.13.1/msg.d.ts +10 -0
- package/generated/versions/defold-1.13.1/particlefx.d.ts +163 -0
- package/generated/versions/defold-1.13.1/physics.d.ts +559 -0
- package/generated/versions/defold-1.13.1/profiler.d.ts +235 -0
- package/generated/versions/defold-1.13.1/render.d.ts +1190 -0
- package/generated/versions/defold-1.13.1/resource.d.ts +1523 -0
- package/generated/versions/defold-1.13.1/socket.d.ts +784 -0
- package/generated/versions/defold-1.13.1/sound.d.ts +292 -0
- package/generated/versions/defold-1.13.1/sprite.d.ts +175 -0
- package/generated/versions/defold-1.13.1/sys.d.ts +678 -0
- package/generated/versions/defold-1.13.1/tilemap.d.ts +208 -0
- package/generated/versions/defold-1.13.1/timer.d.ts +125 -0
- package/generated/versions/defold-1.13.1/types.d.ts +61 -0
- package/generated/versions/defold-1.13.1/vmath.d.ts +774 -0
- package/generated/versions/defold-1.13.1/window.d.ts +183 -0
- package/generated/versions/defold-1.13.1/zlib.d.ts +41 -0
- package/generated/vmath.d.ts +6 -26
- package/generated/window.d.ts +71 -71
- package/identity-vocabulary.json +561 -0
- package/index.d.ts +8 -0
- package/package.json +13 -2
- package/scripts/example-store-io.ts +12 -1
- package/scripts/extension-goldens.ts +1 -0
- package/scripts/fidelity-baseline.json +146 -46
- package/scripts/generate-api-availability.ts +90 -12
- package/scripts/generate-api-signatures.ts +14 -3
- package/scripts/import-defold-release.ts +85 -24
- package/scripts/prose-constants.ts +157 -0
- package/scripts/regen.ts +396 -78
- package/scripts/shared-handle-methods.ts +53 -0
- package/scripts/signature-store-fs.ts +1 -0
- package/scripts/sync-api-docs.ts +16 -5
- package/src/api-availability.ts +0 -0
- package/src/api-doc.ts +201 -3
- package/src/api-identity.ts +252 -0
- package/src/component-properties.d.ts +33 -0
- package/src/core-types.ts +28 -3
- package/src/correction-pins.ts +49 -0
- package/src/custom-messages.d.ts +4 -3
- package/src/doc-comment.ts +139 -23
- package/src/doc-corrections.ts +108 -0
- package/src/editor-vm-globals.d.ts +5 -2
- package/src/emit-dts.ts +2474 -281
- package/src/emit-messages.ts +52 -0
- package/src/engine-globals.d.ts +2 -2
- package/src/example-store.ts +125 -14
- package/src/field-correction-coverage.ts +204 -0
- package/src/fnv1a.ts +16 -0
- package/src/go-overloads.d.ts +33 -13
- package/src/index-base-table.ts +145 -0
- package/src/index-slot-classifications.ts +588 -0
- package/src/index.ts +39 -2
- package/src/library-index-slot-classifications.ts +332 -0
- package/src/lifecycle.ts +61 -199
- package/src/luals-type-expr.ts +354 -0
- package/src/msg-overloads.d.ts +0 -1
- package/src/param-correction-provenance.ts +64 -0
- package/src/return-correction-provenance.ts +58 -16
- package/src/script-api.ts +3 -1
- package/src/sys-overloads.d.ts +48 -0
- package/src/vmath-overloads.d.ts +27 -1
- package/src/window-event-guard.d.ts +6 -9
- package/url-parameters.json +1 -2
|
@@ -0,0 +1,588 @@
|
|
|
1
|
+
import { htmlToDocText } from "./doc-comment";
|
|
2
|
+
import { LIBRARY_INDEX_SLOT_CLASSIFICATIONS } from "./library-index-slot-classifications";
|
|
3
|
+
|
|
4
|
+
// The class records the base Defold itself counts from. TypeScript passes every
|
|
5
|
+
// engine position to Defold, and takes it back, unchanged in that base:
|
|
6
|
+
//
|
|
7
|
+
// - `native-1`: Defold counts from 1.
|
|
8
|
+
// - `native-0`: Defold counts from 0.
|
|
9
|
+
// - `not-a-position`: matched the scan but addresses nothing by position (an
|
|
10
|
+
// array-valued table, a count, an id, a collision group, a name that only
|
|
11
|
+
// contains "index").
|
|
12
|
+
//
|
|
13
|
+
// The class drives the base each hover states and the positions the engine
|
|
14
|
+
// probes check, so moving a slot between classes changes its documented
|
|
15
|
+
// meaning.
|
|
16
|
+
export type IndexSlotClass = "native-1" | "native-0" | "not-a-position";
|
|
17
|
+
|
|
18
|
+
export interface IndexSlotClassification {
|
|
19
|
+
readonly class: IndexSlotClass;
|
|
20
|
+
// The decoded upstream phrase that states the base, or a one-line reason.
|
|
21
|
+
readonly evidence: string;
|
|
22
|
+
// A negative value counts from the end and passes through unchanged
|
|
23
|
+
// (LuaSocket `client:send`'s `i`/`j`, which work like `string.sub`).
|
|
24
|
+
readonly fromEnd?: true;
|
|
25
|
+
// The engine returns whose values this input slot consumes, so a value taken
|
|
26
|
+
// from one and handed back addresses the same element. Each names another
|
|
27
|
+
// entry of the same class.
|
|
28
|
+
readonly pairsWith?: readonly string[];
|
|
29
|
+
// The zero-based position of a return in its function's `LuaMultiReturn`
|
|
30
|
+
// tuple, or of the return holding a returned field; absent on the return of a
|
|
31
|
+
// single-value function and on every param.
|
|
32
|
+
readonly tupleSlot?: number;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// A default value is never a base: "Defaults to zero" states no counting.
|
|
36
|
+
export const ONE_BASED_PHRASE =
|
|
37
|
+
/\b(?:(?:1|one)[- ](?:based|indexed)|lua[- ]based|(?:indexed|start(?:s|ing)?) (?:at|from) (?:1|one)(?!\.\d|\s+of\b))\b/i;
|
|
38
|
+
export const ZERO_BASED_PHRASE =
|
|
39
|
+
/\b(?:(?:0|zero)[- ](?:based|indexed)|(?:indexed|start(?:s|ing)?) (?:at|from) (?:0|zero)(?!\.\d))\b/i;
|
|
40
|
+
|
|
41
|
+
// The slot name a declared return takes when no ref-doc names it, as for a
|
|
42
|
+
// return `RETURN_TYPE_OVERRIDES` authors (`b2d.body.create_shape`).
|
|
43
|
+
export const OVERRIDE_RETURN_SLOT = "result";
|
|
44
|
+
|
|
45
|
+
const CREATE_SHAPE_INDEX = `b2d.body.create_shape:return:${OVERRIDE_RETURN_SLOT}:index`;
|
|
46
|
+
|
|
47
|
+
const BULLET3D_CAST_SHAPE_INDEXES = [
|
|
48
|
+
"bullet3d.world.cast_ray:return:hits:shape_index",
|
|
49
|
+
"bullet3d.world.cast_ray_closest:return:hit:shape_index",
|
|
50
|
+
"bullet3d.world.cast_shape:return:hits:shape_index",
|
|
51
|
+
"bullet3d.world.cast_shape_closest:return:hit:shape_index",
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
// Keyed `<element>:<param|return>:<slot>[:<field>]`, the shape
|
|
55
|
+
// `OPTIONAL_SLOT_CORRECTIONS` and `TABLE_FIELD_TYPE_OVERRIDES` use.
|
|
56
|
+
// `scripts/index-slot-scan.test.ts` reds on a scanned slot missing here and on
|
|
57
|
+
// an entry no retained surface reports.
|
|
58
|
+
export const INDEX_SLOT_CLASSIFICATIONS: ReadonlyMap<string, IndexSlotClassification> = new Map<
|
|
59
|
+
string,
|
|
60
|
+
IndexSlotClassification
|
|
61
|
+
>([
|
|
62
|
+
...[
|
|
63
|
+
"b2d.body.destroy_fixture:param:fixture_index",
|
|
64
|
+
"b2d.fixture.get_aabb:param:fixture_index",
|
|
65
|
+
"b2d.fixture.get_density:param:fixture_index",
|
|
66
|
+
"b2d.fixture.get_filter_data:param:fixture_index",
|
|
67
|
+
"b2d.fixture.get_friction:param:fixture_index",
|
|
68
|
+
"b2d.fixture.get_restitution:param:fixture_index",
|
|
69
|
+
"b2d.fixture.get_shape:param:fixture_index",
|
|
70
|
+
"b2d.fixture.get_type:param:fixture_index",
|
|
71
|
+
"b2d.fixture.is_sensor:param:fixture_index",
|
|
72
|
+
"b2d.fixture.refilter:param:fixture_index",
|
|
73
|
+
"b2d.fixture.set_density:param:fixture_index",
|
|
74
|
+
"b2d.fixture.set_filter_data:param:fixture_index",
|
|
75
|
+
"b2d.fixture.set_friction:param:fixture_index",
|
|
76
|
+
"b2d.fixture.set_restitution:param:fixture_index",
|
|
77
|
+
"b2d.fixture.set_sensor:param:fixture_index",
|
|
78
|
+
"b2d.fixture.set_shape:param:fixture_index",
|
|
79
|
+
"b2d.fixture.test_point:param:fixture_index",
|
|
80
|
+
].map((key): [string, IndexSlotClassification] => [
|
|
81
|
+
key,
|
|
82
|
+
{
|
|
83
|
+
class: "native-1",
|
|
84
|
+
evidence: "1-based fixture index from `b2d.body.get_fixtures`",
|
|
85
|
+
pairsWith: [
|
|
86
|
+
"b2d.body.create_fixture:return:fixture:index",
|
|
87
|
+
"b2d.body.get_fixtures:return:fixtures:index",
|
|
88
|
+
"b2d.world.overlap_aabb:return:fixtures:index",
|
|
89
|
+
"b2d.world.overlap_shape:return:fixtures:index",
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
]),
|
|
93
|
+
...[
|
|
94
|
+
"b2d.fixture.get_aabb:param:child_index",
|
|
95
|
+
"b2d.fixture.get_filter_data:param:child_index",
|
|
96
|
+
"b2d.fixture.set_filter_data:param:child_index",
|
|
97
|
+
].map((key): [string, IndexSlotClassification] => [
|
|
98
|
+
key,
|
|
99
|
+
{ class: "native-1", evidence: "1-based child shape index" },
|
|
100
|
+
]),
|
|
101
|
+
...[
|
|
102
|
+
"b2d.body.create_fixture:return:fixture:index",
|
|
103
|
+
"b2d.body.get_fixtures:return:fixtures:index",
|
|
104
|
+
"b2d.world.overlap_aabb:return:fixtures:index",
|
|
105
|
+
"b2d.world.overlap_shape:return:fixtures:index",
|
|
106
|
+
].map((key): [string, IndexSlotClassification] => [
|
|
107
|
+
key,
|
|
108
|
+
{
|
|
109
|
+
class: "native-1",
|
|
110
|
+
evidence: "the binding pushes the 1-based fixture_index the b2d.fixture calls take",
|
|
111
|
+
...(key.startsWith("b2d.world.") ? { tupleSlot: 0 } : {}),
|
|
112
|
+
},
|
|
113
|
+
]),
|
|
114
|
+
[
|
|
115
|
+
CREATE_SHAPE_INDEX,
|
|
116
|
+
{
|
|
117
|
+
class: "native-1",
|
|
118
|
+
evidence:
|
|
119
|
+
"script_box2d_body_v3.cpp:PushShapeInfo pushes the 1-based shape_index GetShapeByIndex takes",
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
[
|
|
123
|
+
"b2d.body.destroy_shape:param:shape_index",
|
|
124
|
+
{
|
|
125
|
+
class: "native-1",
|
|
126
|
+
evidence: "1-based shape index",
|
|
127
|
+
pairsWith: [CREATE_SHAPE_INDEX],
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
...[
|
|
131
|
+
"are_contact_events_enabled",
|
|
132
|
+
"are_hit_events_enabled",
|
|
133
|
+
"are_pre_solve_events_enabled",
|
|
134
|
+
"are_sensor_events_enabled",
|
|
135
|
+
"enable_contact_events",
|
|
136
|
+
"enable_hit_events",
|
|
137
|
+
"enable_pre_solve_events",
|
|
138
|
+
"enable_sensor_events",
|
|
139
|
+
"get_body",
|
|
140
|
+
"get_closest_point",
|
|
141
|
+
"get_contact_capacity",
|
|
142
|
+
"get_contact_data",
|
|
143
|
+
"get_mass_data",
|
|
144
|
+
"get_material",
|
|
145
|
+
"get_sensor_capacity",
|
|
146
|
+
"get_sensor_overlaps",
|
|
147
|
+
"get_shape",
|
|
148
|
+
"get_world",
|
|
149
|
+
"is_valid",
|
|
150
|
+
"ray_cast",
|
|
151
|
+
"set_material",
|
|
152
|
+
"set_shape",
|
|
153
|
+
].map((name): [string, IndexSlotClassification] => [
|
|
154
|
+
`b2d.shape.${name}:param:shape_index`,
|
|
155
|
+
{
|
|
156
|
+
class: "native-1",
|
|
157
|
+
evidence: "script_box2d_body_v3.cpp:GetShapeByIndex returns shapes[shape_index - 1]",
|
|
158
|
+
pairsWith: [CREATE_SHAPE_INDEX],
|
|
159
|
+
},
|
|
160
|
+
]),
|
|
161
|
+
...[
|
|
162
|
+
"b2d.fixture.get_filter_data:return:filter:group_index",
|
|
163
|
+
"b2d.fixture.set_filter_data:param:filter:group_index",
|
|
164
|
+
"b2d.body.create_chain:param:definition:filter:group_index",
|
|
165
|
+
"b2d.body.create_fixture:param:definition:filter:group_index",
|
|
166
|
+
"b2d.body.create_shape:param:definition:filter:group_index",
|
|
167
|
+
"b2d.world.cast_ray:param:filter:group_index",
|
|
168
|
+
"b2d.world.cast_ray_closest:param:filter:group_index",
|
|
169
|
+
"b2d.world.cast_shape:param:filter:group_index",
|
|
170
|
+
"b2d.world.overlap_aabb:param:filter:group_index",
|
|
171
|
+
"b2d.world.overlap_shape:param:filter:group_index",
|
|
172
|
+
].map((key): [string, IndexSlotClassification] => [
|
|
173
|
+
key,
|
|
174
|
+
{ class: "not-a-position", evidence: "Box2D collision group, not a position" },
|
|
175
|
+
]),
|
|
176
|
+
...[
|
|
177
|
+
"enable_spring",
|
|
178
|
+
"get_6dof_angle",
|
|
179
|
+
"get_6dof_axis",
|
|
180
|
+
"get_6dof_motor",
|
|
181
|
+
"get_6dof_position",
|
|
182
|
+
"get_limit",
|
|
183
|
+
"is_limited",
|
|
184
|
+
"set_6dof_motor",
|
|
185
|
+
"set_limit",
|
|
186
|
+
"set_spring_damping",
|
|
187
|
+
"set_spring_equilibrium_point",
|
|
188
|
+
"set_spring_stiffness",
|
|
189
|
+
].map((name): [string, IndexSlotClassification] => [
|
|
190
|
+
`bullet3d.constraint.${name}:param:axis`,
|
|
191
|
+
{
|
|
192
|
+
class: "native-1",
|
|
193
|
+
evidence: "one-based axis, from 1 to 6 or from 1 to 3 for an angular axis",
|
|
194
|
+
},
|
|
195
|
+
]),
|
|
196
|
+
[
|
|
197
|
+
"bullet3d.collision_object.get_shape:param:shape_index",
|
|
198
|
+
{
|
|
199
|
+
class: "native-1",
|
|
200
|
+
evidence: "one-based shape index",
|
|
201
|
+
pairsWith: ["bullet3d.shape.get_index:return:shape_index", ...BULLET3D_CAST_SHAPE_INDEXES],
|
|
202
|
+
},
|
|
203
|
+
],
|
|
204
|
+
[
|
|
205
|
+
"bullet3d.shape.get_index:return:shape_index",
|
|
206
|
+
{ class: "native-1", evidence: "Get the one-based child index." },
|
|
207
|
+
],
|
|
208
|
+
...BULLET3D_CAST_SHAPE_INDEXES.map((key): [string, IndexSlotClassification] => [
|
|
209
|
+
key,
|
|
210
|
+
{ class: "native-1", evidence: "one-based compound child index" },
|
|
211
|
+
]),
|
|
212
|
+
...["client:send:param:i", "client:send:param:j"].map(
|
|
213
|
+
(key): [string, IndexSlotClassification] => [
|
|
214
|
+
key,
|
|
215
|
+
{
|
|
216
|
+
class: "native-1",
|
|
217
|
+
evidence: "if `i` is 1 or absent, this is effectively the total number of bytes sent",
|
|
218
|
+
fromEnd: true,
|
|
219
|
+
pairsWith: ["client:send:return:index", "client:send:return:lastindex"],
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
),
|
|
223
|
+
[
|
|
224
|
+
"client:send:return:index",
|
|
225
|
+
{
|
|
226
|
+
class: "native-1",
|
|
227
|
+
evidence: "the index of the last byte within [i, j]",
|
|
228
|
+
tupleSlot: 0,
|
|
229
|
+
},
|
|
230
|
+
],
|
|
231
|
+
[
|
|
232
|
+
"client:send:return:lastindex",
|
|
233
|
+
{
|
|
234
|
+
class: "native-1",
|
|
235
|
+
evidence: "the index of the last byte within [i, j]",
|
|
236
|
+
tupleSlot: 2,
|
|
237
|
+
},
|
|
238
|
+
],
|
|
239
|
+
[
|
|
240
|
+
"crash.get_sys_field:param:index",
|
|
241
|
+
{ class: "not-a-position", evidence: "system field enum, a `crash.SYSFIELD_*` constant" },
|
|
242
|
+
],
|
|
243
|
+
[
|
|
244
|
+
"crash.get_user_field:param:index",
|
|
245
|
+
{
|
|
246
|
+
class: "native-0",
|
|
247
|
+
evidence: "the binding accepts 0 to USERDATA_SLOTS - 1, like crash.set_user_field",
|
|
248
|
+
},
|
|
249
|
+
],
|
|
250
|
+
["crash.set_user_field:param:index", { class: "native-0", evidence: "slot index. 0-indexed" }],
|
|
251
|
+
[
|
|
252
|
+
"editor.ui.open_resource:param:args",
|
|
253
|
+
{
|
|
254
|
+
class: "native-1",
|
|
255
|
+
evidence: "Code and Text views accept a one-based cursor or range in `args`",
|
|
256
|
+
},
|
|
257
|
+
],
|
|
258
|
+
...[
|
|
259
|
+
"go.get:param:options:index",
|
|
260
|
+
"go.set:param:options:index",
|
|
261
|
+
"gui.get:param:options:index",
|
|
262
|
+
"gui.set:param:options:index",
|
|
263
|
+
].map((key): [string, IndexSlotClassification] => [
|
|
264
|
+
key,
|
|
265
|
+
{ class: "native-1", evidence: "index into array property (1 based)" },
|
|
266
|
+
]),
|
|
267
|
+
[
|
|
268
|
+
"gui.get_index:return:index",
|
|
269
|
+
{
|
|
270
|
+
class: "native-0",
|
|
271
|
+
evidence: "the binding counts preceding siblings from 0 (gui_script.cpp LuaGetIndex)",
|
|
272
|
+
},
|
|
273
|
+
],
|
|
274
|
+
...[
|
|
275
|
+
"gui.get_layout_objects:return:objects:text_offset",
|
|
276
|
+
"label.get_layout_objects:return:objects:text_offset",
|
|
277
|
+
].map((key): [string, IndexSlotClassification] => [
|
|
278
|
+
key,
|
|
279
|
+
{ class: "native-0", evidence: "zero-based UTF-32 offset in the visible text" },
|
|
280
|
+
]),
|
|
281
|
+
...["image.pixel:param:x", "image.pixel:param:y"].map(
|
|
282
|
+
(key): [string, IndexSlotClassification] => [
|
|
283
|
+
key,
|
|
284
|
+
{ class: "native-1", evidence: "1-based pixel coordinate" },
|
|
285
|
+
],
|
|
286
|
+
),
|
|
287
|
+
["image.pixels:return:iterator", { class: "native-1", evidence: "Coordinates are 1-based" }],
|
|
288
|
+
[
|
|
289
|
+
"model.set_blend_weights:param:weights",
|
|
290
|
+
{ class: "not-a-position", evidence: "array of weight values (1-based indices)" },
|
|
291
|
+
],
|
|
292
|
+
[
|
|
293
|
+
"on_input:param:action:gamepad",
|
|
294
|
+
{
|
|
295
|
+
class: "native-0",
|
|
296
|
+
evidence: "comp_script.cpp pushes the engine's 0-based m_GamepadIndex unchanged",
|
|
297
|
+
},
|
|
298
|
+
],
|
|
299
|
+
[
|
|
300
|
+
"profiler.view_recorded_frame:param:frame_index",
|
|
301
|
+
{ class: "not-a-position", evidence: "an options table holding `distance` or `frame`" },
|
|
302
|
+
],
|
|
303
|
+
[
|
|
304
|
+
"profiler.view_recorded_frame:param:frame_index:frame",
|
|
305
|
+
{ class: "native-1", evidence: "1 is first recorded frame" },
|
|
306
|
+
],
|
|
307
|
+
...[
|
|
308
|
+
"resource.create_atlas:param:table:frame_start",
|
|
309
|
+
"resource.create_atlas:param:table:frame_end",
|
|
310
|
+
"resource.set_atlas:param:table:frame_start",
|
|
311
|
+
"resource.set_atlas:param:table:frame_end",
|
|
312
|
+
"resource.create_atlas:param:table:animations:frame_start",
|
|
313
|
+
"resource.create_atlas:param:table:animations:frame_end",
|
|
314
|
+
"resource.set_atlas:param:table:animations:frame_start",
|
|
315
|
+
"resource.set_atlas:param:table:animations:frame_end",
|
|
316
|
+
].map((key): [string, IndexSlotClassification] => [
|
|
317
|
+
key,
|
|
318
|
+
{
|
|
319
|
+
class: "native-1",
|
|
320
|
+
evidence: "Indices are lua based and must be in the range of 1 .. <number-of-geometries>",
|
|
321
|
+
},
|
|
322
|
+
]),
|
|
323
|
+
...[
|
|
324
|
+
"resource.create_atlas:param:table:animations:frames",
|
|
325
|
+
"resource.set_atlas:param:table:animations:frames",
|
|
326
|
+
].map((key): [string, IndexSlotClassification] => [
|
|
327
|
+
key,
|
|
328
|
+
{
|
|
329
|
+
class: "native-1",
|
|
330
|
+
evidence:
|
|
331
|
+
"script_resource.cpp:CheckAtlasArguments checks each frame against 1 .. <number-of-geometries>",
|
|
332
|
+
pairsWith: ["resource.get_atlas:return:data:animations:frames"],
|
|
333
|
+
},
|
|
334
|
+
]),
|
|
335
|
+
[
|
|
336
|
+
"resource.set_texture:param:table:page",
|
|
337
|
+
{ class: "native-0", evidence: "slice of the array texture. Zero-based" },
|
|
338
|
+
],
|
|
339
|
+
[
|
|
340
|
+
"resource.set_texture:param:table:mipmap",
|
|
341
|
+
{
|
|
342
|
+
class: "native-0",
|
|
343
|
+
evidence: "script_resource.cpp reads `mipmap` with default 0, the base level",
|
|
344
|
+
},
|
|
345
|
+
],
|
|
346
|
+
...[
|
|
347
|
+
"resource.create_atlas:param:table:geometries:indices",
|
|
348
|
+
"resource.set_atlas:param:table:geometries:indices",
|
|
349
|
+
].map((key): [string, IndexSlotClassification] => [
|
|
350
|
+
key,
|
|
351
|
+
{
|
|
352
|
+
class: "native-0",
|
|
353
|
+
evidence:
|
|
354
|
+
"The index values are zero based where zero refers to the first entry of the vertex and uv lists",
|
|
355
|
+
pairsWith: ["resource.get_atlas:return:data:geometries:indices"],
|
|
356
|
+
},
|
|
357
|
+
]),
|
|
358
|
+
[
|
|
359
|
+
"resource.get_atlas:return:data:animations:frames",
|
|
360
|
+
{
|
|
361
|
+
class: "native-1",
|
|
362
|
+
evidence: "script_resource.cpp:GetAtlas pushes each frame's geometry_index + 1",
|
|
363
|
+
},
|
|
364
|
+
],
|
|
365
|
+
[
|
|
366
|
+
"resource.get_atlas:return:data:geometries:indices",
|
|
367
|
+
{
|
|
368
|
+
class: "native-0",
|
|
369
|
+
evidence: "script_resource.cpp:GetAtlas pushes each m_Indices value unchanged",
|
|
370
|
+
},
|
|
371
|
+
],
|
|
372
|
+
...["sockets_r", "sockets_w"].map((slot, tupleSlot): [string, IndexSlotClassification] => [
|
|
373
|
+
`socket.select:return:${slot}`,
|
|
374
|
+
{
|
|
375
|
+
class: "not-a-position",
|
|
376
|
+
evidence: "a list of ready sockets, keyed both by integer and by socket",
|
|
377
|
+
tupleSlot,
|
|
378
|
+
},
|
|
379
|
+
]),
|
|
380
|
+
...(["x", "y"] as const).flatMap((axis) =>
|
|
381
|
+
["tilemap.set_tile", "tilemap.get_tile", "tilemap.get_tile_info"].map(
|
|
382
|
+
(fn): [string, IndexSlotClassification] => [
|
|
383
|
+
`${fn}:param:${axis}`,
|
|
384
|
+
{
|
|
385
|
+
class: "native-1",
|
|
386
|
+
evidence: "the binding subtracts 1 from the checked coordinate",
|
|
387
|
+
pairsWith: [`tilemap.get_bounds:return:${axis}`],
|
|
388
|
+
},
|
|
389
|
+
],
|
|
390
|
+
),
|
|
391
|
+
),
|
|
392
|
+
...(["x", "y"] as const).map((axis, tupleSlot): [string, IndexSlotClassification] => [
|
|
393
|
+
`tilemap.get_bounds:return:${axis}`,
|
|
394
|
+
{
|
|
395
|
+
class: "native-1",
|
|
396
|
+
evidence: `script_tilemap.cpp:TileMap_GetBounds pushes ${axis} + 1`,
|
|
397
|
+
tupleSlot,
|
|
398
|
+
},
|
|
399
|
+
]),
|
|
400
|
+
...["tilemap.get_tile:return:tile", "tilemap.set_tile:param:tile"].map(
|
|
401
|
+
(key): [string, IndexSlotClassification] => [
|
|
402
|
+
key,
|
|
403
|
+
{ class: "not-a-position", evidence: "tile id; 0 resets the cell" },
|
|
404
|
+
],
|
|
405
|
+
),
|
|
406
|
+
[
|
|
407
|
+
"tilemap.get_tile_info:return:tile_info",
|
|
408
|
+
{ class: "not-a-position", evidence: "a tile info table; its prose reads `index of the tile`" },
|
|
409
|
+
],
|
|
410
|
+
[
|
|
411
|
+
"tilemap.get_tile_info:return:tile_info:index",
|
|
412
|
+
{ class: "not-a-position", evidence: "the tile id `tilemap.get_tile` returns" },
|
|
413
|
+
],
|
|
414
|
+
...["tilemap.tiles.get_info:return:info:index", "tilemap.tiles.get_tile:return:tile_index"].map(
|
|
415
|
+
(key): [string, IndexSlotClassification] => [
|
|
416
|
+
key,
|
|
417
|
+
{ class: "native-1", evidence: "1-indexed tile index of a tilemap's tilesource" },
|
|
418
|
+
],
|
|
419
|
+
),
|
|
420
|
+
...["tilemap.tiles.set:param:tile_or_info", "tilemap.tiles.set:param:tile_or_info:index"].map(
|
|
421
|
+
(key): [string, IndexSlotClassification] => [
|
|
422
|
+
key,
|
|
423
|
+
{
|
|
424
|
+
class: "native-1",
|
|
425
|
+
evidence: "1-indexed tile index of a tilemap's tilesource",
|
|
426
|
+
pairsWith: key.endsWith(":index")
|
|
427
|
+
? ["tilemap.tiles.get_info:return:info:index"]
|
|
428
|
+
: ["tilemap.tiles.get_tile:return:tile_index"],
|
|
429
|
+
},
|
|
430
|
+
],
|
|
431
|
+
),
|
|
432
|
+
]);
|
|
433
|
+
|
|
434
|
+
const FIELD_LINE = /^- `([A-Za-z_]\w*)(?:\s[^`]*)?`\s*(.*)$/;
|
|
435
|
+
|
|
436
|
+
export interface SlotDocFields {
|
|
437
|
+
readonly prose: string;
|
|
438
|
+
readonly fields: readonly { readonly name: string; readonly prose: string }[];
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
// Separates a slot doc's own prose from its field list, so a field's base is
|
|
442
|
+
// keyed to the field. `<dt>` field names become list items the way `<li>` ones
|
|
443
|
+
// already do, and a bare `- index <span class="type">` name gains the code span
|
|
444
|
+
// the other field-list shapes carry.
|
|
445
|
+
export function splitSlotFields(html: string): SlotDocFields {
|
|
446
|
+
const text = htmlToDocText(
|
|
447
|
+
html
|
|
448
|
+
.replace(/<dt>/gi, "<li>")
|
|
449
|
+
.replace(/^- ([A-Za-z_]\w*) (?=<span class="type">)/gm, "- <code>$1</code> "),
|
|
450
|
+
);
|
|
451
|
+
const prose: string[] = [];
|
|
452
|
+
const fields: { name: string; prose: string[] }[] = [];
|
|
453
|
+
let current: { name: string; prose: string[] } | undefined;
|
|
454
|
+
for (const line of text.split("\n")) {
|
|
455
|
+
const field = FIELD_LINE.exec(line);
|
|
456
|
+
if (field?.[1] !== undefined) {
|
|
457
|
+
current = { name: field[1], prose: [field[2] ?? ""] };
|
|
458
|
+
fields.push(current);
|
|
459
|
+
} else if (current !== undefined && line !== "" && !line.startsWith("- ")) {
|
|
460
|
+
current.prose.push(line);
|
|
461
|
+
} else {
|
|
462
|
+
current = undefined;
|
|
463
|
+
prose.push(line);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
return {
|
|
467
|
+
prose: prose.join("\n"),
|
|
468
|
+
fields: fields.map((field) => ({ name: field.name, prose: field.prose.join("\n") })),
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
// The marker that leads every note naming a native base, so a 1-based position
|
|
473
|
+
// stands out from a 0-based one at a glance.
|
|
474
|
+
export const INDEX_BASE_MARKERS: Readonly<Record<"native-1" | "native-0", string>> = {
|
|
475
|
+
"native-1": "⚠️",
|
|
476
|
+
"native-0": "0️⃣",
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
// The base a position's class names, stated whatever its prose says, since
|
|
480
|
+
// upstream prose phrases its base in too many ways to read reliably. `receiver`
|
|
481
|
+
// names who counts from that base; `subject` names the table field the note is
|
|
482
|
+
// about, when it is about one.
|
|
483
|
+
function nativeBaseNote(
|
|
484
|
+
map: ReadonlyMap<string, Pick<IndexSlotClassification, "class">>,
|
|
485
|
+
receiver: string,
|
|
486
|
+
key: string,
|
|
487
|
+
subject?: string,
|
|
488
|
+
): string | undefined {
|
|
489
|
+
const classification = map.get(key)?.class;
|
|
490
|
+
if (classification !== "native-1" && classification !== "native-0") return undefined;
|
|
491
|
+
const base = classification === "native-1" ? "1-based" : "0-based";
|
|
492
|
+
const sentence = `${base}; passed to ${receiver} unchanged.`;
|
|
493
|
+
const body = subject === undefined ? sentence : `\`${subject}\` is ${sentence}`;
|
|
494
|
+
return `**${INDEX_BASE_MARKERS[classification]} ${body}**`;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
function slotBaseNotes(
|
|
498
|
+
map: ReadonlyMap<string, Pick<IndexSlotClassification, "class">>,
|
|
499
|
+
receiver: string,
|
|
500
|
+
key: string,
|
|
501
|
+
): string[] {
|
|
502
|
+
const notes: string[] = [];
|
|
503
|
+
const own = nativeBaseNote(map, receiver, key);
|
|
504
|
+
if (own !== undefined) notes.push(own);
|
|
505
|
+
const prefix = `${key}:`;
|
|
506
|
+
for (const fieldKey of map.keys()) {
|
|
507
|
+
if (!fieldKey.startsWith(prefix)) continue;
|
|
508
|
+
const path = fieldKey.slice(prefix.length);
|
|
509
|
+
const note = nativeBaseNote(map, receiver, fieldKey, path.slice(path.lastIndexOf(":") + 1));
|
|
510
|
+
if (note !== undefined) notes.push(note);
|
|
511
|
+
}
|
|
512
|
+
return notes;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
export function appendNotes(doc: string, notes: readonly string[]): string {
|
|
516
|
+
const body = doc.trimEnd();
|
|
517
|
+
const missing = notes.filter((note) => !body.includes(note));
|
|
518
|
+
if (missing.length === 0) return doc;
|
|
519
|
+
const sentence = missing.join(" ");
|
|
520
|
+
if (body === "") return sentence;
|
|
521
|
+
if (body.includes("\n")) return `${body}\n\n${sentence}`;
|
|
522
|
+
return /[.!?:]$/.test(body) ? `${body} ${sentence}` : `${body}. ${sentence}`;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
// The sentences a slot's doc gains so each index it holds, the slot itself or
|
|
526
|
+
// one of its table fields, names the native base Defold counts from.
|
|
527
|
+
export function indexBaseNotes(
|
|
528
|
+
elementName: string,
|
|
529
|
+
kind: "param" | "return",
|
|
530
|
+
slotName: string,
|
|
531
|
+
): string[] {
|
|
532
|
+
return slotBaseNotes(INDEX_SLOT_CLASSIFICATIONS, "Defold", `${elementName}:${kind}:${slotName}`);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
// `doc` is the slot doc in whatever form the caller renders (decoded text or
|
|
536
|
+
// ref-doc HTML).
|
|
537
|
+
export function withIndexBaseNotes(
|
|
538
|
+
elementName: string,
|
|
539
|
+
kind: "param" | "return",
|
|
540
|
+
slotName: string,
|
|
541
|
+
doc: string,
|
|
542
|
+
): string {
|
|
543
|
+
return appendNotes(doc, indexBaseNotes(elementName, kind, slotName));
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
// The same notes for a slot or class field of a library page, read from the
|
|
547
|
+
// library map under that page's key and naming the library as the receiver.
|
|
548
|
+
export function libraryIndexBaseNotes(
|
|
549
|
+
page: string,
|
|
550
|
+
elementName: string,
|
|
551
|
+
kind: "param" | "return" | "field",
|
|
552
|
+
slotName: string,
|
|
553
|
+
): string[] {
|
|
554
|
+
return slotBaseNotes(
|
|
555
|
+
LIBRARY_INDEX_SLOT_CLASSIFICATIONS,
|
|
556
|
+
`\`${page}\``,
|
|
557
|
+
`${page}/${elementName}:${kind}:${slotName}`,
|
|
558
|
+
);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
export function withLibraryIndexBaseNotes(
|
|
562
|
+
page: string,
|
|
563
|
+
elementName: string,
|
|
564
|
+
kind: "param" | "return" | "field",
|
|
565
|
+
slotName: string,
|
|
566
|
+
doc: string,
|
|
567
|
+
): string {
|
|
568
|
+
return appendNotes(doc, libraryIndexBaseNotes(page, elementName, kind, slotName));
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
// Where a declaration's index notes come from: the engine map, naming Defold, or
|
|
572
|
+
// the library map under each listed page, naming that library. A library or
|
|
573
|
+
// extension declaration never reads the engine map, so an element it shares a
|
|
574
|
+
// name with (`spine.gui` declares `gui.*`) never claims Defold as its receiver.
|
|
575
|
+
export type IndexBaseSource = "engine" | { readonly pages: readonly string[] };
|
|
576
|
+
|
|
577
|
+
export type IndexBaseNoteResolver = (
|
|
578
|
+
elementName: string,
|
|
579
|
+
kind: "param" | "return",
|
|
580
|
+
slotName: string,
|
|
581
|
+
) => string[];
|
|
582
|
+
|
|
583
|
+
export function indexBaseNoteResolver(source: IndexBaseSource): IndexBaseNoteResolver {
|
|
584
|
+
if (source === "engine") return indexBaseNotes;
|
|
585
|
+
const { pages } = source;
|
|
586
|
+
return (elementName, kind, slotName) =>
|
|
587
|
+
pages.flatMap((page) => libraryIndexBaseNotes(page, elementName, kind, slotName));
|
|
588
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -21,8 +21,14 @@ export {
|
|
|
21
21
|
type VersionSurface,
|
|
22
22
|
validateAvailability,
|
|
23
23
|
} from "./api-availability";
|
|
24
|
-
export type {
|
|
25
|
-
|
|
24
|
+
export type {
|
|
25
|
+
ApiFunction,
|
|
26
|
+
ApiModule,
|
|
27
|
+
ApiParameter,
|
|
28
|
+
ApiVariable,
|
|
29
|
+
SkipOverloadRule,
|
|
30
|
+
} from "./api-doc";
|
|
31
|
+
export { parseDefoldApiDoc, withholdOverloads } from "./api-doc";
|
|
26
32
|
export {
|
|
27
33
|
DEFOLD_TYPE_MAP,
|
|
28
34
|
type Hash,
|
|
@@ -53,6 +59,9 @@ export {
|
|
|
53
59
|
type EmitOptions,
|
|
54
60
|
emitDeclarations,
|
|
55
61
|
emitSymbolSignatures,
|
|
62
|
+
firstSlotAlternativeOf,
|
|
63
|
+
routeTypeDeclarations,
|
|
64
|
+
type SlotType,
|
|
56
65
|
type SlotTypes,
|
|
57
66
|
type SymbolSignature,
|
|
58
67
|
TS_IDENTIFIER,
|
|
@@ -60,11 +69,29 @@ export {
|
|
|
60
69
|
} from "./emit-dts";
|
|
61
70
|
export {
|
|
62
71
|
hashExampleSource,
|
|
72
|
+
lookupExampleSegments,
|
|
63
73
|
lookupExampleTranslations,
|
|
64
74
|
lookupTranslation,
|
|
75
|
+
proseLuaFences,
|
|
65
76
|
type Translation,
|
|
66
77
|
type TranslationStore,
|
|
78
|
+
translateProseFences,
|
|
67
79
|
} from "./example-store";
|
|
80
|
+
export {
|
|
81
|
+
type EngineIndexBaseRow,
|
|
82
|
+
engineIndexBaseRows,
|
|
83
|
+
engineIndexBaseTable,
|
|
84
|
+
} from "./index-base-table";
|
|
85
|
+
export {
|
|
86
|
+
appendNotes,
|
|
87
|
+
INDEX_SLOT_CLASSIFICATIONS,
|
|
88
|
+
type IndexSlotClass,
|
|
89
|
+
type IndexSlotClassification,
|
|
90
|
+
libraryIndexBaseNotes,
|
|
91
|
+
withIndexBaseNotes,
|
|
92
|
+
withLibraryIndexBaseNotes,
|
|
93
|
+
} from "./index-slot-classifications";
|
|
94
|
+
export { LIBRARY_INDEX_SLOT_CLASSIFICATIONS } from "./library-index-slot-classifications";
|
|
68
95
|
export {
|
|
69
96
|
hasTopLevelUnion,
|
|
70
97
|
luaMultiReturn,
|
|
@@ -89,6 +116,16 @@ export {
|
|
|
89
116
|
type ScriptPropertiesOf,
|
|
90
117
|
type ScriptProperty,
|
|
91
118
|
} from "./lifecycle";
|
|
119
|
+
export {
|
|
120
|
+
LUALS_VARARG_TOKEN,
|
|
121
|
+
type LualsLeafResolver,
|
|
122
|
+
type LualsMapResult,
|
|
123
|
+
type LualsPosition,
|
|
124
|
+
mapLualsCallSignatureExpression,
|
|
125
|
+
mapLualsExpression,
|
|
126
|
+
matchBracket,
|
|
127
|
+
splitTopLevel,
|
|
128
|
+
} from "./luals-type-expr";
|
|
92
129
|
export {
|
|
93
130
|
type ModuleWrapOptions,
|
|
94
131
|
type WrapOptions,
|