@neocompose/cli 0.74.0 → 0.75.1
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/CHANGELOG.md +17 -0
- package/README.md +28 -0
- package/dist/neo.mjs +823 -720
- package/dist/test-worker.mjs +307 -281
- package/package.json +5 -2
- package/skills/neocompose-cli/SKILL.md +12 -1
- package/skills/neocompose-cli/references/cli-development.md +15 -7
- package/skills/neocompose-cli/references/neoscript.md +4 -2
package/dist/test-worker.mjs
CHANGED
|
@@ -36,6 +36,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
36
36
|
// node_modules/ignore/index.js
|
|
37
37
|
var require_ignore = __commonJS({
|
|
38
38
|
"node_modules/ignore/index.js"(exports, module) {
|
|
39
|
+
"use strict";
|
|
39
40
|
function makeArray(subject) {
|
|
40
41
|
return Array.isArray(subject) ? subject : [subject];
|
|
41
42
|
}
|
|
@@ -878,7 +879,7 @@ var require_ignore = __commonJS({
|
|
|
878
879
|
// src/test-worker.ts
|
|
879
880
|
import { parentPort } from "node:worker_threads";
|
|
880
881
|
|
|
881
|
-
// ../
|
|
882
|
+
// ../packages/models/src/members/member-storage.ts
|
|
882
883
|
function isMemberStorageKind(value) {
|
|
883
884
|
return value === 0 /* Inherit */ || value === 1 /* Immutable */ || value === 2 /* Save */ || value === 3 /* Session */ || value === 4 /* Writable */ || value === 5 /* User */;
|
|
884
885
|
}
|
|
@@ -922,40 +923,40 @@ function createWritableAncestorLookup(memberById) {
|
|
|
922
923
|
return lookup;
|
|
923
924
|
}
|
|
924
925
|
|
|
925
|
-
// ../
|
|
926
|
-
var MemberKind = /* @__PURE__ */ ((
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
return
|
|
926
|
+
// ../packages/models/src/members/member-kind-enum.ts
|
|
927
|
+
var MemberKind = /* @__PURE__ */ ((MemberKind8) => {
|
|
928
|
+
MemberKind8[MemberKind8["Null"] = 0] = "Null";
|
|
929
|
+
MemberKind8[MemberKind8["Bool"] = 1] = "Bool";
|
|
930
|
+
MemberKind8[MemberKind8["Int"] = 2] = "Int";
|
|
931
|
+
MemberKind8[MemberKind8["String"] = 3] = "String";
|
|
932
|
+
MemberKind8[MemberKind8["Float"] = 4] = "Float";
|
|
933
|
+
MemberKind8[MemberKind8["Dictionary"] = 5] = "Dictionary";
|
|
934
|
+
MemberKind8[MemberKind8["List"] = 6] = "List";
|
|
935
|
+
MemberKind8[MemberKind8["Class"] = 7] = "Class";
|
|
936
|
+
MemberKind8[MemberKind8["Enum"] = 8] = "Enum";
|
|
937
|
+
MemberKind8[MemberKind8["Lookup"] = 9] = "Lookup";
|
|
938
|
+
MemberKind8[MemberKind8["NSProperty"] = 10] = "NSProperty";
|
|
939
|
+
MemberKind8[MemberKind8["Sprite"] = 11] = "Sprite";
|
|
940
|
+
MemberKind8[MemberKind8["Audio"] = 12] = "Audio";
|
|
941
|
+
MemberKind8[MemberKind8["Function"] = 13] = "Function";
|
|
942
|
+
MemberKind8[MemberKind8["Vector2"] = 14] = "Vector2";
|
|
943
|
+
MemberKind8[MemberKind8["Vector2Int"] = 15] = "Vector2Int";
|
|
944
|
+
MemberKind8[MemberKind8["Vector3"] = 16] = "Vector3";
|
|
945
|
+
MemberKind8[MemberKind8["Vector3Int"] = 17] = "Vector3Int";
|
|
946
|
+
MemberKind8[MemberKind8["DialogueLookup"] = 18] = "DialogueLookup";
|
|
947
|
+
MemberKind8[MemberKind8["Color"] = 19] = "Color";
|
|
948
|
+
MemberKind8[MemberKind8["Decimal"] = 20] = "Decimal";
|
|
949
|
+
MemberKind8[MemberKind8["Generic"] = 21] = "Generic";
|
|
950
|
+
MemberKind8[MemberKind8["Interface"] = 22] = "Interface";
|
|
951
|
+
MemberKind8[MemberKind8["NSFunction"] = 23] = "NSFunction";
|
|
952
|
+
MemberKind8[MemberKind8["FunctionRef"] = 24] = "FunctionRef";
|
|
953
|
+
MemberKind8[MemberKind8["NSDelegate"] = 25] = "NSDelegate";
|
|
954
|
+
MemberKind8[MemberKind8["NSAction"] = 26] = "NSAction";
|
|
955
|
+
MemberKind8[MemberKind8["Variant"] = 27] = "Variant";
|
|
956
|
+
return MemberKind8;
|
|
956
957
|
})(MemberKind || {});
|
|
957
958
|
|
|
958
|
-
// ../
|
|
959
|
+
// ../packages/models/src/members/member-kind-taxonomy.ts
|
|
959
960
|
var STORED = 1 /* Storage */ | 2 /* OwnsValue */;
|
|
960
961
|
var BINDABLE = STORED | 4 /* Binding */;
|
|
961
962
|
var TAXONOMY = {
|
|
@@ -1055,7 +1056,7 @@ var hasTrait = (kind, trait) => (TAXONOMY[kind][1] & trait) !== 0;
|
|
|
1055
1056
|
var memberKindSupportsStorage = (kind) => hasTrait(kind, 1 /* Storage */);
|
|
1056
1057
|
var memberKindOwnsStoredValue = (kind) => hasTrait(kind, 2 /* OwnsValue */);
|
|
1057
1058
|
|
|
1058
|
-
// ../
|
|
1059
|
+
// ../packages/models/src/members/member-subtree-distribution.ts
|
|
1059
1060
|
function isNeoSubtreeDistributionKind(value) {
|
|
1060
1061
|
return value === 0 /* Sparse */ || value === 1 /* Packed */;
|
|
1061
1062
|
}
|
|
@@ -1246,7 +1247,7 @@ v5.DNS = DNS;
|
|
|
1246
1247
|
v5.URL = URL2;
|
|
1247
1248
|
var v5_default = v5;
|
|
1248
1249
|
|
|
1249
|
-
// ../
|
|
1250
|
+
// ../packages/models/src/project/project-root-members.ts
|
|
1250
1251
|
var PROJECT_ROOTS = [
|
|
1251
1252
|
{
|
|
1252
1253
|
key: "Assets",
|
|
@@ -1294,7 +1295,7 @@ function projectRootMembersInDisplayOrder(project) {
|
|
|
1294
1295
|
}));
|
|
1295
1296
|
}
|
|
1296
1297
|
|
|
1297
|
-
// ../
|
|
1298
|
+
// ../packages/models/src/core/structural-narrow.ts
|
|
1298
1299
|
function isObject(value) {
|
|
1299
1300
|
if (typeof value !== "object") return false;
|
|
1300
1301
|
return value !== null;
|
|
@@ -1354,7 +1355,7 @@ function setOwnField(record4, key, value) {
|
|
|
1354
1355
|
});
|
|
1355
1356
|
}
|
|
1356
1357
|
|
|
1357
|
-
// ../
|
|
1358
|
+
// ../packages/models/src/core/world-system-kinds.generated.ts
|
|
1358
1359
|
var NeoWorldSystemClassKind = {
|
|
1359
1360
|
CellPattern: "cellPattern",
|
|
1360
1361
|
TileGrid: "tileGrid",
|
|
@@ -1398,7 +1399,7 @@ function isNeoWorldSystemClassKind(value) {
|
|
|
1398
1399
|
return NEO_WORLD_SYSTEM_CLASS_KIND_VALUES.has(value);
|
|
1399
1400
|
}
|
|
1400
1401
|
|
|
1401
|
-
// ../
|
|
1402
|
+
// ../packages/models/src/core/core-types.ts
|
|
1402
1403
|
var SystemDisallowedOperation = {
|
|
1403
1404
|
/**
|
|
1404
1405
|
* Blocks project-author edits to the record's schema/configuration.
|
|
@@ -1457,7 +1458,7 @@ function isWithName(value) {
|
|
|
1457
1458
|
return typeof value?.name === "string";
|
|
1458
1459
|
}
|
|
1459
1460
|
|
|
1460
|
-
// ../
|
|
1461
|
+
// ../packages/models/src/docs-text.ts
|
|
1461
1462
|
var DOCS_TEXT_MAX_UTF8_BYTES = 16384;
|
|
1462
1463
|
var textEncoder = new TextEncoder();
|
|
1463
1464
|
function isValidDocsText(value) {
|
|
@@ -1466,7 +1467,7 @@ function isValidDocsText(value) {
|
|
|
1466
1467
|
return textEncoder.encode(value).byteLength <= DOCS_TEXT_MAX_UTF8_BYTES;
|
|
1467
1468
|
}
|
|
1468
1469
|
|
|
1469
|
-
// ../
|
|
1470
|
+
// ../packages/models/src/members/float32.ts
|
|
1470
1471
|
function isFloat32(value) {
|
|
1471
1472
|
return typeof value === "number" && Number.isFinite(value) && Math.fround(value) === value;
|
|
1472
1473
|
}
|
|
@@ -2414,7 +2415,7 @@ function isValidNeoProjectBindingIdentifier(name) {
|
|
|
2414
2415
|
return PROJECT_IDENTIFIER_PATTERN.test(name) && !PROJECT_BINDING_RESERVED_NAMES.has(name);
|
|
2415
2416
|
}
|
|
2416
2417
|
|
|
2417
|
-
// ../
|
|
2418
|
+
// ../packages/models/src/project-source-identifiers.ts
|
|
2418
2419
|
function isValidGeneratedIdentifier(value) {
|
|
2419
2420
|
return typeof value === "string" && isGeneratedCSharpIdentifier(value) && !isGeneratedCSharpReservedKeyword(value);
|
|
2420
2421
|
}
|
|
@@ -2428,7 +2429,7 @@ function isValidProjectBindingIdentifier(value) {
|
|
|
2428
2429
|
return isValidGeneratedIdentifier(value) && isValidNeoProjectBindingIdentifier(value);
|
|
2429
2430
|
}
|
|
2430
2431
|
|
|
2431
|
-
// ../
|
|
2432
|
+
// ../packages/models/src/schema-identifiers.ts
|
|
2432
2433
|
function isValidSchemaMemberIdentifier(value) {
|
|
2433
2434
|
return isValidProjectMemberIdentifier(value);
|
|
2434
2435
|
}
|
|
@@ -2451,7 +2452,7 @@ var NeoScriptDialogueOp = /* @__PURE__ */ ((NeoScriptDialogueOp2) => {
|
|
|
2451
2452
|
return NeoScriptDialogueOp2;
|
|
2452
2453
|
})(NeoScriptDialogueOp || {});
|
|
2453
2454
|
|
|
2454
|
-
// ../
|
|
2455
|
+
// ../packages/models/src/neoscript/neoscript-compiler-revision.ts
|
|
2455
2456
|
var ACTIVE_NEOSCRIPT_COMPILER_REVISION_ROLLOUT = (
|
|
2456
2457
|
// <neoscript-compiler-revision-rollout>
|
|
2457
2458
|
null
|
|
@@ -2496,7 +2497,7 @@ function isCompiledBodyShape(object) {
|
|
|
2496
2497
|
return Object.prototype.hasOwnProperty.call(object, "typeInfo");
|
|
2497
2498
|
}
|
|
2498
2499
|
|
|
2499
|
-
// ../
|
|
2500
|
+
// ../packages/models/src/neoscript/neoscript-types.ts
|
|
2500
2501
|
var NS_TYPE_UNKNOWN = "Unknown";
|
|
2501
2502
|
var NS_TYPE_VOID = "Void";
|
|
2502
2503
|
var NSAssignmentOperator = /* @__PURE__ */ ((NSAssignmentOperator2) => {
|
|
@@ -2531,7 +2532,7 @@ var NSCollectionMutation = /* @__PURE__ */ ((NSCollectionMutation2) => {
|
|
|
2531
2532
|
return NSCollectionMutation2;
|
|
2532
2533
|
})(NSCollectionMutation || {});
|
|
2533
2534
|
|
|
2534
|
-
// ../
|
|
2535
|
+
// ../packages/models/src/neoscript/neoscript-guards.ts
|
|
2535
2536
|
function isNSTypeInfoBase(value) {
|
|
2536
2537
|
const v = value;
|
|
2537
2538
|
return typeof v === "object" && v !== null && typeof v.type === "number" && v.type in MemberKind && typeof v.required === "boolean";
|
|
@@ -3629,24 +3630,30 @@ function isNSInstructionTry(value) {
|
|
|
3629
3630
|
}
|
|
3630
3631
|
return true;
|
|
3631
3632
|
}
|
|
3632
|
-
function
|
|
3633
|
-
const
|
|
3634
|
-
if (instruction?.type !== "addChangeListener" /* addChangeListener */ && instruction?.type !== "removeChangeListener" /* removeChangeListener */)
|
|
3635
|
-
return false;
|
|
3636
|
-
const target = instruction.target;
|
|
3633
|
+
function isNSChangeListenerTarget(value) {
|
|
3634
|
+
const target = value;
|
|
3637
3635
|
if (!target || typeof target.memberId !== "string" || target.memberId.length === 0)
|
|
3638
3636
|
return false;
|
|
3639
3637
|
if (!isNSPointer(target.owner) || !isNSTypeInfo(target.typeInfo))
|
|
3640
3638
|
return false;
|
|
3641
|
-
|
|
3642
|
-
|
|
3639
|
+
return target.writability !== void 0 && Object.values(NSWritability).includes(target.writability);
|
|
3640
|
+
}
|
|
3641
|
+
function isNSInstructionChangeListener(value) {
|
|
3642
|
+
const instruction = value;
|
|
3643
|
+
if (instruction?.type !== "addChangeListener" /* addChangeListener */ && instruction?.type !== "removeChangeListener" /* removeChangeListener */)
|
|
3644
|
+
return false;
|
|
3645
|
+
return isNSChangeListenerTarget(instruction.target) && isNSPointer(instruction.listener);
|
|
3646
|
+
}
|
|
3647
|
+
function isNSInstructionClearChangeListeners(value) {
|
|
3648
|
+
const instruction = value;
|
|
3649
|
+
return instruction?.type === "clearChangeListeners" /* clearChangeListeners */ && isNSChangeListenerTarget(instruction.target);
|
|
3643
3650
|
}
|
|
3644
3651
|
function isNSInstructionDebug(value) {
|
|
3645
3652
|
const v = value;
|
|
3646
3653
|
return v?.type === "debug" /* debug */ && ["log", "warning", "error", "assert"].includes(v.severity ?? "") && isNSPointer(v.message) && isNSTypeInfo(v.messageType) && (v.severity === "assert" ? isNSPointer(v.condition) : v.condition === void 0);
|
|
3647
3654
|
}
|
|
3648
3655
|
function isNSInstruction(value) {
|
|
3649
|
-
return isNSInstructionDebug(value) || isNSInstructionVariable(value) || isNSInstructionIfBranch(value) || isNSInstructionReturn(value) || isNSInstructionThrow(value) || isNSInstructionAssign(value) || isNSInstructionCollectionCall(value) || isNSInstructionFunctionCall(value) || isNSInstructionConditionLoop(value) || isNSInstructionFor(value) || isNSInstructionForEach(value) || isNSInstructionBreak(value) || isNSInstructionContinue(value) || isNSInstructionSwitch(value) || isNSInstructionTry(value) || isNSInstructionChangeListener(value) || isNSInstructionAddActionListener(value) || isNSInstructionRemoveActionListener(value);
|
|
3656
|
+
return isNSInstructionDebug(value) || isNSInstructionVariable(value) || isNSInstructionIfBranch(value) || isNSInstructionReturn(value) || isNSInstructionThrow(value) || isNSInstructionAssign(value) || isNSInstructionCollectionCall(value) || isNSInstructionFunctionCall(value) || isNSInstructionConditionLoop(value) || isNSInstructionFor(value) || isNSInstructionForEach(value) || isNSInstructionBreak(value) || isNSInstructionContinue(value) || isNSInstructionSwitch(value) || isNSInstructionTry(value) || isNSInstructionChangeListener(value) || isNSInstructionClearChangeListeners(value) || isNSInstructionAddActionListener(value) || isNSInstructionRemoveActionListener(value);
|
|
3650
3657
|
}
|
|
3651
3658
|
function isNSInstructions(value) {
|
|
3652
3659
|
return Array.isArray(value) && value.every(isNSInstruction);
|
|
@@ -3672,7 +3679,7 @@ function isNSVoidBody(value) {
|
|
|
3672
3679
|
return value.typeInfo.required === true;
|
|
3673
3680
|
}
|
|
3674
3681
|
|
|
3675
|
-
// ../
|
|
3682
|
+
// ../packages/models/src/neoscript/parameter-defaults.ts
|
|
3676
3683
|
function parameterHasDefault(argument2) {
|
|
3677
3684
|
return argument2.defaultValue !== void 0;
|
|
3678
3685
|
}
|
|
@@ -3718,7 +3725,7 @@ function callableParameters(overload) {
|
|
|
3718
3725
|
}));
|
|
3719
3726
|
}
|
|
3720
3727
|
|
|
3721
|
-
// ../
|
|
3728
|
+
// ../packages/models/src/neoscript/type-info-equality.ts
|
|
3722
3729
|
function typeInfosInvariantlyEqual(left, right) {
|
|
3723
3730
|
if (left.type !== right.type) return false;
|
|
3724
3731
|
if (left.required !== right.required) return false;
|
|
@@ -3769,7 +3776,7 @@ function typeInfosInvariantlyEqual(left, right) {
|
|
|
3769
3776
|
return true;
|
|
3770
3777
|
}
|
|
3771
3778
|
|
|
3772
|
-
// ../src/common/collections.ts
|
|
3779
|
+
// ../packages/models/src/common/collections.ts
|
|
3773
3780
|
function indexById(records2) {
|
|
3774
3781
|
const indexed = /* @__PURE__ */ new Map();
|
|
3775
3782
|
for (const record4 of records2) indexed.set(record4.id, record4);
|
|
@@ -3794,7 +3801,7 @@ async function forEachConcurrently(items, limit, work) {
|
|
|
3794
3801
|
);
|
|
3795
3802
|
}
|
|
3796
3803
|
|
|
3797
|
-
// ../
|
|
3804
|
+
// ../packages/models/src/classes/classes.ts
|
|
3798
3805
|
function isAbstractClass(value) {
|
|
3799
3806
|
return value?.modifier === 1 /* Abstract */;
|
|
3800
3807
|
}
|
|
@@ -3986,7 +3993,7 @@ function isNeoSchemaClass(value) {
|
|
|
3986
3993
|
return isNeoSchemaClassProps(value);
|
|
3987
3994
|
}
|
|
3988
3995
|
|
|
3989
|
-
// ../
|
|
3996
|
+
// ../packages/models/src/members/structured-leaf-fields.ts
|
|
3990
3997
|
var STRUCTURED_LEAF_FIELDS = {
|
|
3991
3998
|
[11 /* Sprite */]: [
|
|
3992
3999
|
{ name: "FileId", key: "fileId", type: "fileId" },
|
|
@@ -4090,7 +4097,7 @@ function structuredLeafFieldViolation(type, value) {
|
|
|
4090
4097
|
return "must be between 0 and 1";
|
|
4091
4098
|
}
|
|
4092
4099
|
|
|
4093
|
-
// ../
|
|
4100
|
+
// ../packages/models/src/members/member-kinds.ts
|
|
4094
4101
|
var FunctionArgumentReservedNames = /* @__PURE__ */ new Set([
|
|
4095
4102
|
"this",
|
|
4096
4103
|
"root",
|
|
@@ -5264,7 +5271,7 @@ function isAnyMemberAuthoredOrCompiled(value) {
|
|
|
5264
5271
|
return isAnyMember(value) || isUncompiledMemberNSFunctionOverride(value) || getField(value, "kind") === 10 /* NSProperty */ && isMemberOverridePropsInternal(value, true);
|
|
5265
5272
|
}
|
|
5266
5273
|
|
|
5267
|
-
// ../
|
|
5274
|
+
// ../packages/models/src/project/project-schema-index.ts
|
|
5268
5275
|
var CircularInheritanceError = class extends Error {
|
|
5269
5276
|
constructor(nodeId, chain) {
|
|
5270
5277
|
super(
|
|
@@ -5491,7 +5498,7 @@ function projectSchemaIndexFor(source, revision = EMPTY_REVISION) {
|
|
|
5491
5498
|
return index;
|
|
5492
5499
|
}
|
|
5493
5500
|
|
|
5494
|
-
// ../
|
|
5501
|
+
// ../packages/models/src/classes/inheritance.ts
|
|
5495
5502
|
var UnresolvedMemberInheritanceError = class extends Error {
|
|
5496
5503
|
constructor(memberId) {
|
|
5497
5504
|
super(
|
|
@@ -5759,7 +5766,7 @@ function descendantClassIdsInChildIndex(classId, childrenByClassId) {
|
|
|
5759
5766
|
return result;
|
|
5760
5767
|
}
|
|
5761
5768
|
|
|
5762
|
-
// ../
|
|
5769
|
+
// ../packages/models/src/system-record-id.ts
|
|
5763
5770
|
var SYSTEM_RECORD_ID_PREFIX = "system_";
|
|
5764
5771
|
function isSystemRecordId(id) {
|
|
5765
5772
|
return id.startsWith(SYSTEM_RECORD_ID_PREFIX);
|
|
@@ -5799,7 +5806,7 @@ function inSystemRecordNamespaceOf(ownerId, derivedId) {
|
|
|
5799
5806
|
return systemRecordId(derivedId);
|
|
5800
5807
|
}
|
|
5801
5808
|
|
|
5802
|
-
// ../
|
|
5809
|
+
// ../packages/models/src/classes/world-system-classes.generated.ts
|
|
5803
5810
|
var WORLD_SPRITE_MASK_INTERACTION_ENUM_ID = "system_4e6c4d6f-1d0b-402a-ad3a-be92242dceec";
|
|
5804
5811
|
var WORLD_SPRITE_MASK_INTERACTION_NONE_OPTION_ID = "system_9d607a4f-60c3-4347-94fc-f24b538bf468";
|
|
5805
5812
|
var WORLD_SPRITE_MASK_INTERACTION_VISIBLE_INSIDE_OPTION_ID = "system_4c670ac9-78a4-44e9-9833-94e1c69dca97";
|
|
@@ -7750,7 +7757,7 @@ var WORLD_SYSTEM_CLASS_DEFINITIONS = [
|
|
|
7750
7757
|
}
|
|
7751
7758
|
];
|
|
7752
7759
|
|
|
7753
|
-
// ../
|
|
7760
|
+
// ../packages/models/src/core/deep-clone-plain-data.ts
|
|
7754
7761
|
function deepClonePlainData(value) {
|
|
7755
7762
|
return clonePlain(value, "$", /* @__PURE__ */ new Set());
|
|
7756
7763
|
}
|
|
@@ -7798,41 +7805,7 @@ function clonePlain(value, path, visiting) {
|
|
|
7798
7805
|
}
|
|
7799
7806
|
}
|
|
7800
7807
|
|
|
7801
|
-
// ../
|
|
7802
|
-
var WORLD_SYSTEM_CLASS_DEFINITION_BY_KIND = new Map(
|
|
7803
|
-
WORLD_SYSTEM_CLASS_DEFINITIONS.map((definition) => [
|
|
7804
|
-
definition.worldKind,
|
|
7805
|
-
definition
|
|
7806
|
-
])
|
|
7807
|
-
);
|
|
7808
|
-
var WORLD_SYSTEM_ANIMATION_KIND_MARKER = "animation";
|
|
7809
|
-
var WORLD_SYSTEM_ANIMATION_KINDS = new Set(
|
|
7810
|
-
WORLD_SYSTEM_CLASS_DEFINITIONS.map(
|
|
7811
|
-
(definition) => definition.worldKind
|
|
7812
|
-
).filter(
|
|
7813
|
-
(worldKind) => worldKind.toLowerCase().includes(WORLD_SYSTEM_ANIMATION_KIND_MARKER)
|
|
7814
|
-
)
|
|
7815
|
-
);
|
|
7816
|
-
var GENERIC_WORLD_SYSTEM_CLASS_KINDS = new Set(
|
|
7817
|
-
WORLD_SYSTEM_CLASS_DEFINITIONS.filter(
|
|
7818
|
-
(definition) => (definition.genericParams?.length ?? 0) > 0
|
|
7819
|
-
).map((definition) => definition.worldKind)
|
|
7820
|
-
);
|
|
7821
|
-
var WORLD_SYSTEM_ALL_KINDS = new Set(
|
|
7822
|
-
WORLD_SYSTEM_CLASS_DEFINITIONS.map((definition) => definition.worldKind)
|
|
7823
|
-
);
|
|
7824
|
-
var WORLD_SYSTEM_SCHEMA_FIELD_SITES_BY_MEMBER_ID = new Map(
|
|
7825
|
-
WORLD_SYSTEM_CLASS_DEFINITIONS.flatMap(
|
|
7826
|
-
(definition) => (definition.schemaFields ?? []).map(
|
|
7827
|
-
(field) => [
|
|
7828
|
-
field.memberId,
|
|
7829
|
-
{ worldKind: definition.worldKind, schemaKey: field.schemaKey }
|
|
7830
|
-
]
|
|
7831
|
-
)
|
|
7832
|
-
)
|
|
7833
|
-
);
|
|
7834
|
-
|
|
7835
|
-
// ../src/models/classes/generics.ts
|
|
7808
|
+
// ../packages/models/src/classes/generics.ts
|
|
7836
7809
|
var genericBindingsByClassIndex = /* @__PURE__ */ new WeakMap();
|
|
7837
7810
|
function resolveGenericEnv(classId, classes, draft) {
|
|
7838
7811
|
const index = classIndexFor(classes);
|
|
@@ -8530,7 +8503,7 @@ function isAnimationChildOverrideEntrySlot(slotMember, members) {
|
|
|
8530
8503
|
return false;
|
|
8531
8504
|
}
|
|
8532
8505
|
|
|
8533
|
-
// ../
|
|
8506
|
+
// ../packages/models/src/members/instance-provenance.ts
|
|
8534
8507
|
var LITERAL_INSTANCE_IDENTITY_FIELDS = [
|
|
8535
8508
|
"classId",
|
|
8536
8509
|
"constructorArgs",
|
|
@@ -8570,7 +8543,7 @@ function isCollapseStampedInstanceRoot(value) {
|
|
|
8570
8543
|
return isLiteralValueContent(value) && isVirtualInstanceRootShape(value);
|
|
8571
8544
|
}
|
|
8572
8545
|
|
|
8573
|
-
// ../
|
|
8546
|
+
// ../packages/models/src/members/unordered-list-membership.ts
|
|
8574
8547
|
function buildUnorderedListMembershipIndex(values) {
|
|
8575
8548
|
const membersByContainerId = /* @__PURE__ */ new Map();
|
|
8576
8549
|
for (const candidate of values) {
|
|
@@ -8589,7 +8562,7 @@ function buildUnorderedListMembershipIndex(values) {
|
|
|
8589
8562
|
return membersByContainerId;
|
|
8590
8563
|
}
|
|
8591
8564
|
|
|
8592
|
-
// ../
|
|
8565
|
+
// ../packages/models/src/members/member-value-id.ts
|
|
8593
8566
|
var NEO_MEMBER_VALUE_NAMESPACE = "7f2b9c14-58d6-5a07-b3e1-4c9d0a6f8b25";
|
|
8594
8567
|
var NEO_VIRTUAL_VALUE_NAMESPACE = "3e8ca0b3-e3f1-5d5f-bf2f-6ab5ee3896d0";
|
|
8595
8568
|
var virtualNamespaceBytes = parse_default(NEO_VIRTUAL_VALUE_NAMESPACE);
|
|
@@ -8622,7 +8595,7 @@ function pendingVirtualValueId(pendingInstanceRootId, sourceIdentity2) {
|
|
|
8622
8595
|
return `${PENDING_VIRTUAL_VALUE_PREFIX}${encodeURIComponent(pendingInstanceRootId)}:${encodeURIComponent(sourceIdentity2)}`;
|
|
8623
8596
|
}
|
|
8624
8597
|
|
|
8625
|
-
// ../
|
|
8598
|
+
// ../packages/models/src/members/packed-value-encoding.ts
|
|
8626
8599
|
var PACKED_VALUE_ENTRY_KEY = "~packed";
|
|
8627
8600
|
var PackedValueEncodingError = class extends Error {
|
|
8628
8601
|
constructor(message) {
|
|
@@ -8887,7 +8860,7 @@ function registerEdge(edges, ownerId, childId) {
|
|
|
8887
8860
|
else existing.push(childId);
|
|
8888
8861
|
}
|
|
8889
8862
|
|
|
8890
|
-
// ../
|
|
8863
|
+
// ../packages/models/src/members/member-storage-key.ts
|
|
8891
8864
|
var MAIN_STORAGE_PARTITION = "main";
|
|
8892
8865
|
var STORAGE_KEY_INHERIT = "inherit";
|
|
8893
8866
|
var STORAGE_KEY_ALL = "all";
|
|
@@ -8925,7 +8898,7 @@ function resolveMapKeyForCreatedValue(args) {
|
|
|
8925
8898
|
return declaration;
|
|
8926
8899
|
}
|
|
8927
8900
|
|
|
8928
|
-
// ../
|
|
8901
|
+
// ../packages/models/src/members/storage-partitions.ts
|
|
8929
8902
|
function stampCreatedValuesMapKey(values, mapKey) {
|
|
8930
8903
|
const normalized = mapKey === void 0 || mapKey === null || mapKey.length === 0 || mapKey === MAIN_STORAGE_PARTITION ? null : mapKey;
|
|
8931
8904
|
for (const value of values) {
|
|
@@ -9030,7 +9003,7 @@ function referencedValueIdCandidates(value) {
|
|
|
9030
9003
|
return [];
|
|
9031
9004
|
}
|
|
9032
9005
|
|
|
9033
|
-
// ../
|
|
9006
|
+
// ../packages/models/src/core/auth-ownership-types.ts
|
|
9034
9007
|
var ActorKind = {
|
|
9035
9008
|
/**
|
|
9036
9009
|
* `better-auth` user identities.
|
|
@@ -9056,7 +9029,7 @@ function isActorKind(value) {
|
|
|
9056
9029
|
return value === ActorKind.user || value === ActorKind.organization || value === ActorKind.system;
|
|
9057
9030
|
}
|
|
9058
9031
|
|
|
9059
|
-
// ../
|
|
9032
|
+
// ../packages/models/src/members/member-change-listeners.ts
|
|
9060
9033
|
function editChangeListenerSet(explicit, inherited, edit, options = { inheritedComplete: true }) {
|
|
9061
9034
|
if (edit.kind === "reset") {
|
|
9062
9035
|
return explicit === void 0 ? { changed: false } : { changed: true, targets: void 0 };
|
|
@@ -9162,7 +9135,7 @@ function defaultSourceWithListeners(row, graph) {
|
|
|
9162
9135
|
return { ...row, changeListeners: map };
|
|
9163
9136
|
}
|
|
9164
9137
|
|
|
9165
|
-
// ../
|
|
9138
|
+
// ../packages/models/src/constructors/constructors.ts
|
|
9166
9139
|
var REJECTED_CONSTRUCTOR_KEYS = [
|
|
9167
9140
|
"bodyMode",
|
|
9168
9141
|
"uiAction",
|
|
@@ -9309,7 +9282,7 @@ function constructorActionParameterId(constructor, index) {
|
|
|
9309
9282
|
return `__arg_${index}__`;
|
|
9310
9283
|
}
|
|
9311
9284
|
|
|
9312
|
-
// ../
|
|
9285
|
+
// ../packages/models/src/classes/construction-requirements.ts
|
|
9313
9286
|
function requiredMembersForConstruction(classId, document2, classArguments2) {
|
|
9314
9287
|
return unsettledMembers(
|
|
9315
9288
|
classId,
|
|
@@ -9543,7 +9516,7 @@ function resolveConstructionTypeArguments(typeArguments, document2) {
|
|
|
9543
9516
|
return bindings;
|
|
9544
9517
|
}
|
|
9545
9518
|
|
|
9546
|
-
// ../
|
|
9519
|
+
// ../packages/models/src/unity/unity-import-settings.ts
|
|
9547
9520
|
var UNITY_TEXTURE_2D_OVERRIDE_PATHS = /* @__PURE__ */ new Set([
|
|
9548
9521
|
"textureType",
|
|
9549
9522
|
"textureShape",
|
|
@@ -10226,7 +10199,7 @@ function isUnityAudioSampleRateSetting(value) {
|
|
|
10226
10199
|
return false;
|
|
10227
10200
|
}
|
|
10228
10201
|
|
|
10229
|
-
// ../
|
|
10202
|
+
// ../packages/models/src/files/file-types.ts
|
|
10230
10203
|
function isProjectFileType(value) {
|
|
10231
10204
|
if (value === "image" /* Image */) return true;
|
|
10232
10205
|
if (value === "audio" /* Audio */) return true;
|
|
@@ -10301,7 +10274,7 @@ function isSha256(value) {
|
|
|
10301
10274
|
return isString(value) && /^[a-f0-9]{64}$/u.test(value);
|
|
10302
10275
|
}
|
|
10303
10276
|
|
|
10304
|
-
// ../
|
|
10277
|
+
// ../packages/models/src/files/file-member-utils.ts
|
|
10305
10278
|
function resolveProjectFileTextureSettings(file, textureTemplates) {
|
|
10306
10279
|
if (file.fileType !== "image" /* Image */) return null;
|
|
10307
10280
|
const existing = file.unityTextureSettings;
|
|
@@ -10380,7 +10353,7 @@ function isPendingId(id) {
|
|
|
10380
10353
|
return id.startsWith(PENDING_ID_PREFIX);
|
|
10381
10354
|
}
|
|
10382
10355
|
|
|
10383
|
-
// ../
|
|
10356
|
+
// ../packages/models/src/enum/enum-types.ts
|
|
10384
10357
|
var OPTION_ID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u;
|
|
10385
10358
|
function isValidEnumOptionId(id) {
|
|
10386
10359
|
if (typeof id !== "string" || id.length === 0) return false;
|
|
@@ -10458,7 +10431,7 @@ function isProspectiveEnum(value) {
|
|
|
10458
10431
|
return isEnumPropsWithIds(value, isProspectiveEnumOptionId);
|
|
10459
10432
|
}
|
|
10460
10433
|
|
|
10461
|
-
// ../
|
|
10434
|
+
// ../packages/models/src/members/stored-value-shape.ts
|
|
10462
10435
|
var ANIMATION_OVERRIDE_GRAPH_MEMBER_IDS = /* @__PURE__ */ new Set([
|
|
10463
10436
|
WORLD_ANIMATION_FRAME_OVERRIDES_MEMBER_ID,
|
|
10464
10437
|
WORLD_ANIMATION_CHILD_OVERRIDE_OVERRIDES_MEMBER_ID
|
|
@@ -10542,7 +10515,7 @@ function leafIssue(leaf, shape, value) {
|
|
|
10542
10515
|
return field === null ? { kind: shape } : { kind: "field", leaf, ...field };
|
|
10543
10516
|
}
|
|
10544
10517
|
|
|
10545
|
-
// ../
|
|
10518
|
+
// ../packages/models/src/members/build-default-member-value.ts
|
|
10546
10519
|
var DECLARATION_DEFAULT_POSITION = {
|
|
10547
10520
|
insideAnimationOverrideGraph: false
|
|
10548
10521
|
};
|
|
@@ -11867,7 +11840,7 @@ function validateAudioMemberValue(document2, member, body) {
|
|
|
11867
11840
|
}
|
|
11868
11841
|
}
|
|
11869
11842
|
|
|
11870
|
-
// ../
|
|
11843
|
+
// ../packages/models/src/members/list-indexes.ts
|
|
11871
11844
|
function validateListIndexDefinitions(ctx, listMember) {
|
|
11872
11845
|
const errors = [];
|
|
11873
11846
|
let list;
|
|
@@ -12080,7 +12053,7 @@ function errorMessage(error) {
|
|
|
12080
12053
|
return error instanceof Error ? error.message : String(error);
|
|
12081
12054
|
}
|
|
12082
12055
|
|
|
12083
|
-
// ../
|
|
12056
|
+
// ../packages/models/src/members/effective-storage.ts
|
|
12084
12057
|
function declaredMemberStorage(memberId, members) {
|
|
12085
12058
|
const declared = walkExtendsMemberChain(memberId, members, (a) => {
|
|
12086
12059
|
const storage = a.storage;
|
|
@@ -12326,7 +12299,7 @@ var EffectiveStorageResolver = class {
|
|
|
12326
12299
|
}
|
|
12327
12300
|
};
|
|
12328
12301
|
|
|
12329
|
-
// ../
|
|
12302
|
+
// ../packages/neoscript-runtime/src/neoscript/debug.ts
|
|
12330
12303
|
function snapshotNeoScriptFrames(state) {
|
|
12331
12304
|
const frames = state.frames.slice(-64).reverse().map((frame) => Object.freeze({ ...frame }));
|
|
12332
12305
|
if (state.frames.length > 64)
|
|
@@ -13136,7 +13109,7 @@ function withNeoTestPrelude(context) {
|
|
|
13136
13109
|
return { ...context, project };
|
|
13137
13110
|
}
|
|
13138
13111
|
|
|
13139
|
-
// ../
|
|
13112
|
+
// ../packages/neoscript-runtime/src/neoscript/NSGetterRuntimeError.ts
|
|
13140
13113
|
var NSGetterRuntimeError = class extends Error {
|
|
13141
13114
|
/** Keep catch-visible runtime messages stable; add guidance for diagnostic hosts. */
|
|
13142
13115
|
get diagnosticMessage() {
|
|
@@ -13184,7 +13157,7 @@ var UncompiledInitializerRuntimeError = class extends NSGetterRuntimeError {
|
|
|
13184
13157
|
valueId;
|
|
13185
13158
|
};
|
|
13186
13159
|
|
|
13187
|
-
// ../
|
|
13160
|
+
// ../packages/neoscript-runtime/src/listener-write-index.ts
|
|
13188
13161
|
var indexes = /* @__PURE__ */ new WeakMap();
|
|
13189
13162
|
var empty = /* @__PURE__ */ new Map();
|
|
13190
13163
|
function listenerWritesByOwner(state) {
|
|
@@ -13204,8 +13177,11 @@ function listenerWritesByOwner(state) {
|
|
|
13204
13177
|
}
|
|
13205
13178
|
return index.owners;
|
|
13206
13179
|
}
|
|
13180
|
+
function changeListenerWriteEdit(write) {
|
|
13181
|
+
return write.operation === "clear" ? { kind: "replace", targets: [] } : { kind: write.operation, target: write.listener };
|
|
13182
|
+
}
|
|
13207
13183
|
|
|
13208
|
-
// ../
|
|
13184
|
+
// ../packages/neoscript-runtime/src/neoscript/typed-aggregate-row-references.ts
|
|
13209
13185
|
function visitTypedAggregateRowReferences(value, rawType, visitor) {
|
|
13210
13186
|
visitor.beforeVisit?.();
|
|
13211
13187
|
const pending = [{ value, type: rawType }];
|
|
@@ -13231,7 +13207,7 @@ function visitTypedAggregateRowReferences(value, rawType, visitor) {
|
|
|
13231
13207
|
}
|
|
13232
13208
|
}
|
|
13233
13209
|
|
|
13234
|
-
// ../
|
|
13210
|
+
// ../packages/neoscript-runtime/src/neoscript/initializer-dependencies.ts
|
|
13235
13211
|
var PendingInitializerDependency = class extends NSGetterRuntimeError {
|
|
13236
13212
|
constructor(valueId) {
|
|
13237
13213
|
super(`Initializer dependency "${valueId}" has not been materialized.`);
|
|
@@ -13240,7 +13216,7 @@ var PendingInitializerDependency = class extends NSGetterRuntimeError {
|
|
|
13240
13216
|
valueId;
|
|
13241
13217
|
};
|
|
13242
13218
|
|
|
13243
|
-
// ../
|
|
13219
|
+
// ../packages/neoscript-runtime/src/neoscript/unattributable-reads.ts
|
|
13244
13220
|
var OWNERSHIP_CHAIN_PREFIXES = [
|
|
13245
13221
|
"generic-parent-resolution:",
|
|
13246
13222
|
"member-owner-resolution:",
|
|
@@ -13273,7 +13249,7 @@ function classifyUnattributableRead(reason) {
|
|
|
13273
13249
|
return { scope: "corpus" /* Corpus */ };
|
|
13274
13250
|
}
|
|
13275
13251
|
|
|
13276
|
-
// ../src/
|
|
13252
|
+
// ../packages/neoscript-runtime/src/values/value-row-owner-members.ts
|
|
13277
13253
|
function valueIdsWithSourceChains(targetValueIds, valuesById) {
|
|
13278
13254
|
const result = new Set(targetValueIds);
|
|
13279
13255
|
for (const targetId of targetValueIds) {
|
|
@@ -13582,7 +13558,7 @@ var NEO_CELL_PATTERN_PURE_NATIVE_MEMBER_IDS = /* @__PURE__ */ new Set([
|
|
|
13582
13558
|
]);
|
|
13583
13559
|
var NEO_OBJECT_CLASS_ID = "system_f671535d-0eb6-4139-9caf-5c5276febd31";
|
|
13584
13560
|
|
|
13585
|
-
// ../
|
|
13561
|
+
// ../packages/neoscript-runtime/src/neoscript/cell-pattern.ts
|
|
13586
13562
|
function integer(value, name, minimum = -2147483648) {
|
|
13587
13563
|
if (typeof value !== "number" || !Number.isInteger(value)) {
|
|
13588
13564
|
throw new TypeError(`${name} must be an integer.`);
|
|
@@ -13777,7 +13753,7 @@ function evaluateCellPatternNative(memberId, receiver, args, ctx) {
|
|
|
13777
13753
|
}
|
|
13778
13754
|
}
|
|
13779
13755
|
|
|
13780
|
-
// ../
|
|
13756
|
+
// ../packages/models/src/project/project-version-types.ts
|
|
13781
13757
|
var ProjectVersionBumpKind = {
|
|
13782
13758
|
Patch: "patch",
|
|
13783
13759
|
Minor: "minor",
|
|
@@ -14016,7 +13992,7 @@ function isStringArray(value) {
|
|
|
14016
13992
|
return value.every(isString);
|
|
14017
13993
|
}
|
|
14018
13994
|
|
|
14019
|
-
// ../
|
|
13995
|
+
// ../packages/models/src/project/internal-record-relations.ts
|
|
14020
13996
|
var InternalRecordRelationKind = {
|
|
14021
13997
|
WorldGridTileImport: "world.grid.tile-import",
|
|
14022
13998
|
WorldGridObjectImport: "world.grid.object-import",
|
|
@@ -14350,7 +14326,7 @@ function effectiveRelation(relation, targetRecordId, sourceAncestryDepth) {
|
|
|
14350
14326
|
};
|
|
14351
14327
|
}
|
|
14352
14328
|
|
|
14353
|
-
// ../
|
|
14329
|
+
// ../packages/models/src/classes/world-layer-link-target.ts
|
|
14354
14330
|
function worldLayerLinkTargetDescriptorForClass(classId, classes) {
|
|
14355
14331
|
return worldLayerLinkTargetDescriptor(
|
|
14356
14332
|
resolveWorldSystemClassKind(classId, classes)
|
|
@@ -14446,7 +14422,7 @@ function resolveWorldLayerLinkTarget(args) {
|
|
|
14446
14422
|
};
|
|
14447
14423
|
}
|
|
14448
14424
|
|
|
14449
|
-
// ../
|
|
14425
|
+
// ../packages/neoscript-runtime/src/world-grid-query-reads.ts
|
|
14450
14426
|
function worldGridQueryReadKey(read) {
|
|
14451
14427
|
return read.kind === "placement" ? JSON.stringify([read.kind, read.valueId]) : JSON.stringify([read.kind, read.gridId, read.cell.x, read.cell.y]);
|
|
14452
14428
|
}
|
|
@@ -14470,7 +14446,7 @@ var WorldGridQueryReadSet = class {
|
|
|
14470
14446
|
}
|
|
14471
14447
|
};
|
|
14472
14448
|
|
|
14473
|
-
// ../
|
|
14449
|
+
// ../packages/neoscript-runtime/src/neoscript/initializer-context.ts
|
|
14474
14450
|
function initializerEvaluatorCacheKey(document2) {
|
|
14475
14451
|
return document2.evaluatorCache?.key ?? document2;
|
|
14476
14452
|
}
|
|
@@ -14514,7 +14490,7 @@ var InitializerReadSet = class {
|
|
|
14514
14490
|
};
|
|
14515
14491
|
};
|
|
14516
14492
|
|
|
14517
|
-
// ../
|
|
14493
|
+
// ../packages/neoscript-runtime/src/world-grid-query.ts
|
|
14518
14494
|
var WorldGridQueryError = class extends Error {
|
|
14519
14495
|
name = "WorldGridQueryError";
|
|
14520
14496
|
};
|
|
@@ -14859,7 +14835,7 @@ function checkedCoordinate(value) {
|
|
|
14859
14835
|
return value;
|
|
14860
14836
|
}
|
|
14861
14837
|
|
|
14862
|
-
// ../
|
|
14838
|
+
// ../packages/neoscript-runtime/src/neoscript/getter-subscriptions.ts
|
|
14863
14839
|
var NeoScriptGetterSubscription = class {
|
|
14864
14840
|
constructor(rowId, getterId, classId) {
|
|
14865
14841
|
this.rowId = rowId;
|
|
@@ -14997,7 +14973,7 @@ var NeoScriptGetterSubscriptions = class _NeoScriptGetterSubscriptions {
|
|
|
14997
14973
|
}
|
|
14998
14974
|
};
|
|
14999
14975
|
|
|
15000
|
-
// ../
|
|
14976
|
+
// ../packages/models/src/decimal/decimal-math.ts
|
|
15001
14977
|
var DecimalOverflowError = class extends Error {
|
|
15002
14978
|
};
|
|
15003
14979
|
var DecimalDivisionByZeroError = class extends Error {
|
|
@@ -15264,7 +15240,7 @@ function floatFromDecimalString(value) {
|
|
|
15264
15240
|
return Number(value);
|
|
15265
15241
|
}
|
|
15266
15242
|
|
|
15267
|
-
// ../
|
|
15243
|
+
// ../packages/models/src/interfaces/interface-graph.ts
|
|
15268
15244
|
var CircularInterfaceExtensionError = class extends Error {
|
|
15269
15245
|
constructor(interfaceId, chain) {
|
|
15270
15246
|
super(
|
|
@@ -15328,7 +15304,7 @@ function classImplementsInterface(classId, interfaceId, classes, interfaces) {
|
|
|
15328
15304
|
);
|
|
15329
15305
|
}
|
|
15330
15306
|
|
|
15331
|
-
// ../
|
|
15307
|
+
// ../packages/models/src/members/read-class-member.ts
|
|
15332
15308
|
function readClassMember(args) {
|
|
15333
15309
|
const { member, schemaKey } = args;
|
|
15334
15310
|
const declaration = member.kind !== 10 /* NSProperty */ && member.defaultValue != null ? member.defaultValue : void 0;
|
|
@@ -15437,7 +15413,7 @@ function describeParameter(parameter3) {
|
|
|
15437
15413
|
return `${parameter3.name}${nullability}${defaulted}`;
|
|
15438
15414
|
}
|
|
15439
15415
|
|
|
15440
|
-
// ../
|
|
15416
|
+
// ../packages/neoscript-runtime/src/neoscript/NeoScriptScope.ts
|
|
15441
15417
|
var NeoScriptScope = class {
|
|
15442
15418
|
constructor(parent = null, initialBindings) {
|
|
15443
15419
|
this.parent = parent;
|
|
@@ -15510,7 +15486,7 @@ var NeoScriptScope = class {
|
|
|
15510
15486
|
}
|
|
15511
15487
|
};
|
|
15512
15488
|
|
|
15513
|
-
// ../
|
|
15489
|
+
// ../packages/neoscript-runtime/src/neoscript/evaluateNSGetter.ts
|
|
15514
15490
|
var DELEGATE_LEXICAL_THIS = /* @__PURE__ */ Symbol("neoDelegateLexicalThis");
|
|
15515
15491
|
var DELEGATE_LEXICAL_ROOT = /* @__PURE__ */ Symbol("neoDelegateLexicalRoot");
|
|
15516
15492
|
var NonCatchableNSGetterRuntimeError = class extends NSGetterRuntimeError {
|
|
@@ -15798,7 +15774,7 @@ function layerEvaluatorLookups(base, overlay) {
|
|
|
15798
15774
|
return merged.length === 0 ? void 0 : merged;
|
|
15799
15775
|
};
|
|
15800
15776
|
const unorderedMembership = /* @__PURE__ */ new Map();
|
|
15801
|
-
const
|
|
15777
|
+
const unorderedListEntryIds = (containerId) => {
|
|
15802
15778
|
const cached = unorderedMembership.get(containerId);
|
|
15803
15779
|
if (cached !== void 0) return cached;
|
|
15804
15780
|
const own = localUnorderedMembership.get(containerId) ?? [];
|
|
@@ -15865,7 +15841,7 @@ function layerEvaluatorLookups(base, overlay) {
|
|
|
15865
15841
|
memberById: (id) => base.memberById(id),
|
|
15866
15842
|
valueById: (id) => overlay.rows.get(id) ?? (overlay.hiddenIds.has(id) ? null : base.valueById(id)),
|
|
15867
15843
|
hasStoredValueId: (id) => overlay.rows.has(id) || !overlay.hiddenIds.has(id) && (base.hasStoredValueId?.(id) ?? false),
|
|
15868
|
-
unorderedListEntryIds
|
|
15844
|
+
unorderedListEntryIds,
|
|
15869
15845
|
virtualInstanceRowsForValue: () => [],
|
|
15870
15846
|
rowForValueReference: (value) => evaluatorIndexes2.rowByValueReference.get(value) ?? null,
|
|
15871
15847
|
evaluatorIndexes: evaluatorIndexes2,
|
|
@@ -17032,33 +17008,41 @@ function finalizeConstructorAllocations(ctx, returnValue, ownsInvocationState, r
|
|
|
17032
17008
|
const listenerEdges = /* @__PURE__ */ new Map();
|
|
17033
17009
|
for (const write of state.writes) {
|
|
17034
17010
|
if (!retainListenerReceivers || write.kind !== "changeListener") continue;
|
|
17011
|
+
const slotKey = JSON.stringify([write.ownerId, write.memberId]);
|
|
17012
|
+
if (write.operation === "clear") {
|
|
17013
|
+
listenerEdges.delete(slotKey);
|
|
17014
|
+
continue;
|
|
17015
|
+
}
|
|
17035
17016
|
const key = JSON.stringify([
|
|
17036
|
-
write.ownerId,
|
|
17037
|
-
write.memberId,
|
|
17038
17017
|
write.listener.memberId,
|
|
17039
17018
|
write.listener.valueId
|
|
17040
17019
|
]);
|
|
17041
|
-
|
|
17042
|
-
|
|
17020
|
+
let edges = listenerEdges.get(slotKey);
|
|
17021
|
+
if (write.operation === "remove") edges?.delete(key);
|
|
17022
|
+
else {
|
|
17023
|
+
if (edges === void 0) listenerEdges.set(slotKey, edges = /* @__PURE__ */ new Map());
|
|
17024
|
+
edges.set(key, write);
|
|
17025
|
+
}
|
|
17043
17026
|
}
|
|
17044
17027
|
const externalListenerReceivers = /* @__PURE__ */ new Set();
|
|
17045
|
-
for (const
|
|
17046
|
-
|
|
17047
|
-
|
|
17048
|
-
|
|
17049
|
-
|
|
17050
|
-
|
|
17051
|
-
if (
|
|
17052
|
-
|
|
17053
|
-
|
|
17054
|
-
|
|
17055
|
-
|
|
17056
|
-
dependencies
|
|
17057
|
-
|
|
17028
|
+
for (const edges of listenerEdges.values())
|
|
17029
|
+
for (const write of edges.values()) {
|
|
17030
|
+
if (write.listener.valueId === null) continue;
|
|
17031
|
+
const receiverGroup = groupByRowId.get(write.listener.valueId);
|
|
17032
|
+
if (receiverGroup === void 0) continue;
|
|
17033
|
+
const ownerGroup = groupByRowId.get(write.ownerId);
|
|
17034
|
+
if (ownerGroup === void 0) {
|
|
17035
|
+
if (rowForCleanup(write.ownerId) !== null)
|
|
17036
|
+
externalListenerReceivers.add(receiverGroup);
|
|
17037
|
+
} else {
|
|
17038
|
+
let dependencies = state.constructorGroupDependencies.get(ownerGroup);
|
|
17039
|
+
if (dependencies === void 0) {
|
|
17040
|
+
dependencies = /* @__PURE__ */ new Set();
|
|
17041
|
+
state.constructorGroupDependencies.set(ownerGroup, dependencies);
|
|
17042
|
+
}
|
|
17043
|
+
dependencies.add(receiverGroup);
|
|
17058
17044
|
}
|
|
17059
|
-
dependencies.add(receiverGroup);
|
|
17060
17045
|
}
|
|
17061
|
-
}
|
|
17062
17046
|
const markConstructorGroupEscaped = (rootId) => {
|
|
17063
17047
|
if (escapedRoots.has(rootId)) return;
|
|
17064
17048
|
escapedRoots.add(rootId);
|
|
@@ -17255,7 +17239,7 @@ function finalizeConstructorAllocations(ctx, returnValue, ownsInvocationState, r
|
|
|
17255
17239
|
const survivingWrites = state.writes.filter((write) => {
|
|
17256
17240
|
if (write.kind === "changeListener") {
|
|
17257
17241
|
if (collectedIds.has(write.ownerId)) return false;
|
|
17258
|
-
return write.listener.valueId === null || !collectedIds.has(write.listener.valueId);
|
|
17242
|
+
return write.operation === "clear" || write.listener.valueId === null || !collectedIds.has(write.listener.valueId);
|
|
17259
17243
|
}
|
|
17260
17244
|
const destination = write.resolvedDestination;
|
|
17261
17245
|
const destinationId = destination !== void 0 && "containerValueId" in destination ? destination.containerValueId : void 0;
|
|
@@ -18009,7 +17993,8 @@ function evalInstructions(instructions, scope, ctx, options) {
|
|
|
18009
17993
|
break;
|
|
18010
17994
|
}
|
|
18011
17995
|
case "addChangeListener" /* addChangeListener */:
|
|
18012
|
-
case "removeChangeListener" /* removeChangeListener */:
|
|
17996
|
+
case "removeChangeListener" /* removeChangeListener */:
|
|
17997
|
+
case "clearChangeListeners" /* clearChangeListeners */: {
|
|
18013
17998
|
evalChangeListenerInstruction(ins, scope, ctx, options);
|
|
18014
17999
|
break;
|
|
18015
18000
|
}
|
|
@@ -18430,6 +18415,18 @@ function evalChangeListenerInstruction(ins, scope, ctx, options) {
|
|
|
18430
18415
|
throw new NSGetterRuntimeError(
|
|
18431
18416
|
`OnChanged member '${ins.target.memberId}' is not an observable member or getter of owner '${owner.id}'.`
|
|
18432
18417
|
);
|
|
18418
|
+
if (ins.type === "clearChangeListeners" /* clearChangeListeners */) {
|
|
18419
|
+
if (getter !== null) clearGetterSubscription(getter, ctx);
|
|
18420
|
+
else
|
|
18421
|
+
options.writes.push({
|
|
18422
|
+
kind: "changeListener",
|
|
18423
|
+
target: ins.target,
|
|
18424
|
+
ownerId: owner.id,
|
|
18425
|
+
memberId: slot.memberId,
|
|
18426
|
+
operation: "clear"
|
|
18427
|
+
});
|
|
18428
|
+
return;
|
|
18429
|
+
}
|
|
18433
18430
|
const listener = evalPointer(ins.listener, scope, ctx);
|
|
18434
18431
|
if (!isMemberDelegateTarget(listener))
|
|
18435
18432
|
throw new NSGetterRuntimeError(
|
|
@@ -18486,6 +18483,17 @@ function editGetterSubscription(slot, target, add, ctx) {
|
|
|
18486
18483
|
}
|
|
18487
18484
|
subscription.targets.push(target);
|
|
18488
18485
|
}
|
|
18486
|
+
function clearGetterSubscription(slot, ctx) {
|
|
18487
|
+
if ((ctx.__executionState?.constructionStack.length ?? 0) > 0)
|
|
18488
|
+
throw new NSGetterRuntimeError(
|
|
18489
|
+
"A getter subscription lives only for the play session, so a constructor can't clear one. Clear from a function."
|
|
18490
|
+
);
|
|
18491
|
+
const subscriptions = ctx.__getterSubscriptions;
|
|
18492
|
+
const subscription = subscriptions?.get(slot.owner.id, slot.memberId);
|
|
18493
|
+
if (subscriptions === void 0 || subscription === void 0) return;
|
|
18494
|
+
subscription.targets.length = 0;
|
|
18495
|
+
subscriptions.drop(subscription);
|
|
18496
|
+
}
|
|
18489
18497
|
function dispatchGetterSubscriptions(ctx) {
|
|
18490
18498
|
const subscriptions = ctx.__getterSubscriptions;
|
|
18491
18499
|
if (subscriptions === void 0) return;
|
|
@@ -26802,7 +26810,7 @@ function cloneClassValueGraph(receiver, expectedClassId, ctx) {
|
|
|
26802
26810
|
const edit = editChangeListenerSet(
|
|
26803
26811
|
entry?.[write.memberId],
|
|
26804
26812
|
[],
|
|
26805
|
-
|
|
26813
|
+
changeListenerWriteEdit(write),
|
|
26806
26814
|
{ inheritedComplete: false }
|
|
26807
26815
|
);
|
|
26808
26816
|
if (!edit.changed) continue;
|
|
@@ -27030,14 +27038,14 @@ function collectionEntryUsesReferenceResolution(collection, key, ctx) {
|
|
|
27030
27038
|
return referenceIndexes === void 0 || referenceIndexes.has(key);
|
|
27031
27039
|
}
|
|
27032
27040
|
|
|
27033
|
-
// ../
|
|
27041
|
+
// ../packages/neoscript-runtime/src/declaration-default-source.ts
|
|
27034
27042
|
function declarationDefaultSource(id, stored, resolveGraph) {
|
|
27035
27043
|
if (stored !== null && !isCollapseStampedInstanceRoot(stored)) return stored;
|
|
27036
27044
|
const graph = resolveGraph(id);
|
|
27037
27045
|
return defaultSourceWithListeners(graph?.rowsById.get(id) ?? stored, graph);
|
|
27038
27046
|
}
|
|
27039
27047
|
|
|
27040
|
-
// ../
|
|
27048
|
+
// ../packages/models/src/classes/constructor-parameter-settlement.ts
|
|
27041
27049
|
function createConstructorSettlementResolver(view) {
|
|
27042
27050
|
const classesById = new Map(
|
|
27043
27051
|
view.classes.map((schemaClass2) => [schemaClass2.id, schemaClass2])
|
|
@@ -27163,7 +27171,7 @@ function asRecord(value) {
|
|
|
27163
27171
|
return value;
|
|
27164
27172
|
}
|
|
27165
27173
|
|
|
27166
|
-
// ../
|
|
27174
|
+
// ../packages/models/src/members/stored-value-placement-index.ts
|
|
27167
27175
|
function buildStoredValuePlacementIndex(args) {
|
|
27168
27176
|
return createStoredValuePlacementTraversal(args)();
|
|
27169
27177
|
}
|
|
@@ -27385,7 +27393,7 @@ function isStringRecord2(value) {
|
|
|
27385
27393
|
return Object.values(value).every((item) => typeof item === "string");
|
|
27386
27394
|
}
|
|
27387
27395
|
|
|
27388
|
-
// ../
|
|
27396
|
+
// ../packages/neoscript-runtime/src/listener-endpoint-projection.ts
|
|
27389
27397
|
function projectListenerEndpoint(args) {
|
|
27390
27398
|
const { descriptor } = args;
|
|
27391
27399
|
if (!descriptor.pathKey.startsWith("$/")) return void 0;
|
|
@@ -27412,7 +27420,7 @@ function projectListenerEndpoint(args) {
|
|
|
27412
27420
|
return claim(descriptor.pathKey) === args.id ? node : void 0;
|
|
27413
27421
|
}
|
|
27414
27422
|
|
|
27415
|
-
// ../
|
|
27423
|
+
// ../packages/models/src/members/lookup-declared-type.ts
|
|
27416
27424
|
function lookupDeclaredTypeInfo(member, collectionTypeInfo) {
|
|
27417
27425
|
if (collectionTypeInfo === null) return null;
|
|
27418
27426
|
if (collectionTypeInfo.type !== 6 /* List */ && collectionTypeInfo.type !== 5 /* Dictionary */) {
|
|
@@ -27434,7 +27442,7 @@ function lookupDeclaredTypeInfo(member, collectionTypeInfo) {
|
|
|
27434
27442
|
};
|
|
27435
27443
|
}
|
|
27436
27444
|
|
|
27437
|
-
// ../src/
|
|
27445
|
+
// ../packages/neoscript-runtime/src/values/member-declared-type-info.ts
|
|
27438
27446
|
function resolveMemberDeclaredTypeInfo(member, members) {
|
|
27439
27447
|
return resolveMemberDeclaredTypeInfoInternal(member, members, /* @__PURE__ */ new Set());
|
|
27440
27448
|
}
|
|
@@ -27551,7 +27559,7 @@ function resolveMemberDeclaredTypeInfoInternal(member, members, seen) {
|
|
|
27551
27559
|
};
|
|
27552
27560
|
}
|
|
27553
27561
|
|
|
27554
|
-
// ../src/
|
|
27562
|
+
// ../packages/neoscript-runtime/src/values/constructor-argument-ownership.ts
|
|
27555
27563
|
var MaterializedValueGraphContext = class {
|
|
27556
27564
|
/**
|
|
27557
27565
|
* P79 §7a. Generic in the caller's document view so a pass typed against a
|
|
@@ -30121,7 +30129,7 @@ function describeToken(t) {
|
|
|
30121
30129
|
return `'${t.text}'`;
|
|
30122
30130
|
}
|
|
30123
30131
|
|
|
30124
|
-
// ../src/
|
|
30132
|
+
// ../packages/neoscript-runtime/src/values/initializer-identifiers.ts
|
|
30125
30133
|
function initializerReferencedIdentifiers(source) {
|
|
30126
30134
|
let expression;
|
|
30127
30135
|
try {
|
|
@@ -30154,7 +30162,7 @@ function initializerReferencesAnyIdentifier(source, names) {
|
|
|
30154
30162
|
return false;
|
|
30155
30163
|
}
|
|
30156
30164
|
|
|
30157
|
-
// ../
|
|
30165
|
+
// ../packages/neoscript-runtime/src/initializer-materialization.ts
|
|
30158
30166
|
var declarationInitializerContextByDocument = /* @__PURE__ */ new WeakMap();
|
|
30159
30167
|
function declarationInitializerContext(document2) {
|
|
30160
30168
|
const key = initializerEvaluatorCacheKey(document2);
|
|
@@ -30385,7 +30393,7 @@ function materializeMemberDefaultValue(args) {
|
|
|
30385
30393
|
return { root, createdValues: interior, pinnedRootSchemaKeys: /* @__PURE__ */ new Set() };
|
|
30386
30394
|
}
|
|
30387
30395
|
|
|
30388
|
-
// ../
|
|
30396
|
+
// ../packages/neoscript-runtime/src/virtual-instance-graph.ts
|
|
30389
30397
|
function buildVirtualInstanceMaterializedIndex(args) {
|
|
30390
30398
|
const rowsById = new Map(
|
|
30391
30399
|
(args.materializedRows ?? args.document.values).map((row) => [row.id, row])
|
|
@@ -32322,7 +32330,7 @@ function assertStoredConstructionStamp(root, classId = root.classId) {
|
|
|
32322
32330
|
}
|
|
32323
32331
|
}
|
|
32324
32332
|
|
|
32325
|
-
// ../
|
|
32333
|
+
// ../packages/neoscript-runtime/src/neoscript/evaluateInitializer.ts
|
|
32326
32334
|
var evaluatorLookupsByDocument = /* @__PURE__ */ new WeakMap();
|
|
32327
32335
|
var headlessResolversByLookupKey = /* @__PURE__ */ new WeakMap();
|
|
32328
32336
|
function sharedHeadlessResolver(overlay) {
|
|
@@ -32720,7 +32728,7 @@ function evaluateMemberInitializer(args) {
|
|
|
32720
32728
|
};
|
|
32721
32729
|
}
|
|
32722
32730
|
|
|
32723
|
-
// ../
|
|
32731
|
+
// ../packages/neoscript-runtime/src/virtual-instance-values.ts
|
|
32724
32732
|
function resolveVariantInstanceGraphForDocument2(args) {
|
|
32725
32733
|
return resolveVariantInstanceGraphForDocument({
|
|
32726
32734
|
...args,
|
|
@@ -32822,7 +32830,7 @@ function isObjectRecord(value) {
|
|
|
32822
32830
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
32823
32831
|
}
|
|
32824
32832
|
|
|
32825
|
-
// ../src/
|
|
32833
|
+
// ../packages/neoscript-runtime/src/values/canonical-json.ts
|
|
32826
32834
|
function canonicalJsonStringify(value) {
|
|
32827
32835
|
return JSON.stringify(toCanonicalJsonValue(value));
|
|
32828
32836
|
}
|
|
@@ -34329,6 +34337,7 @@ var WRITE_TARGET_DESCRIPTIONS = {
|
|
|
34329
34337
|
projectValue: "a stored project value",
|
|
34330
34338
|
unknown: "something other than `this` or a local"
|
|
34331
34339
|
};
|
|
34340
|
+
var ON_CHANGED_OPERATIONS_ERROR = "OnChanged supports only '+=', '-=', and Clear().";
|
|
34332
34341
|
var FALLTHROUGH_LABELS = {
|
|
34333
34342
|
function: "NSFunction",
|
|
34334
34343
|
getter: "getter",
|
|
@@ -35671,6 +35680,12 @@ var StrictNeoScriptResolver = class _StrictNeoScriptResolver {
|
|
|
35671
35680
|
this.resolveExpression(statement.expr, scope);
|
|
35672
35681
|
const debug = this.resolveDebugStatement(statement.expr, scope);
|
|
35673
35682
|
if (debug) return debug;
|
|
35683
|
+
const listenerClear = this.resolveChangeListenerClear(
|
|
35684
|
+
statement.expr,
|
|
35685
|
+
scope,
|
|
35686
|
+
statement.pos
|
|
35687
|
+
);
|
|
35688
|
+
if (listenerClear) return listenerClear;
|
|
35674
35689
|
const actionClear = this.resolveActionClear(
|
|
35675
35690
|
statement.expr,
|
|
35676
35691
|
scope,
|
|
@@ -36031,8 +36046,20 @@ var StrictNeoScriptResolver = class _StrictNeoScriptResolver {
|
|
|
36031
36046
|
const observed = this.resolveExpression(statement.target.receiver, scope);
|
|
36032
36047
|
const observedType = neoScriptMemberLookupType(observed.type);
|
|
36033
36048
|
const declared = observedType.kind === "named" && this.project.typeById.get(observedType.typeId)?.members.some((member) => member.name === "OnChanged");
|
|
36034
|
-
if (!declared)
|
|
36035
|
-
|
|
36049
|
+
if (!declared) {
|
|
36050
|
+
if (statement.op !== "+=" && statement.op !== "-=")
|
|
36051
|
+
throw new CompileError(ON_CHANGED_OPERATIONS_ERROR, statement.pos);
|
|
36052
|
+
return this.resolveChangeListener(
|
|
36053
|
+
statement.target,
|
|
36054
|
+
observed,
|
|
36055
|
+
scope,
|
|
36056
|
+
statement.pos,
|
|
36057
|
+
{
|
|
36058
|
+
kind: statement.op === "+=" ? "addChangeListener" /* AddChangeListener */ : "removeChangeListener" /* RemoveChangeListener */,
|
|
36059
|
+
handler: statement.value
|
|
36060
|
+
}
|
|
36061
|
+
);
|
|
36062
|
+
}
|
|
36036
36063
|
}
|
|
36037
36064
|
const local = statement.target.kind === "ident" ? scope.lookup(statement.target.name) : null;
|
|
36038
36065
|
if (local?.readonlyBinding) {
|
|
@@ -36216,158 +36243,142 @@ var StrictNeoScriptResolver = class _StrictNeoScriptResolver {
|
|
|
36216
36243
|
pos
|
|
36217
36244
|
);
|
|
36218
36245
|
}
|
|
36219
|
-
|
|
36220
|
-
|
|
36221
|
-
|
|
36222
|
-
|
|
36223
|
-
|
|
36224
|
-
|
|
36225
|
-
|
|
36226
|
-
if (
|
|
36246
|
+
/** `X.M.OnChanged.Clear()` empties M's listener set on X (P70, P106). */
|
|
36247
|
+
resolveChangeListenerClear(expression, scope, pos) {
|
|
36248
|
+
if (expression.kind !== "call" || expression.callee.kind !== "member" || expression.callee.name !== "Clear" || expression.callee.receiver.kind !== "member" || expression.callee.receiver.name !== "OnChanged")
|
|
36249
|
+
return null;
|
|
36250
|
+
const onChanged = expression.callee.receiver;
|
|
36251
|
+
const observed = this.resolveExpression(onChanged.receiver, scope);
|
|
36252
|
+
const observedType = neoScriptMemberLookupType(observed.type);
|
|
36253
|
+
if (observedType.kind === "named" && this.project.typeById.get(observedType.typeId)?.members.some((member) => member.name === "OnChanged"))
|
|
36254
|
+
return null;
|
|
36255
|
+
if (expression.callee.optional)
|
|
36227
36256
|
throw new CompileError(
|
|
36228
|
-
"OnChanged
|
|
36229
|
-
|
|
36257
|
+
"OnChanged is never null, so optional-chained Clear is not supported.",
|
|
36258
|
+
pos
|
|
36230
36259
|
);
|
|
36231
|
-
|
|
36232
|
-
|
|
36260
|
+
requireArgCount("Clear", expression.args, 0, pos);
|
|
36261
|
+
return this.resolveChangeListener(onChanged, observed, scope, pos, {
|
|
36262
|
+
kind: "clearChangeListeners" /* ClearChangeListeners */
|
|
36263
|
+
});
|
|
36264
|
+
}
|
|
36265
|
+
resolveChangeListener(onChanged, observed, scope, pos, edit) {
|
|
36266
|
+
if (onChanged.optional) {
|
|
36233
36267
|
throw new CompileError(
|
|
36234
36268
|
"OnChanged cannot use an optional subscription target.",
|
|
36235
|
-
|
|
36269
|
+
pos
|
|
36236
36270
|
);
|
|
36237
36271
|
}
|
|
36238
36272
|
if (observed.optionalChainType !== void 0) {
|
|
36239
36273
|
throw new CompileError(
|
|
36240
36274
|
"OnChanged cannot subscribe through optional chaining; narrow the receiver first.",
|
|
36241
|
-
|
|
36275
|
+
pos
|
|
36242
36276
|
);
|
|
36243
36277
|
}
|
|
36244
36278
|
const member = observed.symbol;
|
|
36245
36279
|
if (!member)
|
|
36246
36280
|
throw new CompileError(
|
|
36247
36281
|
"OnChanged requires a declared member, not a local variable.",
|
|
36248
|
-
|
|
36282
|
+
pos
|
|
36249
36283
|
);
|
|
36250
36284
|
if (observed.pointer.type === "staticMember" /* StaticMember */ || observed.pointer.type === "callGetter" /* CallGetter */ && observed.pointer.receiver.kind === "static") {
|
|
36251
|
-
const access =
|
|
36285
|
+
const access = onChanged.receiver;
|
|
36252
36286
|
const name = access.kind === "member" && access.receiver.kind === "ident" ? `${access.receiver.name}.${member.name}` : member.name;
|
|
36253
36287
|
throw new CompileError(
|
|
36254
36288
|
`OnChanged requires an instance member. '${name}' is static.`,
|
|
36255
|
-
|
|
36289
|
+
pos
|
|
36256
36290
|
);
|
|
36257
36291
|
}
|
|
36258
36292
|
if (observed.pointer.type === "callGetter" /* CallGetter */)
|
|
36259
|
-
return this.
|
|
36260
|
-
|
|
36261
|
-
statement.target.receiver,
|
|
36293
|
+
return this.resolveGetterChangeListener(
|
|
36294
|
+
onChanged.receiver,
|
|
36262
36295
|
observed,
|
|
36263
36296
|
observed.pointer,
|
|
36264
36297
|
member,
|
|
36265
|
-
scope
|
|
36298
|
+
scope,
|
|
36299
|
+
pos,
|
|
36300
|
+
edit
|
|
36266
36301
|
);
|
|
36267
36302
|
if (observed.pointer.type !== "keyOf" /* KeyOf */)
|
|
36268
|
-
throw new CompileError(
|
|
36269
|
-
"OnChanged requires a declared member slot.",
|
|
36270
|
-
statement.pos
|
|
36271
|
-
);
|
|
36303
|
+
throw new CompileError("OnChanged requires a declared member slot.", pos);
|
|
36272
36304
|
if (!observed.pointer.memberId)
|
|
36273
36305
|
throw new CompileError(
|
|
36274
36306
|
"OnChanged cannot observe a collection entry.",
|
|
36275
|
-
|
|
36307
|
+
pos
|
|
36276
36308
|
);
|
|
36277
36309
|
if (member.computed) {
|
|
36278
36310
|
throw new CompileError(
|
|
36279
36311
|
"OnChanged cannot observe a computed member.",
|
|
36280
|
-
|
|
36312
|
+
pos
|
|
36281
36313
|
);
|
|
36282
36314
|
}
|
|
36283
36315
|
if (member.readonlyDeclaration) {
|
|
36284
36316
|
throw new CompileError(
|
|
36285
36317
|
"OnChanged cannot observe a readonly declaration.",
|
|
36286
|
-
|
|
36318
|
+
pos
|
|
36287
36319
|
);
|
|
36288
36320
|
}
|
|
36289
36321
|
if (observed.type.kind === "delegate" || observed.type.kind === "action") {
|
|
36290
36322
|
throw new CompileError(
|
|
36291
36323
|
"OnChanged cannot observe a callable member.",
|
|
36292
|
-
|
|
36324
|
+
pos
|
|
36293
36325
|
);
|
|
36294
36326
|
}
|
|
36295
36327
|
const writability = observed.userData ? "runtime" /* Runtime */ : observed.writability;
|
|
36296
36328
|
if (writability !== "save" /* Save */ && writability !== "session" /* Session */ && writability !== "runtime" /* Runtime */ && writability !== "local" /* Local */) {
|
|
36297
36329
|
throw new CompileError(
|
|
36298
36330
|
"OnChanged requires a member whose storage is writable at gameplay runtime.",
|
|
36299
|
-
|
|
36331
|
+
pos
|
|
36300
36332
|
);
|
|
36301
36333
|
}
|
|
36302
36334
|
this.validateConstructorWriteTarget(
|
|
36303
36335
|
observed.pointer,
|
|
36304
|
-
"subscribe to",
|
|
36305
|
-
|
|
36336
|
+
edit.kind === "clearChangeListeners" /* ClearChangeListeners */ ? "clear listeners on" : "subscribe to",
|
|
36337
|
+
pos,
|
|
36306
36338
|
scope,
|
|
36307
36339
|
false
|
|
36308
36340
|
);
|
|
36309
|
-
if (!statement.value) {
|
|
36310
|
-
throw new CompileError(
|
|
36311
|
-
"OnChanged subscription requires a handler member.",
|
|
36312
|
-
statement.pos
|
|
36313
|
-
);
|
|
36314
|
-
}
|
|
36315
36341
|
const storageType = this.assignmentStorageType(
|
|
36316
|
-
|
|
36342
|
+
onChanged.receiver,
|
|
36317
36343
|
observed,
|
|
36318
36344
|
null,
|
|
36319
36345
|
scope
|
|
36320
36346
|
);
|
|
36321
|
-
|
|
36322
|
-
|
|
36323
|
-
|
|
36324
|
-
};
|
|
36325
|
-
const listener = this.resolveActionListener(
|
|
36326
|
-
statement.value,
|
|
36327
|
-
expected,
|
|
36328
|
-
scope,
|
|
36329
|
-
true,
|
|
36330
|
-
true
|
|
36331
|
-
);
|
|
36332
|
-
return {
|
|
36333
|
-
type: statement.op === "+=" ? "addChangeListener" /* AddChangeListener */ : "removeChangeListener" /* RemoveChangeListener */,
|
|
36334
|
-
target: {
|
|
36347
|
+
return this.changeListenerInstruction(
|
|
36348
|
+
edit,
|
|
36349
|
+
{
|
|
36335
36350
|
owner: observed.pointer.keyOf.pointer,
|
|
36336
36351
|
memberId: member.canonicalMemberId ?? observed.pointer.memberId,
|
|
36337
36352
|
typeInfo: toWireType(storageType, this.project),
|
|
36338
36353
|
writability
|
|
36339
36354
|
},
|
|
36340
|
-
|
|
36341
|
-
|
|
36355
|
+
storageType,
|
|
36356
|
+
scope,
|
|
36357
|
+
pos
|
|
36358
|
+
);
|
|
36342
36359
|
}
|
|
36343
36360
|
/**
|
|
36344
36361
|
* P106. A getter subscription lives only in the running client's memory:
|
|
36345
36362
|
* nothing persists it, so construction replay would silently drop one.
|
|
36346
36363
|
*/
|
|
36347
|
-
|
|
36364
|
+
resolveGetterChangeListener(getterRead, observed, pointer, member, scope, pos, edit) {
|
|
36348
36365
|
if (pointer.dispatch === "base") {
|
|
36349
36366
|
throw new CompileError(
|
|
36350
36367
|
`OnChanged can't observe a base getter. Subscribe to '${member.name}' on the instance.`,
|
|
36351
|
-
|
|
36368
|
+
pos
|
|
36352
36369
|
);
|
|
36353
36370
|
}
|
|
36354
36371
|
if (pointer.receiver.kind !== "instance") {
|
|
36355
36372
|
throw new CompileError(
|
|
36356
36373
|
`OnChanged requires an instance receiver for getter '${member.name}'.`,
|
|
36357
|
-
|
|
36374
|
+
pos
|
|
36358
36375
|
);
|
|
36359
36376
|
}
|
|
36360
36377
|
const kind = this.context.kind;
|
|
36361
36378
|
if (isNeoScriptConstructionDocumentKind(kind) || kind === "migration") {
|
|
36362
36379
|
throw new CompileError(
|
|
36363
|
-
`A getter subscription lives only for the play session, so ${dialogueBodyKindLabel(kind)} can't make one. Subscribe from a function.`,
|
|
36364
|
-
|
|
36365
|
-
);
|
|
36366
|
-
}
|
|
36367
|
-
if (!statement.value) {
|
|
36368
|
-
throw new CompileError(
|
|
36369
|
-
"OnChanged subscription requires a handler member.",
|
|
36370
|
-
statement.pos
|
|
36380
|
+
edit.kind === "clearChangeListeners" /* ClearChangeListeners */ ? `A getter subscription lives only for the play session, so ${dialogueBodyKindLabel(kind)} can't clear one. Clear from a function.` : `A getter subscription lives only for the play session, so ${dialogueBodyKindLabel(kind)} can't make one. Subscribe from a function.`,
|
|
36381
|
+
pos
|
|
36371
36382
|
);
|
|
36372
36383
|
}
|
|
36373
36384
|
const getterType = this.assignmentStorageType(
|
|
@@ -36376,23 +36387,36 @@ var StrictNeoScriptResolver = class _StrictNeoScriptResolver {
|
|
|
36376
36387
|
null,
|
|
36377
36388
|
scope
|
|
36378
36389
|
);
|
|
36379
|
-
|
|
36380
|
-
|
|
36381
|
-
{
|
|
36382
|
-
scope,
|
|
36383
|
-
true,
|
|
36384
|
-
true
|
|
36385
|
-
);
|
|
36386
|
-
return {
|
|
36387
|
-
type: statement.op === "+=" ? "addChangeListener" /* AddChangeListener */ : "removeChangeListener" /* RemoveChangeListener */,
|
|
36388
|
-
target: {
|
|
36390
|
+
return this.changeListenerInstruction(
|
|
36391
|
+
edit,
|
|
36392
|
+
{
|
|
36389
36393
|
owner: pointer.receiver.pointer,
|
|
36390
36394
|
memberId: member.canonicalMemberId ?? pointer.memberId,
|
|
36391
36395
|
typeInfo: toWireType(getterType, this.project),
|
|
36392
36396
|
writability: "session" /* Session */
|
|
36393
36397
|
},
|
|
36394
|
-
|
|
36395
|
-
|
|
36398
|
+
getterType,
|
|
36399
|
+
scope,
|
|
36400
|
+
pos
|
|
36401
|
+
);
|
|
36402
|
+
}
|
|
36403
|
+
changeListenerInstruction(edit, target, observedType, scope, pos) {
|
|
36404
|
+
if (edit.kind === "clearChangeListeners" /* ClearChangeListeners */)
|
|
36405
|
+
return { type: edit.kind, target };
|
|
36406
|
+
if (!edit.handler) {
|
|
36407
|
+
throw new CompileError(
|
|
36408
|
+
"OnChanged subscription requires a handler member.",
|
|
36409
|
+
pos
|
|
36410
|
+
);
|
|
36411
|
+
}
|
|
36412
|
+
const listener = this.resolveActionListener(
|
|
36413
|
+
edit.handler,
|
|
36414
|
+
{ kind: "action", parameterTypes: [observedType] },
|
|
36415
|
+
scope,
|
|
36416
|
+
true,
|
|
36417
|
+
true
|
|
36418
|
+
);
|
|
36419
|
+
return { type: edit.kind, target, listener };
|
|
36396
36420
|
}
|
|
36397
36421
|
/**
|
|
36398
36422
|
* P62 §3.2. `+=` / `-=` on an NSAction member are subscription operators,
|
|
@@ -38510,6 +38534,8 @@ var StrictNeoScriptResolver = class _StrictNeoScriptResolver {
|
|
|
38510
38534
|
entryUserData
|
|
38511
38535
|
};
|
|
38512
38536
|
}
|
|
38537
|
+
if (name === "OnChanged")
|
|
38538
|
+
throw new CompileError(ON_CHANGED_OPERATIONS_ERROR, pos);
|
|
38513
38539
|
throw new CompileError(
|
|
38514
38540
|
`Cannot read member '${name}' on ${this.describe(receiver.type)}`,
|
|
38515
38541
|
pos
|
|
@@ -44252,6 +44278,20 @@ function compileErrorDiagnostic(source, error) {
|
|
|
44252
44278
|
};
|
|
44253
44279
|
}
|
|
44254
44280
|
|
|
44281
|
+
// ../packages/neoscript-language/src/docs-text.ts
|
|
44282
|
+
var DOCS_TEXT_MAX_UTF8_BYTES2 = 16384;
|
|
44283
|
+
function docsTextUtf8ByteLength(value) {
|
|
44284
|
+
return new TextEncoder().encode(value).byteLength;
|
|
44285
|
+
}
|
|
44286
|
+
function assertDocsTextWithinLimit(value, label = "Documentation") {
|
|
44287
|
+
const byteLength = docsTextUtf8ByteLength(value);
|
|
44288
|
+
if (byteLength > DOCS_TEXT_MAX_UTF8_BYTES2) {
|
|
44289
|
+
throw new Error(
|
|
44290
|
+
`${label} is ${byteLength} UTF-8 bytes; the limit is ${DOCS_TEXT_MAX_UTF8_BYTES2} bytes.`
|
|
44291
|
+
);
|
|
44292
|
+
}
|
|
44293
|
+
}
|
|
44294
|
+
|
|
44255
44295
|
// ../packages/neoscript-language/src/project-schema-manifest.ts
|
|
44256
44296
|
var nextManifestProjectionVersion = 1;
|
|
44257
44297
|
function projectSchemaManifest(input, options = {}) {
|
|
@@ -45906,7 +45946,7 @@ function defaultSourceUri(path) {
|
|
|
45906
45946
|
return `neo-source:///${path.split("/").map((part) => encodeURIComponent(part)).join("/")}`;
|
|
45907
45947
|
}
|
|
45908
45948
|
|
|
45909
|
-
// ../
|
|
45949
|
+
// ../packages/models/src/interfaces/interface-types.ts
|
|
45910
45950
|
function isInterfaceFunctionMember(member) {
|
|
45911
45951
|
return member.kind === 1 /* Function */;
|
|
45912
45952
|
}
|
|
@@ -46016,7 +46056,7 @@ function getInterfaceMemberKeyOrder(neoInterface) {
|
|
|
46016
46056
|
return result;
|
|
46017
46057
|
}
|
|
46018
46058
|
|
|
46019
|
-
// ../
|
|
46059
|
+
// ../packages/models/src/variants/variant-member.ts
|
|
46020
46060
|
function neoVariantSystemClass(classes, lookup = false) {
|
|
46021
46061
|
const declared = classes.find(
|
|
46022
46062
|
(item) => item.system?.worldKind === (lookup ? NeoWorldSystemClassKind.LookupVariant : NeoWorldSystemClassKind.Variant)
|
|
@@ -46156,12 +46196,12 @@ function pascalIdentifier(value) {
|
|
|
46156
46196
|
return identifier;
|
|
46157
46197
|
}
|
|
46158
46198
|
|
|
46159
|
-
// ../
|
|
46199
|
+
// ../packages/models/src/dialogue/dialogue-source-identifiers.ts
|
|
46160
46200
|
function isDialogueSourceIdentifier(value) {
|
|
46161
46201
|
return isValidProjectSourceIdentifier(value);
|
|
46162
46202
|
}
|
|
46163
46203
|
|
|
46164
|
-
// ../
|
|
46204
|
+
// ../packages/models/src/dialogue/logic-types.ts
|
|
46165
46205
|
function isNSBoolGetter(value) {
|
|
46166
46206
|
if (!isNSGetter(value)) return false;
|
|
46167
46207
|
if (value.typeInfo.type !== 1 /* Bool */) return false;
|
|
@@ -46231,7 +46271,7 @@ function isUIRenderableAction(action) {
|
|
|
46231
46271
|
return instruction.type === "return" /* return */ || instruction.type === "assign" /* assign */ || instruction.type === "collectionCall" /* collectionCall */ || instruction.type === "functionCall" /* functionCall */;
|
|
46232
46272
|
}
|
|
46233
46273
|
|
|
46234
|
-
// ../
|
|
46274
|
+
// ../packages/models/src/dialogue/dialogue-group-types.ts
|
|
46235
46275
|
function isOptionalNullableString2(value) {
|
|
46236
46276
|
if (value === void 0) return true;
|
|
46237
46277
|
if (value === null) return true;
|
|
@@ -46279,7 +46319,7 @@ function isAnyDialogueGroup(value) {
|
|
|
46279
46319
|
return isStandardDialogueGroupBase(value) || isLookupDialogueGroupBase(value) || isFolderDialogueGroupBase(value);
|
|
46280
46320
|
}
|
|
46281
46321
|
|
|
46282
|
-
// ../
|
|
46322
|
+
// ../packages/models/src/dialogue/dialogue-group-language.ts
|
|
46283
46323
|
var KINDS = {
|
|
46284
46324
|
[0 /* Standard */]: "standard",
|
|
46285
46325
|
[1 /* Lookup */]: "lookup",
|
|
@@ -48642,7 +48682,7 @@ async function restartProjectRead(read) {
|
|
|
48642
48682
|
}
|
|
48643
48683
|
}
|
|
48644
48684
|
|
|
48645
|
-
// ../
|
|
48685
|
+
// ../packages/models/src/project/project-types.ts
|
|
48646
48686
|
function isProject(value) {
|
|
48647
48687
|
const v = value;
|
|
48648
48688
|
return typeof v?.name === "string" && typeof v?.id === "string" && isProjectOwner(v.owner) && isActorIdentifier(v.author) && typeof v?.createdAt === "number" && typeof v?.updatedAt === "number" && typeof v?.rootAssetsMemberId === "string" && typeof v?.rootSaveFileMemberId === "string" && typeof v?.rootSessionMemberId === "string" && typeof v?.rootUserMemberId === "string" && isOptionalNullableString3(v.defaultPriorityGroupId) && isOptionalNullableString3(v.defaultTextureTemplateId) && isOptionalNullableString3(v.defaultAudioClipTemplateId) && isProjectExportSettingsOrEmpty(v.exportSettings);
|
|
@@ -48671,7 +48711,7 @@ function isUnityExportSettingsOrEmpty(value) {
|
|
|
48671
48711
|
return (namespaceValue === void 0 || namespaceValue === null || typeof namespaceValue === "string") && (singletonValue === void 0 || singletonValue === null || typeof singletonValue === "boolean");
|
|
48672
48712
|
}
|
|
48673
48713
|
|
|
48674
|
-
// ../
|
|
48714
|
+
// ../packages/models/src/project/project-migration-types.ts
|
|
48675
48715
|
function isProjectMigration(value) {
|
|
48676
48716
|
if (typeof value !== "object" || value === null) return false;
|
|
48677
48717
|
const migration = value;
|
|
@@ -48690,7 +48730,7 @@ function isProjectMigration(value) {
|
|
|
48690
48730
|
return isNumber(migration.updatedAt);
|
|
48691
48731
|
}
|
|
48692
48732
|
|
|
48693
|
-
// ../
|
|
48733
|
+
// ../packages/models/src/variants/variants.ts
|
|
48694
48734
|
function isNonEmptyString2(value) {
|
|
48695
48735
|
if (typeof value !== "string") return false;
|
|
48696
48736
|
return value.length > 0;
|
|
@@ -48721,7 +48761,7 @@ function isNeoClassVariantFolder(value) {
|
|
|
48721
48761
|
return true;
|
|
48722
48762
|
}
|
|
48723
48763
|
|
|
48724
|
-
// ../
|
|
48764
|
+
// ../packages/models/src/dialogue/dialogue-types.ts
|
|
48725
48765
|
function isNonArrayObject(value) {
|
|
48726
48766
|
if (!isRequiredType(value, isObject)) return false;
|
|
48727
48767
|
return !Array.isArray(value);
|
|
@@ -49018,7 +49058,7 @@ function isDialogue(value) {
|
|
|
49018
49058
|
return isDialogueProps(value);
|
|
49019
49059
|
}
|
|
49020
49060
|
|
|
49021
|
-
// ../
|
|
49061
|
+
// ../packages/models/src/dialogue/priority-types.ts
|
|
49022
49062
|
var DEFAULT_PRIORITY_OPTION_IDS = {
|
|
49023
49063
|
Urgent: "system_b0ad247f-fadc-4910-b202-75b7f94f1dbe",
|
|
49024
49064
|
High: "system_0beff759-9bdd-4a4e-841b-c6ebe0bbebac",
|
|
@@ -49085,7 +49125,7 @@ function isPriorityGroup(value) {
|
|
|
49085
49125
|
return isPriorityGroupProps(value);
|
|
49086
49126
|
}
|
|
49087
49127
|
|
|
49088
|
-
// ../
|
|
49128
|
+
// ../packages/models/src/localization/localization-types.ts
|
|
49089
49129
|
var PROJECT_LOCALIZATION_CONFIG_ID = "system_b9f80fd7-7ed2-4344-a2b6-625ced732ed0";
|
|
49090
49130
|
var LOCALIZED_TEXT_LINK_KINDS = [
|
|
49091
49131
|
"member-value",
|
|
@@ -52984,20 +53024,6 @@ function parse2(schema, input, config$1) {
|
|
|
52984
53024
|
return dataset.value;
|
|
52985
53025
|
}
|
|
52986
53026
|
|
|
52987
|
-
// ../packages/neoscript-language/src/docs-text.ts
|
|
52988
|
-
var DOCS_TEXT_MAX_UTF8_BYTES2 = 16384;
|
|
52989
|
-
function docsTextUtf8ByteLength(value) {
|
|
52990
|
-
return new TextEncoder().encode(value).byteLength;
|
|
52991
|
-
}
|
|
52992
|
-
function assertDocsTextWithinLimit(value, label = "Documentation") {
|
|
52993
|
-
const byteLength = docsTextUtf8ByteLength(value);
|
|
52994
|
-
if (byteLength > DOCS_TEXT_MAX_UTF8_BYTES2) {
|
|
52995
|
-
throw new Error(
|
|
52996
|
-
`${label} is ${byteLength} UTF-8 bytes; the limit is ${DOCS_TEXT_MAX_UTF8_BYTES2} bytes.`
|
|
52997
|
-
);
|
|
52998
|
-
}
|
|
52999
|
-
}
|
|
53000
|
-
|
|
53001
53027
|
// src/project-manifest/record-adapters/codecs.ts
|
|
53002
53028
|
var MEMBER_KIND = {
|
|
53003
53029
|
Null: 0,
|
|
@@ -55688,7 +55714,7 @@ var SPECIALIZED_RELATION_KINDS = /* @__PURE__ */ new Set([
|
|
|
55688
55714
|
|
|
55689
55715
|
// ../packages/manifest/schema-contract/registry.mjs
|
|
55690
55716
|
var PROJECT_SCHEMA_CONTRACT = Object.freeze({
|
|
55691
|
-
cliVersion: "0.
|
|
55717
|
+
cliVersion: "0.75.1",
|
|
55692
55718
|
projectFileUploadBatchSize: 32,
|
|
55693
55719
|
documentRecords: {
|
|
55694
55720
|
member: {
|