@trops/dash-core 0.1.431 → 0.1.433
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/electron/index.js +23 -1
- package/dist/electron/index.js.map +1 -1
- package/dist/index.esm.js +274 -76
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +235 -43
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/electron/index.js
CHANGED
|
@@ -64538,6 +64538,7 @@ function remapLayoutPackageScopes$1(
|
|
|
64538
64538
|
const localScopeSet = new Set(
|
|
64539
64539
|
localOnlyScopes.map((s) => String(s).replace(/^@/, "")),
|
|
64540
64540
|
);
|
|
64541
|
+
const callerScopeBare = String(callerScope).replace(/^@/, "");
|
|
64541
64542
|
const remapPackageId = (pkgId) => {
|
|
64542
64543
|
if (typeof pkgId !== "string" || pkgId.length === 0) return pkgId;
|
|
64543
64544
|
// Match `@<scope>/<rest>` or `<scope>/<rest>`. Tolerant of either form.
|
|
@@ -64546,7 +64547,24 @@ function remapLayoutPackageScopes$1(
|
|
|
64546
64547
|
const scope = m[1];
|
|
64547
64548
|
const rest = m[2];
|
|
64548
64549
|
if (!localScopeSet.has(scope)) return pkgId;
|
|
64549
|
-
return `@${
|
|
64550
|
+
return `@${callerScopeBare}/${rest}`;
|
|
64551
|
+
};
|
|
64552
|
+
// Layout items now carry a SCOPED `component` (e.g.
|
|
64553
|
+
// "ai-built.pipeline.ProspectListColumn"). On publish we have to
|
|
64554
|
+
// rewrite the scope segment to the caller's so the installer can
|
|
64555
|
+
// resolve the same component against its registry-installed widget
|
|
64556
|
+
// (which lives under "@<caller>/pipeline"). Bare component names
|
|
64557
|
+
// (legacy layouts) pass through untouched — ComponentManager's
|
|
64558
|
+
// bare-name fallback handles them on the install side.
|
|
64559
|
+
const remapComponent = (component) => {
|
|
64560
|
+
if (typeof component !== "string" || component.length === 0) {
|
|
64561
|
+
return component;
|
|
64562
|
+
}
|
|
64563
|
+
const parts = component.split(".");
|
|
64564
|
+
if (parts.length !== 3) return component;
|
|
64565
|
+
const [scope, pkg, comp] = parts;
|
|
64566
|
+
if (!localScopeSet.has(scope)) return component;
|
|
64567
|
+
return `${callerScopeBare}.${pkg}.${comp}`;
|
|
64550
64568
|
};
|
|
64551
64569
|
const remapItem = (item) => {
|
|
64552
64570
|
if (!item || typeof item !== "object") return item;
|
|
@@ -64559,6 +64577,10 @@ function remapLayoutPackageScopes$1(
|
|
|
64559
64577
|
const remapped = remapPackageId(item._sourcePackage);
|
|
64560
64578
|
if (remapped !== item._sourcePackage) next._sourcePackage = remapped;
|
|
64561
64579
|
}
|
|
64580
|
+
if (item.component) {
|
|
64581
|
+
const remapped = remapComponent(item.component);
|
|
64582
|
+
if (remapped !== item.component) next.component = remapped;
|
|
64583
|
+
}
|
|
64562
64584
|
if (Array.isArray(item.items)) next.items = item.items.map(remapItem);
|
|
64563
64585
|
if (Array.isArray(item.layout)) next.layout = item.layout.map(remapItem);
|
|
64564
64586
|
return next;
|