@patterkit/compiler 0.14.1 → 0.15.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/index.cjs +9 -2
- package/dist/index.js +9 -2
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -765,6 +765,8 @@ function exportBundle(input) {
|
|
|
765
765
|
}
|
|
766
766
|
}
|
|
767
767
|
}
|
|
768
|
+
const startScene = project.start ? scenesOut[project.start.scene] : void 0;
|
|
769
|
+
const start = startScene === void 0 ? void 0 : project.start.block !== void 0 && startScene.blocks.some((b) => b.id === project.start.block) ? { scene: project.start.scene, block: project.start.block } : { scene: project.start.scene };
|
|
768
770
|
return {
|
|
769
771
|
schema: "patter/bundle@0",
|
|
770
772
|
content: {
|
|
@@ -782,7 +784,8 @@ function exportBundle(input) {
|
|
|
782
784
|
...qualifiers.length > 0 ? { qualifiers } : {},
|
|
783
785
|
...typeof project.padAfterDefault === "number" ? { padAfterDefault: project.padAfterDefault } : {},
|
|
784
786
|
// Each node's values are in `scenes`; the declarations and the project's own values are here.
|
|
785
|
-
...extensionSection !== void 0 ? { extensions: extensionSection } : {}
|
|
787
|
+
...extensionSection !== void 0 ? { extensions: extensionSection } : {},
|
|
788
|
+
...start !== void 0 ? { start } : {}
|
|
786
789
|
}, { trailingComma: false })),
|
|
787
790
|
// Structure-only fingerprint (live bundle refresh): the same hash with the string tables left
|
|
788
791
|
// out. Same structureHash + a different hash = a text-only edit, safe to swap in place with
|
|
@@ -794,11 +797,15 @@ function exportBundle(input) {
|
|
|
794
797
|
...foreignScopes ? { scopeRegistry: foreignScopes } : {},
|
|
795
798
|
...qualifiers.length > 0 ? { qualifiers } : {},
|
|
796
799
|
...typeof project.padAfterDefault === "number" ? { padAfterDefault: project.padAfterDefault } : {},
|
|
797
|
-
...extensionSection !== void 0 ? { extensions: extensionSection } : {}
|
|
800
|
+
...extensionSection !== void 0 ? { extensions: extensionSection } : {},
|
|
801
|
+
...start !== void 0 ? { start } : {}
|
|
798
802
|
}, { trailingComma: false }))
|
|
799
803
|
},
|
|
800
804
|
voiced: project.voiced ?? false,
|
|
801
805
|
locales: { default: project.locales.default, included: Object.keys(strings) },
|
|
806
|
+
// Where a flow opened without a scene starts: the project's start, when it names a scene (and block) the
|
|
807
|
+
// bundle has. Absent otherwise, and every runtime starts at the first scene (validate says so).
|
|
808
|
+
...start !== void 0 ? { start } : {},
|
|
802
809
|
// The cast is copied field by field, on purpose. Most of a CastMember is authoring context that must
|
|
803
810
|
// never reach players: `notes` are production chatter, `gender` is translator context (it rides the
|
|
804
811
|
// localisation formats), and `actor` is a real person's name (it belongs in the VO script). Listing
|
package/dist/index.js
CHANGED
|
@@ -740,6 +740,8 @@ function exportBundle(input) {
|
|
|
740
740
|
}
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
|
+
const startScene = project.start ? scenesOut[project.start.scene] : void 0;
|
|
744
|
+
const start = startScene === void 0 ? void 0 : project.start.block !== void 0 && startScene.blocks.some((b) => b.id === project.start.block) ? { scene: project.start.scene, block: project.start.block } : { scene: project.start.scene };
|
|
743
745
|
return {
|
|
744
746
|
schema: "patter/bundle@0",
|
|
745
747
|
content: {
|
|
@@ -757,7 +759,8 @@ function exportBundle(input) {
|
|
|
757
759
|
...qualifiers.length > 0 ? { qualifiers } : {},
|
|
758
760
|
...typeof project.padAfterDefault === "number" ? { padAfterDefault: project.padAfterDefault } : {},
|
|
759
761
|
// Each node's values are in `scenes`; the declarations and the project's own values are here.
|
|
760
|
-
...extensionSection !== void 0 ? { extensions: extensionSection } : {}
|
|
762
|
+
...extensionSection !== void 0 ? { extensions: extensionSection } : {},
|
|
763
|
+
...start !== void 0 ? { start } : {}
|
|
761
764
|
}, { trailingComma: false })),
|
|
762
765
|
// Structure-only fingerprint (live bundle refresh): the same hash with the string tables left
|
|
763
766
|
// out. Same structureHash + a different hash = a text-only edit, safe to swap in place with
|
|
@@ -769,11 +772,15 @@ function exportBundle(input) {
|
|
|
769
772
|
...foreignScopes ? { scopeRegistry: foreignScopes } : {},
|
|
770
773
|
...qualifiers.length > 0 ? { qualifiers } : {},
|
|
771
774
|
...typeof project.padAfterDefault === "number" ? { padAfterDefault: project.padAfterDefault } : {},
|
|
772
|
-
...extensionSection !== void 0 ? { extensions: extensionSection } : {}
|
|
775
|
+
...extensionSection !== void 0 ? { extensions: extensionSection } : {},
|
|
776
|
+
...start !== void 0 ? { start } : {}
|
|
773
777
|
}, { trailingComma: false }))
|
|
774
778
|
},
|
|
775
779
|
voiced: project.voiced ?? false,
|
|
776
780
|
locales: { default: project.locales.default, included: Object.keys(strings) },
|
|
781
|
+
// Where a flow opened without a scene starts: the project's start, when it names a scene (and block) the
|
|
782
|
+
// bundle has. Absent otherwise, and every runtime starts at the first scene (validate says so).
|
|
783
|
+
...start !== void 0 ? { start } : {},
|
|
777
784
|
// The cast is copied field by field, on purpose. Most of a CastMember is authoring context that must
|
|
778
785
|
// never reach players: `notes` are production chatter, `gender` is translator context (it rides the
|
|
779
786
|
// localisation formats), and `actor` is a real person's name (it belongs in the VO script). Listing
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patterkit/compiler",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Patter compiler: compile condition/effect expressions, validate them, and export source to the runtime bundle.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"build": "tsup src/index.ts --format esm,cjs --dts --clean"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@patterkit/model": "0.
|
|
38
|
-
"@patterkit/core": "0.
|
|
39
|
-
"@patterkit/dialect": "0.2.
|
|
37
|
+
"@patterkit/model": "0.21.0",
|
|
38
|
+
"@patterkit/core": "0.10.0",
|
|
39
|
+
"@patterkit/dialect": "0.2.18",
|
|
40
40
|
"@wildwinter/expr": "^0.6.0",
|
|
41
|
-
"@wildwinter/toolkit": "^0.
|
|
41
|
+
"@wildwinter/toolkit": "^0.4.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@wildwinter/scoperegistry": ">=0.9.0 <1.0.0"
|