@mmapp/react-compiler 0.1.0-alpha.6 → 0.1.0-alpha.7
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/babel/index.js +27 -23
- package/dist/babel/index.mjs +1 -1
- package/dist/chunk-5FTDWKHH.mjs +244 -0
- package/dist/chunk-7JRAEFRB.mjs +7510 -0
- package/dist/chunk-HRYR54PT.mjs +175 -0
- package/dist/chunk-O4AUS7EU.mjs +148 -0
- package/dist/chunk-Z2G5RZ4H.mjs +186 -0
- package/dist/chunk-ZE3KCHBM.mjs +2918 -0
- package/dist/cli/index.js +35 -23
- package/dist/cli/index.mjs +5 -5
- package/dist/dev-server.js +35 -23
- package/dist/dev-server.mjs +4 -4
- package/dist/envelope.js +27 -23
- package/dist/envelope.mjs +2 -2
- package/dist/index.js +35 -23
- package/dist/index.mjs +6 -6
- package/dist/project-compiler-NNK32MPG.mjs +10 -0
- package/dist/testing/index.js +27 -23
- package/dist/testing/index.mjs +1 -1
- package/dist/verify-BYHUKARQ.mjs +1833 -0
- package/dist/vite/index.js +27 -23
- package/dist/vite/index.mjs +2 -2
- package/package.json +5 -2
package/dist/cli/index.js
CHANGED
|
@@ -6228,6 +6228,18 @@ var init_actor_extractor = __esm({
|
|
|
6228
6228
|
}
|
|
6229
6229
|
});
|
|
6230
6230
|
|
|
6231
|
+
// ../player-core/dist/index.mjs
|
|
6232
|
+
function normalizeCategory(primary, ...tags) {
|
|
6233
|
+
const uniqueTags = [...new Set(tags.filter((t27) => t27 !== primary))];
|
|
6234
|
+
uniqueTags.sort();
|
|
6235
|
+
return [primary, ...uniqueTags];
|
|
6236
|
+
}
|
|
6237
|
+
var init_dist = __esm({
|
|
6238
|
+
"../player-core/dist/index.mjs"() {
|
|
6239
|
+
"use strict";
|
|
6240
|
+
}
|
|
6241
|
+
});
|
|
6242
|
+
|
|
6231
6243
|
// src/babel/emitters/experience-transform.ts
|
|
6232
6244
|
function transformToFrontend(node) {
|
|
6233
6245
|
const result = {
|
|
@@ -6604,7 +6616,7 @@ function liftAction(action) {
|
|
|
6604
6616
|
}
|
|
6605
6617
|
return {
|
|
6606
6618
|
slug: action.id,
|
|
6607
|
-
category:
|
|
6619
|
+
category: normalizeCategory("expression", "mutation", action.type),
|
|
6608
6620
|
parts: parts.length > 0 ? parts : void 0
|
|
6609
6621
|
};
|
|
6610
6622
|
}
|
|
@@ -6634,7 +6646,7 @@ function liftSchedule(during) {
|
|
|
6634
6646
|
for (const action of during.actions) {
|
|
6635
6647
|
parts.push({
|
|
6636
6648
|
slug: "do",
|
|
6637
|
-
category:
|
|
6649
|
+
category: normalizeCategory("expression", "mutation", action.type),
|
|
6638
6650
|
parts: Object.entries(action.config || {}).map(([key, value]) => ({
|
|
6639
6651
|
slug: key,
|
|
6640
6652
|
category: ["atom"],
|
|
@@ -6644,7 +6656,7 @@ function liftSchedule(during) {
|
|
|
6644
6656
|
}
|
|
6645
6657
|
return {
|
|
6646
6658
|
slug: during.id,
|
|
6647
|
-
category:
|
|
6659
|
+
category: normalizeCategory("schedule", during.type),
|
|
6648
6660
|
parts
|
|
6649
6661
|
};
|
|
6650
6662
|
}
|
|
@@ -6657,14 +6669,14 @@ function liftState(state) {
|
|
|
6657
6669
|
if (state.on_enter && state.on_enter.length > 0) {
|
|
6658
6670
|
parts.push({
|
|
6659
6671
|
slug: "on_enter",
|
|
6660
|
-
category:
|
|
6672
|
+
category: normalizeCategory("expression", "sequence"),
|
|
6661
6673
|
parts: state.on_enter.map(liftAction)
|
|
6662
6674
|
});
|
|
6663
6675
|
}
|
|
6664
6676
|
if (state.on_exit && state.on_exit.length > 0) {
|
|
6665
6677
|
parts.push({
|
|
6666
6678
|
slug: "on_exit",
|
|
6667
|
-
category:
|
|
6679
|
+
category: normalizeCategory("expression", "sequence"),
|
|
6668
6680
|
parts: state.on_exit.map(liftAction)
|
|
6669
6681
|
});
|
|
6670
6682
|
}
|
|
@@ -6675,7 +6687,7 @@ function liftState(state) {
|
|
|
6675
6687
|
}
|
|
6676
6688
|
return {
|
|
6677
6689
|
slug: state.name,
|
|
6678
|
-
category:
|
|
6690
|
+
category: normalizeCategory("state", ...tags),
|
|
6679
6691
|
parts: parts.length > 0 ? parts : void 0
|
|
6680
6692
|
};
|
|
6681
6693
|
}
|
|
@@ -6698,17 +6710,17 @@ function liftTransition(transition) {
|
|
|
6698
6710
|
if (transition.actions && transition.actions.length > 0) {
|
|
6699
6711
|
parts.push({
|
|
6700
6712
|
slug: "actions",
|
|
6701
|
-
category:
|
|
6713
|
+
category: normalizeCategory("expression", "sequence"),
|
|
6702
6714
|
parts: transition.actions.map(liftAction)
|
|
6703
6715
|
});
|
|
6704
6716
|
}
|
|
6705
6717
|
if (transition.conditions && transition.conditions.length > 0) {
|
|
6706
6718
|
parts.push({
|
|
6707
6719
|
slug: "conditions",
|
|
6708
|
-
category:
|
|
6720
|
+
category: normalizeCategory("expression", "guard"),
|
|
6709
6721
|
parts: transition.conditions.map((c, i) => ({
|
|
6710
6722
|
slug: `condition_${i}`,
|
|
6711
|
-
category:
|
|
6723
|
+
category: normalizeCategory("expression", c.type || "condition"),
|
|
6712
6724
|
parts: c.expression ? [{ slug: c.expression, category: ["binding"] }] : void 0
|
|
6713
6725
|
}))
|
|
6714
6726
|
});
|
|
@@ -6747,7 +6759,7 @@ function liftField(field) {
|
|
|
6747
6759
|
}
|
|
6748
6760
|
return {
|
|
6749
6761
|
slug: field.name,
|
|
6750
|
-
category:
|
|
6762
|
+
category: normalizeCategory("field", field.type),
|
|
6751
6763
|
parts: parts.length > 0 ? parts : void 0
|
|
6752
6764
|
};
|
|
6753
6765
|
}
|
|
@@ -6770,20 +6782,20 @@ function liftView(node) {
|
|
|
6770
6782
|
if (match) {
|
|
6771
6783
|
parts.push({
|
|
6772
6784
|
slug: key,
|
|
6773
|
-
category:
|
|
6785
|
+
category: normalizeCategory("expression", "effect", "transition"),
|
|
6774
6786
|
parts: [{ slug: match[1], category: ["ref"] }]
|
|
6775
6787
|
});
|
|
6776
6788
|
} else {
|
|
6777
6789
|
parts.push({
|
|
6778
6790
|
slug: key,
|
|
6779
|
-
category:
|
|
6791
|
+
category: normalizeCategory("expression", "binding"),
|
|
6780
6792
|
parts: [{ slug: String(expr), category: ["binding"] }]
|
|
6781
6793
|
});
|
|
6782
6794
|
}
|
|
6783
6795
|
} else {
|
|
6784
6796
|
parts.push({
|
|
6785
6797
|
slug: key,
|
|
6786
|
-
category:
|
|
6798
|
+
category: normalizeCategory("expression", "binding"),
|
|
6787
6799
|
parts: [{ slug: String(expr), category: ["binding"] }]
|
|
6788
6800
|
});
|
|
6789
6801
|
}
|
|
@@ -6794,20 +6806,20 @@ function liftView(node) {
|
|
|
6794
6806
|
if (eqMatch) {
|
|
6795
6807
|
parts.push({
|
|
6796
6808
|
slug: "visible_when",
|
|
6797
|
-
category:
|
|
6809
|
+
category: normalizeCategory("expression", "guard"),
|
|
6798
6810
|
parts: [{
|
|
6799
6811
|
slug: "body",
|
|
6800
|
-
category:
|
|
6812
|
+
category: normalizeCategory("expression", "eq"),
|
|
6801
6813
|
parts: [
|
|
6802
|
-
{ slug: "lhs", category:
|
|
6803
|
-
{ slug: "rhs", category:
|
|
6814
|
+
{ slug: "lhs", category: normalizeCategory("expression", "path"), parts: [{ slug: eqMatch[1], category: ["binding"] }] },
|
|
6815
|
+
{ slug: "rhs", category: normalizeCategory("expression", "literal"), parts: [{ slug: eqMatch[2], category: ["literal"] }] }
|
|
6804
6816
|
]
|
|
6805
6817
|
}]
|
|
6806
6818
|
});
|
|
6807
6819
|
} else {
|
|
6808
6820
|
parts.push({
|
|
6809
6821
|
slug: "visible_when",
|
|
6810
|
-
category:
|
|
6822
|
+
category: normalizeCategory("expression", "guard"),
|
|
6811
6823
|
parts: [{ slug: node.visible_when, category: ["binding"] }]
|
|
6812
6824
|
});
|
|
6813
6825
|
}
|
|
@@ -6819,7 +6831,7 @@ function liftView(node) {
|
|
|
6819
6831
|
}
|
|
6820
6832
|
return {
|
|
6821
6833
|
slug: node.id,
|
|
6822
|
-
category:
|
|
6834
|
+
category: normalizeCategory("view", componentTag),
|
|
6823
6835
|
parts: parts.length > 0 ? parts : void 0
|
|
6824
6836
|
};
|
|
6825
6837
|
}
|
|
@@ -6840,7 +6852,7 @@ function emitCanonical(extracted, sourceFilename) {
|
|
|
6840
6852
|
}
|
|
6841
6853
|
parts.push({
|
|
6842
6854
|
slug: "manifest",
|
|
6843
|
-
category:
|
|
6855
|
+
category: normalizeCategory("meta", "manifest"),
|
|
6844
6856
|
parts: [
|
|
6845
6857
|
{
|
|
6846
6858
|
slug: "workflows",
|
|
@@ -6861,7 +6873,7 @@ function emitCanonical(extracted, sourceFilename) {
|
|
|
6861
6873
|
let categoryArray;
|
|
6862
6874
|
if (category.includes("/")) {
|
|
6863
6875
|
const [primary, ...tags] = category.split("/");
|
|
6864
|
-
categoryArray =
|
|
6876
|
+
categoryArray = normalizeCategory(primary, ...tags);
|
|
6865
6877
|
} else {
|
|
6866
6878
|
categoryArray = [category];
|
|
6867
6879
|
}
|
|
@@ -7024,11 +7036,11 @@ function compilerStateToWorkflow(state, metadata) {
|
|
|
7024
7036
|
extraMetadata: Object.keys(extraMetadata).length > 0 ? extraMetadata : void 0
|
|
7025
7037
|
};
|
|
7026
7038
|
}
|
|
7027
|
-
var
|
|
7039
|
+
var PROP_RULES, COMPONENT_RENAMES, RENAME_EXTRA_CONFIG;
|
|
7028
7040
|
var init_pure_form_emitter = __esm({
|
|
7029
7041
|
"src/babel/emitters/pure-form-emitter.ts"() {
|
|
7030
7042
|
"use strict";
|
|
7031
|
-
|
|
7043
|
+
init_dist();
|
|
7032
7044
|
init_transition_extractor();
|
|
7033
7045
|
init_experience_transform();
|
|
7034
7046
|
PROP_RULES = {
|
package/dist/cli/index.mjs
CHANGED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
} from "../chunk-52XHYD2V.mjs";
|
|
5
5
|
import {
|
|
6
6
|
build
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-5FTDWKHH.mjs";
|
|
8
8
|
import "../chunk-5M7DKKBC.mjs";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-7JRAEFRB.mjs";
|
|
10
10
|
import {
|
|
11
11
|
__require
|
|
12
12
|
} from "../chunk-CIESM3BP.mjs";
|
|
@@ -39,7 +39,7 @@ async function test(options = {}) {
|
|
|
39
39
|
const rel = f.startsWith(srcDir + "/") ? f.slice(srcDir.length + 1) : f;
|
|
40
40
|
fileMap[rel] = readFileSync(f, "utf-8");
|
|
41
41
|
}
|
|
42
|
-
const { compileProject } = await import("../project-compiler-
|
|
42
|
+
const { compileProject } = await import("../project-compiler-NNK32MPG.mjs");
|
|
43
43
|
const { decompileProjectEnhanced } = await import("../project-decompiler-US7GAVIC.mjs");
|
|
44
44
|
process.stdout.write(` Compiling project...`);
|
|
45
45
|
const t0 = performance.now();
|
|
@@ -560,7 +560,7 @@ async function main() {
|
|
|
560
560
|
const { glob: glob2 } = await import("glob");
|
|
561
561
|
const configPath = resolve2(srcDir, "mm.config.ts");
|
|
562
562
|
if (existsSync3(configPath)) {
|
|
563
|
-
const { compileProject } = await import("../project-compiler-
|
|
563
|
+
const { compileProject } = await import("../project-compiler-NNK32MPG.mjs");
|
|
564
564
|
const allFiles = await glob2(`${srcDir}/**/*.{ts,tsx}`, {
|
|
565
565
|
ignore: ["**/node_modules/**", "**/dist/**", "**/__tests__/**", "**/*.test.*"]
|
|
566
566
|
});
|
|
@@ -636,7 +636,7 @@ async function main() {
|
|
|
636
636
|
console.error("[mmrc] Error: target path is required\n Usage: mmrc verify <file-or-dir> [options]");
|
|
637
637
|
process.exit(1);
|
|
638
638
|
}
|
|
639
|
-
const { verifyCommand } = await import("../verify-
|
|
639
|
+
const { verifyCommand } = await import("../verify-BYHUKARQ.mjs");
|
|
640
640
|
const result = await verifyCommand({
|
|
641
641
|
target,
|
|
642
642
|
static: hasFlag("--static"),
|
package/dist/dev-server.js
CHANGED
|
@@ -6227,6 +6227,18 @@ var init_actor_extractor = __esm({
|
|
|
6227
6227
|
}
|
|
6228
6228
|
});
|
|
6229
6229
|
|
|
6230
|
+
// ../player-core/dist/index.mjs
|
|
6231
|
+
function normalizeCategory(primary, ...tags) {
|
|
6232
|
+
const uniqueTags = [...new Set(tags.filter((t23) => t23 !== primary))];
|
|
6233
|
+
uniqueTags.sort();
|
|
6234
|
+
return [primary, ...uniqueTags];
|
|
6235
|
+
}
|
|
6236
|
+
var init_dist = __esm({
|
|
6237
|
+
"../player-core/dist/index.mjs"() {
|
|
6238
|
+
"use strict";
|
|
6239
|
+
}
|
|
6240
|
+
});
|
|
6241
|
+
|
|
6230
6242
|
// src/babel/emitters/experience-transform.ts
|
|
6231
6243
|
function transformToFrontend(node) {
|
|
6232
6244
|
const result = {
|
|
@@ -6603,7 +6615,7 @@ function liftAction(action) {
|
|
|
6603
6615
|
}
|
|
6604
6616
|
return {
|
|
6605
6617
|
slug: action.id,
|
|
6606
|
-
category:
|
|
6618
|
+
category: normalizeCategory("expression", "mutation", action.type),
|
|
6607
6619
|
parts: parts.length > 0 ? parts : void 0
|
|
6608
6620
|
};
|
|
6609
6621
|
}
|
|
@@ -6633,7 +6645,7 @@ function liftSchedule(during) {
|
|
|
6633
6645
|
for (const action of during.actions) {
|
|
6634
6646
|
parts.push({
|
|
6635
6647
|
slug: "do",
|
|
6636
|
-
category:
|
|
6648
|
+
category: normalizeCategory("expression", "mutation", action.type),
|
|
6637
6649
|
parts: Object.entries(action.config || {}).map(([key, value]) => ({
|
|
6638
6650
|
slug: key,
|
|
6639
6651
|
category: ["atom"],
|
|
@@ -6643,7 +6655,7 @@ function liftSchedule(during) {
|
|
|
6643
6655
|
}
|
|
6644
6656
|
return {
|
|
6645
6657
|
slug: during.id,
|
|
6646
|
-
category:
|
|
6658
|
+
category: normalizeCategory("schedule", during.type),
|
|
6647
6659
|
parts
|
|
6648
6660
|
};
|
|
6649
6661
|
}
|
|
@@ -6656,14 +6668,14 @@ function liftState(state) {
|
|
|
6656
6668
|
if (state.on_enter && state.on_enter.length > 0) {
|
|
6657
6669
|
parts.push({
|
|
6658
6670
|
slug: "on_enter",
|
|
6659
|
-
category:
|
|
6671
|
+
category: normalizeCategory("expression", "sequence"),
|
|
6660
6672
|
parts: state.on_enter.map(liftAction)
|
|
6661
6673
|
});
|
|
6662
6674
|
}
|
|
6663
6675
|
if (state.on_exit && state.on_exit.length > 0) {
|
|
6664
6676
|
parts.push({
|
|
6665
6677
|
slug: "on_exit",
|
|
6666
|
-
category:
|
|
6678
|
+
category: normalizeCategory("expression", "sequence"),
|
|
6667
6679
|
parts: state.on_exit.map(liftAction)
|
|
6668
6680
|
});
|
|
6669
6681
|
}
|
|
@@ -6674,7 +6686,7 @@ function liftState(state) {
|
|
|
6674
6686
|
}
|
|
6675
6687
|
return {
|
|
6676
6688
|
slug: state.name,
|
|
6677
|
-
category:
|
|
6689
|
+
category: normalizeCategory("state", ...tags),
|
|
6678
6690
|
parts: parts.length > 0 ? parts : void 0
|
|
6679
6691
|
};
|
|
6680
6692
|
}
|
|
@@ -6697,17 +6709,17 @@ function liftTransition(transition) {
|
|
|
6697
6709
|
if (transition.actions && transition.actions.length > 0) {
|
|
6698
6710
|
parts.push({
|
|
6699
6711
|
slug: "actions",
|
|
6700
|
-
category:
|
|
6712
|
+
category: normalizeCategory("expression", "sequence"),
|
|
6701
6713
|
parts: transition.actions.map(liftAction)
|
|
6702
6714
|
});
|
|
6703
6715
|
}
|
|
6704
6716
|
if (transition.conditions && transition.conditions.length > 0) {
|
|
6705
6717
|
parts.push({
|
|
6706
6718
|
slug: "conditions",
|
|
6707
|
-
category:
|
|
6719
|
+
category: normalizeCategory("expression", "guard"),
|
|
6708
6720
|
parts: transition.conditions.map((c, i) => ({
|
|
6709
6721
|
slug: `condition_${i}`,
|
|
6710
|
-
category:
|
|
6722
|
+
category: normalizeCategory("expression", c.type || "condition"),
|
|
6711
6723
|
parts: c.expression ? [{ slug: c.expression, category: ["binding"] }] : void 0
|
|
6712
6724
|
}))
|
|
6713
6725
|
});
|
|
@@ -6746,7 +6758,7 @@ function liftField(field) {
|
|
|
6746
6758
|
}
|
|
6747
6759
|
return {
|
|
6748
6760
|
slug: field.name,
|
|
6749
|
-
category:
|
|
6761
|
+
category: normalizeCategory("field", field.type),
|
|
6750
6762
|
parts: parts.length > 0 ? parts : void 0
|
|
6751
6763
|
};
|
|
6752
6764
|
}
|
|
@@ -6769,20 +6781,20 @@ function liftView(node) {
|
|
|
6769
6781
|
if (match) {
|
|
6770
6782
|
parts.push({
|
|
6771
6783
|
slug: key,
|
|
6772
|
-
category:
|
|
6784
|
+
category: normalizeCategory("expression", "effect", "transition"),
|
|
6773
6785
|
parts: [{ slug: match[1], category: ["ref"] }]
|
|
6774
6786
|
});
|
|
6775
6787
|
} else {
|
|
6776
6788
|
parts.push({
|
|
6777
6789
|
slug: key,
|
|
6778
|
-
category:
|
|
6790
|
+
category: normalizeCategory("expression", "binding"),
|
|
6779
6791
|
parts: [{ slug: String(expr), category: ["binding"] }]
|
|
6780
6792
|
});
|
|
6781
6793
|
}
|
|
6782
6794
|
} else {
|
|
6783
6795
|
parts.push({
|
|
6784
6796
|
slug: key,
|
|
6785
|
-
category:
|
|
6797
|
+
category: normalizeCategory("expression", "binding"),
|
|
6786
6798
|
parts: [{ slug: String(expr), category: ["binding"] }]
|
|
6787
6799
|
});
|
|
6788
6800
|
}
|
|
@@ -6793,20 +6805,20 @@ function liftView(node) {
|
|
|
6793
6805
|
if (eqMatch) {
|
|
6794
6806
|
parts.push({
|
|
6795
6807
|
slug: "visible_when",
|
|
6796
|
-
category:
|
|
6808
|
+
category: normalizeCategory("expression", "guard"),
|
|
6797
6809
|
parts: [{
|
|
6798
6810
|
slug: "body",
|
|
6799
|
-
category:
|
|
6811
|
+
category: normalizeCategory("expression", "eq"),
|
|
6800
6812
|
parts: [
|
|
6801
|
-
{ slug: "lhs", category:
|
|
6802
|
-
{ slug: "rhs", category:
|
|
6813
|
+
{ slug: "lhs", category: normalizeCategory("expression", "path"), parts: [{ slug: eqMatch[1], category: ["binding"] }] },
|
|
6814
|
+
{ slug: "rhs", category: normalizeCategory("expression", "literal"), parts: [{ slug: eqMatch[2], category: ["literal"] }] }
|
|
6803
6815
|
]
|
|
6804
6816
|
}]
|
|
6805
6817
|
});
|
|
6806
6818
|
} else {
|
|
6807
6819
|
parts.push({
|
|
6808
6820
|
slug: "visible_when",
|
|
6809
|
-
category:
|
|
6821
|
+
category: normalizeCategory("expression", "guard"),
|
|
6810
6822
|
parts: [{ slug: node.visible_when, category: ["binding"] }]
|
|
6811
6823
|
});
|
|
6812
6824
|
}
|
|
@@ -6818,7 +6830,7 @@ function liftView(node) {
|
|
|
6818
6830
|
}
|
|
6819
6831
|
return {
|
|
6820
6832
|
slug: node.id,
|
|
6821
|
-
category:
|
|
6833
|
+
category: normalizeCategory("view", componentTag),
|
|
6822
6834
|
parts: parts.length > 0 ? parts : void 0
|
|
6823
6835
|
};
|
|
6824
6836
|
}
|
|
@@ -6839,7 +6851,7 @@ function emitCanonical(extracted, sourceFilename) {
|
|
|
6839
6851
|
}
|
|
6840
6852
|
parts.push({
|
|
6841
6853
|
slug: "manifest",
|
|
6842
|
-
category:
|
|
6854
|
+
category: normalizeCategory("meta", "manifest"),
|
|
6843
6855
|
parts: [
|
|
6844
6856
|
{
|
|
6845
6857
|
slug: "workflows",
|
|
@@ -6860,7 +6872,7 @@ function emitCanonical(extracted, sourceFilename) {
|
|
|
6860
6872
|
let categoryArray;
|
|
6861
6873
|
if (category.includes("/")) {
|
|
6862
6874
|
const [primary, ...tags] = category.split("/");
|
|
6863
|
-
categoryArray =
|
|
6875
|
+
categoryArray = normalizeCategory(primary, ...tags);
|
|
6864
6876
|
} else {
|
|
6865
6877
|
categoryArray = [category];
|
|
6866
6878
|
}
|
|
@@ -7023,11 +7035,11 @@ function compilerStateToWorkflow(state, metadata) {
|
|
|
7023
7035
|
extraMetadata: Object.keys(extraMetadata).length > 0 ? extraMetadata : void 0
|
|
7024
7036
|
};
|
|
7025
7037
|
}
|
|
7026
|
-
var
|
|
7038
|
+
var PROP_RULES, COMPONENT_RENAMES, RENAME_EXTRA_CONFIG;
|
|
7027
7039
|
var init_pure_form_emitter = __esm({
|
|
7028
7040
|
"src/babel/emitters/pure-form-emitter.ts"() {
|
|
7029
7041
|
"use strict";
|
|
7030
|
-
|
|
7042
|
+
init_dist();
|
|
7031
7043
|
init_transition_extractor();
|
|
7032
7044
|
init_experience_transform();
|
|
7033
7045
|
PROP_RULES = {
|
package/dist/dev-server.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createDevServer
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-O4AUS7EU.mjs";
|
|
4
|
+
import "./chunk-HRYR54PT.mjs";
|
|
5
|
+
import "./chunk-5FTDWKHH.mjs";
|
|
6
6
|
import "./chunk-5M7DKKBC.mjs";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-7JRAEFRB.mjs";
|
|
8
8
|
import "./chunk-CIESM3BP.mjs";
|
|
9
9
|
export {
|
|
10
10
|
createDevServer
|
package/dist/envelope.js
CHANGED
|
@@ -5998,8 +5998,12 @@ function extractStaticObj(obj) {
|
|
|
5998
5998
|
return result;
|
|
5999
5999
|
}
|
|
6000
6000
|
|
|
6001
|
-
//
|
|
6002
|
-
|
|
6001
|
+
// ../player-core/dist/index.mjs
|
|
6002
|
+
function normalizeCategory(primary, ...tags) {
|
|
6003
|
+
const uniqueTags = [...new Set(tags.filter((t22) => t22 !== primary))];
|
|
6004
|
+
uniqueTags.sort();
|
|
6005
|
+
return [primary, ...uniqueTags];
|
|
6006
|
+
}
|
|
6003
6007
|
|
|
6004
6008
|
// src/babel/emitters/experience-transform.ts
|
|
6005
6009
|
function transformToFrontend(node) {
|
|
@@ -6392,7 +6396,7 @@ function liftAction(action) {
|
|
|
6392
6396
|
}
|
|
6393
6397
|
return {
|
|
6394
6398
|
slug: action.id,
|
|
6395
|
-
category:
|
|
6399
|
+
category: normalizeCategory("expression", "mutation", action.type),
|
|
6396
6400
|
parts: parts.length > 0 ? parts : void 0
|
|
6397
6401
|
};
|
|
6398
6402
|
}
|
|
@@ -6422,7 +6426,7 @@ function liftSchedule(during) {
|
|
|
6422
6426
|
for (const action of during.actions) {
|
|
6423
6427
|
parts.push({
|
|
6424
6428
|
slug: "do",
|
|
6425
|
-
category:
|
|
6429
|
+
category: normalizeCategory("expression", "mutation", action.type),
|
|
6426
6430
|
parts: Object.entries(action.config || {}).map(([key, value]) => ({
|
|
6427
6431
|
slug: key,
|
|
6428
6432
|
category: ["atom"],
|
|
@@ -6432,7 +6436,7 @@ function liftSchedule(during) {
|
|
|
6432
6436
|
}
|
|
6433
6437
|
return {
|
|
6434
6438
|
slug: during.id,
|
|
6435
|
-
category:
|
|
6439
|
+
category: normalizeCategory("schedule", during.type),
|
|
6436
6440
|
parts
|
|
6437
6441
|
};
|
|
6438
6442
|
}
|
|
@@ -6445,14 +6449,14 @@ function liftState(state) {
|
|
|
6445
6449
|
if (state.on_enter && state.on_enter.length > 0) {
|
|
6446
6450
|
parts.push({
|
|
6447
6451
|
slug: "on_enter",
|
|
6448
|
-
category:
|
|
6452
|
+
category: normalizeCategory("expression", "sequence"),
|
|
6449
6453
|
parts: state.on_enter.map(liftAction)
|
|
6450
6454
|
});
|
|
6451
6455
|
}
|
|
6452
6456
|
if (state.on_exit && state.on_exit.length > 0) {
|
|
6453
6457
|
parts.push({
|
|
6454
6458
|
slug: "on_exit",
|
|
6455
|
-
category:
|
|
6459
|
+
category: normalizeCategory("expression", "sequence"),
|
|
6456
6460
|
parts: state.on_exit.map(liftAction)
|
|
6457
6461
|
});
|
|
6458
6462
|
}
|
|
@@ -6463,7 +6467,7 @@ function liftState(state) {
|
|
|
6463
6467
|
}
|
|
6464
6468
|
return {
|
|
6465
6469
|
slug: state.name,
|
|
6466
|
-
category:
|
|
6470
|
+
category: normalizeCategory("state", ...tags),
|
|
6467
6471
|
parts: parts.length > 0 ? parts : void 0
|
|
6468
6472
|
};
|
|
6469
6473
|
}
|
|
@@ -6486,17 +6490,17 @@ function liftTransition(transition) {
|
|
|
6486
6490
|
if (transition.actions && transition.actions.length > 0) {
|
|
6487
6491
|
parts.push({
|
|
6488
6492
|
slug: "actions",
|
|
6489
|
-
category:
|
|
6493
|
+
category: normalizeCategory("expression", "sequence"),
|
|
6490
6494
|
parts: transition.actions.map(liftAction)
|
|
6491
6495
|
});
|
|
6492
6496
|
}
|
|
6493
6497
|
if (transition.conditions && transition.conditions.length > 0) {
|
|
6494
6498
|
parts.push({
|
|
6495
6499
|
slug: "conditions",
|
|
6496
|
-
category:
|
|
6500
|
+
category: normalizeCategory("expression", "guard"),
|
|
6497
6501
|
parts: transition.conditions.map((c, i) => ({
|
|
6498
6502
|
slug: `condition_${i}`,
|
|
6499
|
-
category:
|
|
6503
|
+
category: normalizeCategory("expression", c.type || "condition"),
|
|
6500
6504
|
parts: c.expression ? [{ slug: c.expression, category: ["binding"] }] : void 0
|
|
6501
6505
|
}))
|
|
6502
6506
|
});
|
|
@@ -6535,7 +6539,7 @@ function liftField(field) {
|
|
|
6535
6539
|
}
|
|
6536
6540
|
return {
|
|
6537
6541
|
slug: field.name,
|
|
6538
|
-
category:
|
|
6542
|
+
category: normalizeCategory("field", field.type),
|
|
6539
6543
|
parts: parts.length > 0 ? parts : void 0
|
|
6540
6544
|
};
|
|
6541
6545
|
}
|
|
@@ -6558,20 +6562,20 @@ function liftView(node) {
|
|
|
6558
6562
|
if (match) {
|
|
6559
6563
|
parts.push({
|
|
6560
6564
|
slug: key,
|
|
6561
|
-
category:
|
|
6565
|
+
category: normalizeCategory("expression", "effect", "transition"),
|
|
6562
6566
|
parts: [{ slug: match[1], category: ["ref"] }]
|
|
6563
6567
|
});
|
|
6564
6568
|
} else {
|
|
6565
6569
|
parts.push({
|
|
6566
6570
|
slug: key,
|
|
6567
|
-
category:
|
|
6571
|
+
category: normalizeCategory("expression", "binding"),
|
|
6568
6572
|
parts: [{ slug: String(expr), category: ["binding"] }]
|
|
6569
6573
|
});
|
|
6570
6574
|
}
|
|
6571
6575
|
} else {
|
|
6572
6576
|
parts.push({
|
|
6573
6577
|
slug: key,
|
|
6574
|
-
category:
|
|
6578
|
+
category: normalizeCategory("expression", "binding"),
|
|
6575
6579
|
parts: [{ slug: String(expr), category: ["binding"] }]
|
|
6576
6580
|
});
|
|
6577
6581
|
}
|
|
@@ -6582,20 +6586,20 @@ function liftView(node) {
|
|
|
6582
6586
|
if (eqMatch) {
|
|
6583
6587
|
parts.push({
|
|
6584
6588
|
slug: "visible_when",
|
|
6585
|
-
category:
|
|
6589
|
+
category: normalizeCategory("expression", "guard"),
|
|
6586
6590
|
parts: [{
|
|
6587
6591
|
slug: "body",
|
|
6588
|
-
category:
|
|
6592
|
+
category: normalizeCategory("expression", "eq"),
|
|
6589
6593
|
parts: [
|
|
6590
|
-
{ slug: "lhs", category:
|
|
6591
|
-
{ slug: "rhs", category:
|
|
6594
|
+
{ slug: "lhs", category: normalizeCategory("expression", "path"), parts: [{ slug: eqMatch[1], category: ["binding"] }] },
|
|
6595
|
+
{ slug: "rhs", category: normalizeCategory("expression", "literal"), parts: [{ slug: eqMatch[2], category: ["literal"] }] }
|
|
6592
6596
|
]
|
|
6593
6597
|
}]
|
|
6594
6598
|
});
|
|
6595
6599
|
} else {
|
|
6596
6600
|
parts.push({
|
|
6597
6601
|
slug: "visible_when",
|
|
6598
|
-
category:
|
|
6602
|
+
category: normalizeCategory("expression", "guard"),
|
|
6599
6603
|
parts: [{ slug: node.visible_when, category: ["binding"] }]
|
|
6600
6604
|
});
|
|
6601
6605
|
}
|
|
@@ -6607,7 +6611,7 @@ function liftView(node) {
|
|
|
6607
6611
|
}
|
|
6608
6612
|
return {
|
|
6609
6613
|
slug: node.id,
|
|
6610
|
-
category:
|
|
6614
|
+
category: normalizeCategory("view", componentTag),
|
|
6611
6615
|
parts: parts.length > 0 ? parts : void 0
|
|
6612
6616
|
};
|
|
6613
6617
|
}
|
|
@@ -6628,7 +6632,7 @@ function emitCanonical(extracted, sourceFilename) {
|
|
|
6628
6632
|
}
|
|
6629
6633
|
parts.push({
|
|
6630
6634
|
slug: "manifest",
|
|
6631
|
-
category:
|
|
6635
|
+
category: normalizeCategory("meta", "manifest"),
|
|
6632
6636
|
parts: [
|
|
6633
6637
|
{
|
|
6634
6638
|
slug: "workflows",
|
|
@@ -6649,7 +6653,7 @@ function emitCanonical(extracted, sourceFilename) {
|
|
|
6649
6653
|
let categoryArray;
|
|
6650
6654
|
if (category.includes("/")) {
|
|
6651
6655
|
const [primary, ...tags] = category.split("/");
|
|
6652
|
-
categoryArray =
|
|
6656
|
+
categoryArray = normalizeCategory(primary, ...tags);
|
|
6653
6657
|
} else {
|
|
6654
6658
|
categoryArray = [category];
|
|
6655
6659
|
}
|
package/dist/envelope.mjs
CHANGED