@wireweave/core 4.0.0-beta.12 → 4.0.0-beta.13
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/app.cjs +50 -31
- package/dist/app.d.cts +3 -3
- package/dist/app.d.ts +3 -3
- package/dist/app.js +1 -31
- package/dist/chunk-3RWGG5EC.js +296 -342
- package/dist/chunk-4TMDPWPR.cjs +22 -32
- package/dist/{chunk-7VTK6LHL.cjs → chunk-4UZBGIGJ.cjs} +82 -97
- package/dist/chunk-5DGRIQDU.cjs +26 -44
- package/dist/chunk-ETV4XYOV.cjs +4 -6
- package/dist/{chunk-QOS4IC75.js → chunk-FS6A6EJ4.js} +28 -57
- package/dist/chunk-IMUVIIJR.cjs +317 -354
- package/dist/chunk-JJWAFHSV.js +2 -23
- package/dist/chunk-MD6MNOEQ.cjs +121 -142
- package/dist/chunk-PKBMQBKP.js +1 -3
- package/dist/chunk-R5WBZWBC.js +3 -19
- package/dist/chunk-V3HVWC7C.js +1 -32
- package/dist/chunk-XYACLXXF.js +4 -132
- package/dist/chunk-ZPHNXJRY.cjs +158 -180
- package/dist/{index-Da_B3eoM.d.ts → index-BGU_4N4W.d.ts} +2 -2
- package/dist/{index-G906GEtg.d.cts → index-BlNYFaZd.d.cts} +2 -2
- package/dist/{index-CghCKUPx.d.ts → index-Cx4-VXVS.d.ts} +2 -2
- package/dist/{index-Br7pNaf3.d.cts → index-DyXaMSgd.d.cts} +2 -2
- package/dist/index.cjs +738 -419
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +12 -385
- package/dist/interaction.cjs +26 -17
- package/dist/interaction.d.cts +2 -2
- package/dist/interaction.d.ts +2 -2
- package/dist/interaction.js +1 -17
- package/dist/parser.cjs +38 -21
- package/dist/parser.d.cts +3 -3
- package/dist/parser.d.ts +3 -3
- package/dist/parser.js +1 -21
- package/dist/renderer.cjs +124 -68
- package/dist/renderer.d.cts +104 -104
- package/dist/renderer.d.ts +104 -104
- package/dist/renderer.js +3 -68
- package/dist/spec.cjs +94 -49
- package/dist/spec.js +1 -49
- package/dist/{types-vhPCZpAW.d.cts → types-CGRi1k2N.d.cts} +1 -1
- package/dist/{types-vhPCZpAW.d.ts → types-CGRi1k2N.d.ts} +1 -1
- package/dist/{v4-types-Baz9yqAS.d.cts → v4-types-2ORUg6To.d.cts} +1 -1
- package/dist/{v4-types-Baz9yqAS.d.ts → v4-types-2ORUg6To.d.ts} +1 -1
- package/package.json +21 -23
- package/dist/chunk-WV724EAW.js +0 -0
- package/dist/chunk-XENFKHRC.cjs +0 -1
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
getV4SourceSpan,
|
|
5
|
-
parseV4
|
|
6
|
-
} from "./chunk-3RWGG5EC.js";
|
|
7
|
-
import {
|
|
8
|
-
renderSite
|
|
9
|
-
} from "./chunk-JJWAFHSV.js";
|
|
10
|
-
import {
|
|
11
|
-
__publicField
|
|
12
|
-
} from "./chunk-PKBMQBKP.js";
|
|
1
|
+
import { parseV4, digestV4, V4ParseError, getV4SourceSpan } from './chunk-3RWGG5EC.js';
|
|
2
|
+
import { renderSite } from './chunk-JJWAFHSV.js';
|
|
3
|
+
import { __publicField } from './chunk-PKBMQBKP.js';
|
|
13
4
|
|
|
14
5
|
// src/ast/component-parameters.ts
|
|
15
6
|
var PARAMETER_REFERENCE = /^\$([a-zA-Z_][a-zA-Z0-9_-]*)$/;
|
|
@@ -1322,20 +1313,18 @@ function linkAppV4(bundle) {
|
|
|
1322
1313
|
linker.expandAll();
|
|
1323
1314
|
linker.semantics();
|
|
1324
1315
|
if (linker.diagnostics.length > 0) return failed(linker.diagnostics);
|
|
1325
|
-
const sourceMap = linker.expanded.map(
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
})
|
|
1338
|
-
);
|
|
1316
|
+
const sourceMap = linker.expanded.map((entry) => ({
|
|
1317
|
+
renderedId: entry.renderedId,
|
|
1318
|
+
identity: entry.identity,
|
|
1319
|
+
moduleId: entry.owner.module.id,
|
|
1320
|
+
source: entry.source,
|
|
1321
|
+
invocationSources: entry.invocationSources,
|
|
1322
|
+
requirementRefs: stringArray(entry.node.attributes.requirementRefs),
|
|
1323
|
+
obligationRefs: stringArray(entry.node.attributes.obligationRefs),
|
|
1324
|
+
operationIds: asObjects(entry.node.attributes.on).flatMap(
|
|
1325
|
+
(handler) => asObjects(handler.operations).map((operation) => textValue(operation.id))
|
|
1326
|
+
)
|
|
1327
|
+
}));
|
|
1339
1328
|
const linked = freeze({
|
|
1340
1329
|
[linkedBrand]: true,
|
|
1341
1330
|
kind: "LinkedApp",
|
|
@@ -1402,20 +1391,18 @@ function componentUses(node) {
|
|
|
1402
1391
|
}
|
|
1403
1392
|
function referencesOf(pending) {
|
|
1404
1393
|
var _a;
|
|
1405
|
-
const inferred = componentUses(pending.input.node).map(
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
}
|
|
1418
|
-
);
|
|
1394
|
+
const inferred = componentUses(pending.input.node).map((use) => {
|
|
1395
|
+
var _a2;
|
|
1396
|
+
return {
|
|
1397
|
+
kind: "component",
|
|
1398
|
+
id: use.name,
|
|
1399
|
+
...use.namespace === void 0 ? {} : { namespace: use.namespace },
|
|
1400
|
+
source: {
|
|
1401
|
+
sourceId: pending.input.source.sourceId,
|
|
1402
|
+
location: (_a2 = use.loc) != null ? _a2 : pending.input.source.location
|
|
1403
|
+
}
|
|
1404
|
+
};
|
|
1405
|
+
});
|
|
1419
1406
|
return [...(_a = pending.input.references) != null ? _a : [], ...inferred];
|
|
1420
1407
|
}
|
|
1421
1408
|
function resolveReferences(pending, definitions, diagnostics) {
|
|
@@ -2521,7 +2508,6 @@ function runtimeEngine(program) {
|
|
|
2521
2508
|
);
|
|
2522
2509
|
return screen && (result.variant === void 0 || screen.variants.includes(result.variant)) ? result : null;
|
|
2523
2510
|
} catch (error) {
|
|
2524
|
-
void error;
|
|
2525
2511
|
return null;
|
|
2526
2512
|
}
|
|
2527
2513
|
}
|
|
@@ -2713,7 +2699,6 @@ function runtimeEngine(program) {
|
|
|
2713
2699
|
const url = new URL(text);
|
|
2714
2700
|
if (!url.protocol) return "url";
|
|
2715
2701
|
} catch (error) {
|
|
2716
|
-
void error;
|
|
2717
2702
|
return "url";
|
|
2718
2703
|
}
|
|
2719
2704
|
}
|
|
@@ -4357,18 +4342,4 @@ function renderSite2(bundle) {
|
|
|
4357
4342
|
return linked.ok ? compileAppV4(linked.value) : linked;
|
|
4358
4343
|
}
|
|
4359
4344
|
|
|
4360
|
-
export {
|
|
4361
|
-
parameterReferenceName,
|
|
4362
|
-
collectParameterReferences,
|
|
4363
|
-
createAppBundle,
|
|
4364
|
-
createAppNodeId,
|
|
4365
|
-
createAppComponentInstanceId,
|
|
4366
|
-
linkApp,
|
|
4367
|
-
compileApp,
|
|
4368
|
-
linkAndCompileApp,
|
|
4369
|
-
createRuntime,
|
|
4370
|
-
reduceEvent,
|
|
4371
|
-
advanceClock,
|
|
4372
|
-
resetRuntime,
|
|
4373
|
-
renderSite2 as renderSite
|
|
4374
|
-
};
|
|
4345
|
+
export { advanceClock, collectParameterReferences, compileApp, createAppBundle, createAppComponentInstanceId, createAppNodeId, createRuntime, linkAndCompileApp, linkApp, parameterReferenceName, reduceEvent, renderSite2 as renderSite, resetRuntime };
|