@defold-typescript/transpiler 0.29.0 → 0.31.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/dist/animation-sources.d.ts +6 -0
- package/dist/{sprite-animation-index.d.ts → component-animation-index.d.ts} +4 -4
- package/dist/config-key-index.d.ts +1 -0
- package/dist/gui-flipbook-index.d.ts +8 -0
- package/dist/gui-node-index.d.ts +21 -0
- package/dist/index.d.ts +21 -8
- package/dist/index.js +1317 -289
- package/dist/library-dependencies.d.ts +47 -0
- package/dist/scene-address-declaration.d.ts +14 -0
- package/dist/scene-collection-roles.d.ts +30 -0
- package/dist/scene-component-index.d.ts +20 -0
- package/dist/scene-documents.d.ts +21 -0
- package/dist/scene-naming-context.d.ts +66 -0
- package/dist/scene-object-path-index.d.ts +4 -1
- package/dist/url-address-literals.d.ts +10 -0
- package/dist/url-address-slots.d.ts +3 -1
- package/dist/url-cross-world-address.d.ts +41 -0
- package/dist/url-fragment-reachability.d.ts +3 -0
- package/package.json +2 -2
- package/src/animation-sources.ts +90 -0
- package/src/component-animation-index.ts +399 -0
- package/src/config-key-index.ts +28 -2
- package/src/gui-flipbook-index.ts +91 -0
- package/src/gui-node-index.ts +42 -4
- package/src/index.ts +66 -10
- package/src/library-dependencies.ts +337 -0
- package/src/scene-address-declaration.ts +74 -0
- package/src/scene-collection-roles.ts +267 -0
- package/src/scene-component-index.ts +74 -6
- package/src/scene-documents.ts +186 -0
- package/src/scene-naming-context.ts +130 -0
- package/src/scene-object-path-index.ts +172 -33
- package/src/url-address-literals.ts +115 -0
- package/src/url-address-slots.ts +23 -2
- package/src/url-cross-world-address.ts +109 -0
- package/src/url-fragment-reachability.ts +72 -93
- package/src/sprite-animation-index.ts +0 -241
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type SceneMessage } from "./scene-text-format";
|
|
2
|
+
export declare function resourceKey(resource: string): string;
|
|
3
|
+
export declare function normalizeDocumentKey(path: string): string;
|
|
4
|
+
export declare function declaredAnimations(document: SceneMessage): Set<string>;
|
|
5
|
+
export declare function readAnimationSources(assets: ReadonlyMap<string, string>, unresolved: string[]): Map<string, Set<string>>;
|
|
6
|
+
export declare function animationSetEntries(document: SceneMessage): string[];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface ComponentAnimationIndex {
|
|
2
2
|
readonly byScriptResource: ReadonlyMap<string, ReadonlyMap<string, ReadonlySet<string>>>;
|
|
3
|
-
readonly
|
|
3
|
+
readonly sourceByScriptResource: ReadonlyMap<string, ReadonlyMap<string, ReadonlyMap<string, string>>>;
|
|
4
4
|
readonly unresolved: readonly string[];
|
|
5
5
|
}
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function buildComponentAnimationIndex(input: {
|
|
7
7
|
scenes: ReadonlyMap<string, string>;
|
|
8
8
|
assets: ReadonlyMap<string, string>;
|
|
9
|
-
}):
|
|
9
|
+
}): ComponentAnimationIndex;
|
|
10
10
|
export declare function componentIdOfSameObjectAddress(address: string): string | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface GuiFlipbookIndex {
|
|
2
|
+
readonly byScriptResource: ReadonlyMap<string, ReadonlyMap<string, ReadonlySet<string>>>;
|
|
3
|
+
readonly unresolved: readonly string[];
|
|
4
|
+
}
|
|
5
|
+
export declare function buildGuiFlipbookIndex(input: {
|
|
6
|
+
scenes: ReadonlyMap<string, string>;
|
|
7
|
+
assets: ReadonlyMap<string, string>;
|
|
8
|
+
}): GuiFlipbookIndex;
|
package/dist/gui-node-index.d.ts
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
|
+
import { type SceneMessage } from "./scene-text-format";
|
|
1
2
|
export interface GuiNodeIndex {
|
|
2
3
|
readonly byScriptResource: ReadonlyMap<string, ReadonlySet<string>>;
|
|
3
4
|
readonly unresolved: readonly string[];
|
|
4
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* The gui-script resource one already-parsed `.gui` names, keyed the way this
|
|
8
|
+
* index keys it. Exported so the naming-context resolver reaches a gui script
|
|
9
|
+
* through the same rule rather than a second reader — the aggregation on top
|
|
10
|
+
* differs on purpose (this index refuses a resource two scenes claim, while two
|
|
11
|
+
* scenes driving one gui script really is two naming contexts), but the key
|
|
12
|
+
* shape has one owner.
|
|
13
|
+
*/
|
|
14
|
+
export declare function guiScriptResourceOf(document: SceneMessage): string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Every `.gui` document's display path mapped to the gui-script resource it
|
|
17
|
+
* names, skipping a `.gui` that names none and one this parser cannot read.
|
|
18
|
+
*
|
|
19
|
+
* The map `buildScriptNamingContexts` consumes, built once here so the editor
|
|
20
|
+
* plugin and the CLI reach a gui script through one reader. Unlike
|
|
21
|
+
* `buildGuiNodeIndex` it records no ambiguity: two `.gui` scenes driving one gui
|
|
22
|
+
* script really are two naming contexts, while they would make that script's
|
|
23
|
+
* node ids unanswerable.
|
|
24
|
+
*/
|
|
25
|
+
export declare function guiScriptResourcesOf(documents: ReadonlyMap<string, string>): ReadonlyMap<string, string>;
|
|
5
26
|
export declare function buildGuiNodeIndex(documents: ReadonlyMap<string, string>): GuiNodeIndex;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,25 +1,38 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export type { ComponentAnimationIndex } from "./component-animation-index";
|
|
2
|
+
export { buildComponentAnimationIndex, componentIdOfSameObjectAddress, } from "./component-animation-index";
|
|
3
|
+
export { buildConfigKeyIndex, readGameProjectSetting } from "./config-key-index";
|
|
4
|
+
export type { GuiFlipbookIndex } from "./gui-flipbook-index";
|
|
5
|
+
export { buildGuiFlipbookIndex } from "./gui-flipbook-index";
|
|
2
6
|
export type { GuiNodeIndex } from "./gui-node-index";
|
|
3
|
-
export { buildGuiNodeIndex } from "./gui-node-index";
|
|
7
|
+
export { buildGuiNodeIndex, guiScriptResourceOf, guiScriptResourcesOf, } from "./gui-node-index";
|
|
4
8
|
export { buildInputActionIndex } from "./input-action-index";
|
|
9
|
+
export type { ExtensionDependency, LibraryIncludedEntries, LibrarySceneDocument, LibrarySceneDocuments, LibrarySharedEntry, } from "./library-dependencies";
|
|
10
|
+
export { archiveWrapperOf, isContainedResourcePath, LIBRARY_DEPENDENCY_ROOT, libraryIncludedEntries, readGameProjectDependencies, readLibrarySceneDocuments, } from "./library-dependencies";
|
|
5
11
|
export { findMainEntryFactoryImports } from "./main-entry-factory-imports";
|
|
6
12
|
export type { BuildConfig, ScriptKind, SourceOutputKind } from "./output-paths";
|
|
7
13
|
export { computeOutputRel, DEFAULT_INCLUDE, parseBuildConfig, SCRIPT_SUFFIX_BY_KIND, stripIncludeBase, } from "./output-paths";
|
|
8
14
|
export { getProgramDiagnostics } from "./program-diagnostics";
|
|
9
15
|
export { isDefignoredPath, SCAFFOLDED_DEFIGNORE_LINES } from "./project-resources";
|
|
10
|
-
export
|
|
11
|
-
export {
|
|
16
|
+
export { buildSceneAddressDeclaration } from "./scene-address-declaration";
|
|
17
|
+
export type { SceneCollectionRoles, SceneCollectionRolesInput } from "./scene-collection-roles";
|
|
18
|
+
export { buildSceneCollectionRoles } from "./scene-collection-roles";
|
|
19
|
+
export type { ComponentDeclarations, SceneComponentIndex } from "./scene-component-index";
|
|
20
|
+
export { buildSceneComponentIndex, collectComponentDeclarations, collectComponentIds, } from "./scene-component-index";
|
|
21
|
+
export type { SceneReadHost } from "./scene-documents";
|
|
22
|
+
export { ANIMATION_ASSET_EXTENSIONS, COLLECTION_REFERENCE_EXTENSIONS, displayPathOf, GAME_PROJECT_DOCUMENT, GUI_EXTENSIONS, INPUT_BINDING_EXTENSIONS, isExcludedProjectPath, LIBRARY_SCENE_EXTENSIONS, listProjectResourcePaths, PROJECT_EXTENSIONS, readSceneDocuments, SCENE_EXTENSIONS, } from "./scene-documents";
|
|
23
|
+
export type { NamingContext } from "./scene-naming-context";
|
|
24
|
+
export { buildScriptNamingContexts, relativeAddressesFrom, socketOfAddress, } from "./scene-naming-context";
|
|
12
25
|
export type { SceneObjectPathIndex } from "./scene-object-path-index";
|
|
13
26
|
export { buildSceneObjectPathIndex } from "./scene-object-path-index";
|
|
14
27
|
export type { SceneMessage } from "./scene-text-format";
|
|
15
28
|
export { parseSceneTextFormat, SceneTextFormatError } from "./scene-text-format";
|
|
16
29
|
export type { TranspileSession } from "./session";
|
|
17
30
|
export { createTranspileSession } from "./session";
|
|
18
|
-
export type { SpriteAnimationIndex } from "./sprite-animation-index";
|
|
19
|
-
export { buildSpriteAnimationIndex, componentIdOfSameObjectAddress, } from "./sprite-animation-index";
|
|
20
31
|
export type { TranspileDiagnostic, TranspileProjectInput, TranspileProjectResult, TranspileResult, } from "./transpile";
|
|
21
32
|
export { transpile, transpileProject } from "./transpile";
|
|
22
33
|
export type { ClassifiedSlot } from "./url-address-slots";
|
|
23
|
-
export { addressClassOfArgument, isAddressClass, isFragmentCaret, resolveClassifiedSlotAtPosition, } from "./url-address-slots";
|
|
24
|
-
export type {
|
|
34
|
+
export { addressClassOfArgument, addressEntryOfArgument, isAddressClass, isFragmentCaret, resolveClassifiedSlotAtPosition, } from "./url-address-slots";
|
|
35
|
+
export type { CrossWorldAddressFinding } from "./url-cross-world-address";
|
|
36
|
+
export { checkCrossWorldAddresses, slotRejectsForeignSocket } from "./url-cross-world-address";
|
|
37
|
+
export type { SceneObjectComponents, UrlFragmentFinding, UrlFragmentReport, } from "./url-fragment-reachability";
|
|
25
38
|
export { checkUrlFragmentReachability } from "./url-fragment-reachability";
|