@mmapp/react-compiler 0.1.0-alpha.7 → 0.1.0-alpha.9
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/auth-3UK75242.mjs +17 -0
- package/dist/babel/index.d.mts +2 -2
- package/dist/babel/index.d.ts +2 -2
- package/dist/babel/index.js +27 -31
- package/dist/babel/index.mjs +1 -1
- package/dist/chunk-7T6Q5KAA.mjs +7506 -0
- package/dist/chunk-ABYPKRSB.mjs +215 -0
- package/dist/chunk-BZEXUPDH.mjs +175 -0
- package/dist/chunk-J3M4GUS7.mjs +161 -0
- package/dist/chunk-JRGFBWTN.mjs +2918 -0
- package/dist/chunk-R2DD5GTY.mjs +186 -0
- package/dist/chunk-UDDTWG5J.mjs +734 -0
- package/dist/chunk-VLTKQDJ3.mjs +244 -0
- package/dist/chunk-WVYY32LD.mjs +939 -0
- package/dist/chunk-XDVM4YHX.mjs +3450 -0
- package/dist/cli/index.js +4372 -3240
- package/dist/cli/index.mjs +77 -179
- package/dist/codemod/cli.js +1 -1
- package/dist/codemod/cli.mjs +1 -1
- package/dist/codemod/index.d.mts +3 -3
- package/dist/codemod/index.d.ts +3 -3
- package/dist/codemod/index.js +1 -1
- package/dist/codemod/index.mjs +1 -1
- package/dist/deploy-YAJGW6II.mjs +9 -0
- package/dist/dev-server-CrQ041KP.d.mts +79 -0
- package/dist/dev-server-CrQ041KP.d.ts +79 -0
- package/dist/dev-server.d.mts +2 -2
- package/dist/dev-server.d.ts +2 -2
- package/dist/dev-server.js +1240 -120
- package/dist/dev-server.mjs +4 -4
- package/dist/envelope-ChEkuHij.d.mts +265 -0
- package/dist/envelope-ChEkuHij.d.ts +265 -0
- package/dist/envelope.d.mts +2 -2
- package/dist/envelope.d.ts +2 -2
- package/dist/envelope.js +27 -31
- package/dist/envelope.mjs +2 -2
- package/dist/index-CEKyyazf.d.mts +104 -0
- package/dist/index-CEKyyazf.d.ts +104 -0
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +1512 -600
- package/dist/index.mjs +8 -8
- package/dist/init-7FJENUDK.mjs +407 -0
- package/dist/project-compiler-ZB4RUYVL.mjs +10 -0
- package/dist/project-decompiler-U55HQUHW.mjs +7 -0
- package/dist/pull-KOL2QAYQ.mjs +109 -0
- package/dist/seed-KOGEPGOJ.mjs +154 -0
- package/dist/server-VW6UPCHO.mjs +277 -0
- package/dist/testing/index.d.mts +8 -8
- package/dist/testing/index.d.ts +8 -8
- package/dist/testing/index.js +27 -31
- package/dist/testing/index.mjs +1 -1
- package/dist/verify-OQDEQYMS.mjs +1833 -0
- package/dist/vite/index.d.mts +1 -1
- package/dist/vite/index.d.ts +1 -1
- package/dist/vite/index.js +27 -31
- package/dist/vite/index.mjs +2 -2
- package/examples/authentication/main.workflow.tsx +1 -1
- package/examples/authentication/mm.config.ts +1 -1
- package/examples/authentication/pages/LoginPage.tsx +2 -2
- package/examples/authentication/pages/SignupPage.tsx +2 -2
- package/examples/counter.workflow.tsx +1 -1
- package/examples/dashboard.workflow.tsx +1 -1
- package/examples/invoice-approval/actions/invoice.server.ts +1 -1
- package/examples/invoice-approval/main.workflow.tsx +1 -1
- package/examples/invoice-approval/mm.config.ts +1 -1
- package/examples/invoice-approval/pages/InvoiceDetailPage.tsx +1 -1
- package/examples/invoice-approval/pages/InvoiceFormPage.tsx +1 -1
- package/examples/invoice-approval/pages/InvoiceListPage.tsx +1 -1
- package/examples/todo-app.workflow.tsx +1 -1
- package/examples/uber-app/actions/matching.server.ts +1 -1
- package/examples/uber-app/actions/notifications.server.ts +1 -1
- package/examples/uber-app/actions/payments.server.ts +1 -1
- package/examples/uber-app/actions/pricing.server.ts +1 -1
- package/examples/uber-app/app/admin/analytics.tsx +2 -2
- package/examples/uber-app/app/admin/fleet.tsx +2 -2
- package/examples/uber-app/app/admin/surge-pricing.tsx +2 -2
- package/examples/uber-app/app/driver/dashboard.tsx +2 -2
- package/examples/uber-app/app/driver/earnings.tsx +2 -2
- package/examples/uber-app/app/driver/navigation.tsx +2 -2
- package/examples/uber-app/app/driver/ride-acceptance.tsx +2 -2
- package/examples/uber-app/app/rider/home.tsx +2 -2
- package/examples/uber-app/app/rider/payment-methods.tsx +2 -2
- package/examples/uber-app/app/rider/ride-history.tsx +2 -2
- package/examples/uber-app/app/rider/ride-tracking.tsx +2 -2
- package/examples/uber-app/components/DriverCard.tsx +1 -1
- package/examples/uber-app/components/MapView.tsx +3 -3
- package/examples/uber-app/components/RatingStars.tsx +2 -2
- package/examples/uber-app/components/RideCard.tsx +1 -1
- package/examples/uber-app/mm.config.ts +1 -1
- package/examples/uber-app/workflows/dispute-resolution.workflow.tsx +2 -2
- package/examples/uber-app/workflows/driver-onboarding.workflow.tsx +2 -2
- package/examples/uber-app/workflows/payment-processing.workflow.tsx +2 -2
- package/examples/uber-app/workflows/ride-request.workflow.tsx +2 -2
- package/package.json +7 -14
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
loadCredentials,
|
|
3
|
+
login,
|
|
4
|
+
logout,
|
|
5
|
+
resolveToken,
|
|
6
|
+
saveCredentials,
|
|
7
|
+
whoami
|
|
8
|
+
} from "./chunk-J3M4GUS7.mjs";
|
|
9
|
+
import "./chunk-CIESM3BP.mjs";
|
|
10
|
+
export {
|
|
11
|
+
loadCredentials,
|
|
12
|
+
login,
|
|
13
|
+
logout,
|
|
14
|
+
resolveToken,
|
|
15
|
+
saveCredentials,
|
|
16
|
+
whoami
|
|
17
|
+
};
|
package/dist/babel/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '@babel/traverse';
|
|
2
|
-
export { b as default } from '../index-
|
|
3
|
-
import '@
|
|
2
|
+
export { b as default } from '../index-CEKyyazf.mjs';
|
|
3
|
+
import '@mmapp/player-core';
|
package/dist/babel/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '@babel/traverse';
|
|
2
|
-
export { b as default } from '../index-
|
|
3
|
-
import '@
|
|
2
|
+
export { b as default } from '../index-CEKyyazf.js';
|
|
3
|
+
import '@mmapp/player-core';
|
package/dist/babel/index.js
CHANGED
|
@@ -4223,7 +4223,7 @@ function extractImperativeWorkflow(path, state) {
|
|
|
4223
4223
|
const source = node.source.value;
|
|
4224
4224
|
for (const spec of node.specifiers) {
|
|
4225
4225
|
const localName = spec.local.name;
|
|
4226
|
-
if (source.includes("@mmapp/react") || source.includes("@
|
|
4226
|
+
if (source.includes("@mmapp/react") || source.includes("@mmapp/react")) {
|
|
4227
4227
|
stdLibImports.add(localName);
|
|
4228
4228
|
} else {
|
|
4229
4229
|
importedFns.set(localName, source);
|
|
@@ -5993,12 +5993,8 @@ function extractStaticObj(obj) {
|
|
|
5993
5993
|
return result;
|
|
5994
5994
|
}
|
|
5995
5995
|
|
|
5996
|
-
//
|
|
5997
|
-
|
|
5998
|
-
const uniqueTags = [...new Set(tags.filter((t22) => t22 !== primary))];
|
|
5999
|
-
uniqueTags.sort();
|
|
6000
|
-
return [primary, ...uniqueTags];
|
|
6001
|
-
}
|
|
5996
|
+
// src/babel/emitters/pure-form-emitter.ts
|
|
5997
|
+
var import_player_core = require("@mmapp/player-core");
|
|
6002
5998
|
|
|
6003
5999
|
// src/babel/emitters/experience-transform.ts
|
|
6004
6000
|
function transformToFrontend(node) {
|
|
@@ -6391,7 +6387,7 @@ function liftAction(action) {
|
|
|
6391
6387
|
}
|
|
6392
6388
|
return {
|
|
6393
6389
|
slug: action.id,
|
|
6394
|
-
category: normalizeCategory("expression", "mutation", action.type),
|
|
6390
|
+
category: (0, import_player_core.normalizeCategory)("expression", "mutation", action.type),
|
|
6395
6391
|
parts: parts.length > 0 ? parts : void 0
|
|
6396
6392
|
};
|
|
6397
6393
|
}
|
|
@@ -6421,7 +6417,7 @@ function liftSchedule(during) {
|
|
|
6421
6417
|
for (const action of during.actions) {
|
|
6422
6418
|
parts.push({
|
|
6423
6419
|
slug: "do",
|
|
6424
|
-
category: normalizeCategory("expression", "mutation", action.type),
|
|
6420
|
+
category: (0, import_player_core.normalizeCategory)("expression", "mutation", action.type),
|
|
6425
6421
|
parts: Object.entries(action.config || {}).map(([key, value]) => ({
|
|
6426
6422
|
slug: key,
|
|
6427
6423
|
category: ["atom"],
|
|
@@ -6431,7 +6427,7 @@ function liftSchedule(during) {
|
|
|
6431
6427
|
}
|
|
6432
6428
|
return {
|
|
6433
6429
|
slug: during.id,
|
|
6434
|
-
category: normalizeCategory("schedule", during.type),
|
|
6430
|
+
category: (0, import_player_core.normalizeCategory)("schedule", during.type),
|
|
6435
6431
|
parts
|
|
6436
6432
|
};
|
|
6437
6433
|
}
|
|
@@ -6444,14 +6440,14 @@ function liftState(state) {
|
|
|
6444
6440
|
if (state.on_enter && state.on_enter.length > 0) {
|
|
6445
6441
|
parts.push({
|
|
6446
6442
|
slug: "on_enter",
|
|
6447
|
-
category: normalizeCategory("expression", "sequence"),
|
|
6443
|
+
category: (0, import_player_core.normalizeCategory)("expression", "sequence"),
|
|
6448
6444
|
parts: state.on_enter.map(liftAction)
|
|
6449
6445
|
});
|
|
6450
6446
|
}
|
|
6451
6447
|
if (state.on_exit && state.on_exit.length > 0) {
|
|
6452
6448
|
parts.push({
|
|
6453
6449
|
slug: "on_exit",
|
|
6454
|
-
category: normalizeCategory("expression", "sequence"),
|
|
6450
|
+
category: (0, import_player_core.normalizeCategory)("expression", "sequence"),
|
|
6455
6451
|
parts: state.on_exit.map(liftAction)
|
|
6456
6452
|
});
|
|
6457
6453
|
}
|
|
@@ -6462,7 +6458,7 @@ function liftState(state) {
|
|
|
6462
6458
|
}
|
|
6463
6459
|
return {
|
|
6464
6460
|
slug: state.name,
|
|
6465
|
-
category: normalizeCategory("state", ...tags),
|
|
6461
|
+
category: (0, import_player_core.normalizeCategory)("state", ...tags),
|
|
6466
6462
|
parts: parts.length > 0 ? parts : void 0
|
|
6467
6463
|
};
|
|
6468
6464
|
}
|
|
@@ -6485,17 +6481,17 @@ function liftTransition(transition) {
|
|
|
6485
6481
|
if (transition.actions && transition.actions.length > 0) {
|
|
6486
6482
|
parts.push({
|
|
6487
6483
|
slug: "actions",
|
|
6488
|
-
category: normalizeCategory("expression", "sequence"),
|
|
6484
|
+
category: (0, import_player_core.normalizeCategory)("expression", "sequence"),
|
|
6489
6485
|
parts: transition.actions.map(liftAction)
|
|
6490
6486
|
});
|
|
6491
6487
|
}
|
|
6492
6488
|
if (transition.conditions && transition.conditions.length > 0) {
|
|
6493
6489
|
parts.push({
|
|
6494
6490
|
slug: "conditions",
|
|
6495
|
-
category: normalizeCategory("expression", "guard"),
|
|
6491
|
+
category: (0, import_player_core.normalizeCategory)("expression", "guard"),
|
|
6496
6492
|
parts: transition.conditions.map((c, i) => ({
|
|
6497
6493
|
slug: `condition_${i}`,
|
|
6498
|
-
category: normalizeCategory("expression", c.type || "condition"),
|
|
6494
|
+
category: (0, import_player_core.normalizeCategory)("expression", c.type || "condition"),
|
|
6499
6495
|
parts: c.expression ? [{ slug: c.expression, category: ["binding"] }] : void 0
|
|
6500
6496
|
}))
|
|
6501
6497
|
});
|
|
@@ -6534,7 +6530,7 @@ function liftField(field) {
|
|
|
6534
6530
|
}
|
|
6535
6531
|
return {
|
|
6536
6532
|
slug: field.name,
|
|
6537
|
-
category: normalizeCategory("field", field.type),
|
|
6533
|
+
category: (0, import_player_core.normalizeCategory)("field", field.type),
|
|
6538
6534
|
parts: parts.length > 0 ? parts : void 0
|
|
6539
6535
|
};
|
|
6540
6536
|
}
|
|
@@ -6557,20 +6553,20 @@ function liftView(node) {
|
|
|
6557
6553
|
if (match) {
|
|
6558
6554
|
parts.push({
|
|
6559
6555
|
slug: key,
|
|
6560
|
-
category: normalizeCategory("expression", "effect", "transition"),
|
|
6556
|
+
category: (0, import_player_core.normalizeCategory)("expression", "effect", "transition"),
|
|
6561
6557
|
parts: [{ slug: match[1], category: ["ref"] }]
|
|
6562
6558
|
});
|
|
6563
6559
|
} else {
|
|
6564
6560
|
parts.push({
|
|
6565
6561
|
slug: key,
|
|
6566
|
-
category: normalizeCategory("expression", "binding"),
|
|
6562
|
+
category: (0, import_player_core.normalizeCategory)("expression", "binding"),
|
|
6567
6563
|
parts: [{ slug: String(expr), category: ["binding"] }]
|
|
6568
6564
|
});
|
|
6569
6565
|
}
|
|
6570
6566
|
} else {
|
|
6571
6567
|
parts.push({
|
|
6572
6568
|
slug: key,
|
|
6573
|
-
category: normalizeCategory("expression", "binding"),
|
|
6569
|
+
category: (0, import_player_core.normalizeCategory)("expression", "binding"),
|
|
6574
6570
|
parts: [{ slug: String(expr), category: ["binding"] }]
|
|
6575
6571
|
});
|
|
6576
6572
|
}
|
|
@@ -6581,20 +6577,20 @@ function liftView(node) {
|
|
|
6581
6577
|
if (eqMatch) {
|
|
6582
6578
|
parts.push({
|
|
6583
6579
|
slug: "visible_when",
|
|
6584
|
-
category: normalizeCategory("expression", "guard"),
|
|
6580
|
+
category: (0, import_player_core.normalizeCategory)("expression", "guard"),
|
|
6585
6581
|
parts: [{
|
|
6586
6582
|
slug: "body",
|
|
6587
|
-
category: normalizeCategory("expression", "eq"),
|
|
6583
|
+
category: (0, import_player_core.normalizeCategory)("expression", "eq"),
|
|
6588
6584
|
parts: [
|
|
6589
|
-
{ slug: "lhs", category: normalizeCategory("expression", "path"), parts: [{ slug: eqMatch[1], category: ["binding"] }] },
|
|
6590
|
-
{ slug: "rhs", category: normalizeCategory("expression", "literal"), parts: [{ slug: eqMatch[2], category: ["literal"] }] }
|
|
6585
|
+
{ slug: "lhs", category: (0, import_player_core.normalizeCategory)("expression", "path"), parts: [{ slug: eqMatch[1], category: ["binding"] }] },
|
|
6586
|
+
{ slug: "rhs", category: (0, import_player_core.normalizeCategory)("expression", "literal"), parts: [{ slug: eqMatch[2], category: ["literal"] }] }
|
|
6591
6587
|
]
|
|
6592
6588
|
}]
|
|
6593
6589
|
});
|
|
6594
6590
|
} else {
|
|
6595
6591
|
parts.push({
|
|
6596
6592
|
slug: "visible_when",
|
|
6597
|
-
category: normalizeCategory("expression", "guard"),
|
|
6593
|
+
category: (0, import_player_core.normalizeCategory)("expression", "guard"),
|
|
6598
6594
|
parts: [{ slug: node.visible_when, category: ["binding"] }]
|
|
6599
6595
|
});
|
|
6600
6596
|
}
|
|
@@ -6606,7 +6602,7 @@ function liftView(node) {
|
|
|
6606
6602
|
}
|
|
6607
6603
|
return {
|
|
6608
6604
|
slug: node.id,
|
|
6609
|
-
category: normalizeCategory("view", componentTag),
|
|
6605
|
+
category: (0, import_player_core.normalizeCategory)("view", componentTag),
|
|
6610
6606
|
parts: parts.length > 0 ? parts : void 0
|
|
6611
6607
|
};
|
|
6612
6608
|
}
|
|
@@ -6627,7 +6623,7 @@ function emitCanonical(extracted, sourceFilename) {
|
|
|
6627
6623
|
}
|
|
6628
6624
|
parts.push({
|
|
6629
6625
|
slug: "manifest",
|
|
6630
|
-
category: normalizeCategory("meta", "manifest"),
|
|
6626
|
+
category: (0, import_player_core.normalizeCategory)("meta", "manifest"),
|
|
6631
6627
|
parts: [
|
|
6632
6628
|
{
|
|
6633
6629
|
slug: "workflows",
|
|
@@ -6648,7 +6644,7 @@ function emitCanonical(extracted, sourceFilename) {
|
|
|
6648
6644
|
let categoryArray;
|
|
6649
6645
|
if (category.includes("/")) {
|
|
6650
6646
|
const [primary, ...tags] = category.split("/");
|
|
6651
|
-
categoryArray = normalizeCategory(primary, ...tags);
|
|
6647
|
+
categoryArray = (0, import_player_core.normalizeCategory)(primary, ...tags);
|
|
6652
6648
|
} else {
|
|
6653
6649
|
categoryArray = [category];
|
|
6654
6650
|
}
|
|
@@ -7172,7 +7168,7 @@ function createVisitor(options = {}) {
|
|
|
7172
7168
|
if (mode === "strict" && STRICT_BANNED_HOOKS[hookName]) {
|
|
7173
7169
|
const error = {
|
|
7174
7170
|
code: STRICT_BANNED_HOOKS[hookName],
|
|
7175
|
-
message: `${hookName}() is not allowed in strict mode. Use @
|
|
7171
|
+
message: `${hookName}() is not allowed in strict mode. Use @mmapp/react effect hooks instead.`,
|
|
7176
7172
|
line: path.node.loc?.start.line,
|
|
7177
7173
|
column: path.node.loc?.start.column,
|
|
7178
7174
|
severity: "error"
|
|
@@ -7264,12 +7260,12 @@ function createVisitor(options = {}) {
|
|
|
7264
7260
|
}
|
|
7265
7261
|
}
|
|
7266
7262
|
if (mode !== "strict") return;
|
|
7267
|
-
if (source.startsWith("@
|
|
7263
|
+
if (source.startsWith("@mmapp/") || source.startsWith("@mmapp/") || source === "react" || source.startsWith("react/") || source.startsWith(".") || source.startsWith("/")) {
|
|
7268
7264
|
return;
|
|
7269
7265
|
}
|
|
7270
7266
|
const error = {
|
|
7271
7267
|
code: "STRICT_FORBIDDEN_IMPORT",
|
|
7272
|
-
message: `Import from '${source}' is not allowed in strict mode. Only @
|
|
7268
|
+
message: `Import from '${source}' is not allowed in strict mode. Only @mmapp/* and relative imports are permitted.`,
|
|
7273
7269
|
line: path.node.loc?.start.line,
|
|
7274
7270
|
column: path.node.loc?.start.column,
|
|
7275
7271
|
severity: "error"
|