@magmonium/cli 0.8.16 → 0.8.17
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/codegen/index.js +267 -7
- package/package.json +1 -1
package/codegen/index.js
CHANGED
|
@@ -23,6 +23,8 @@ __export(index_exports, {
|
|
|
23
23
|
ALL_VARIANT: () => ALL_VARIANT,
|
|
24
24
|
API_SEGMENT: () => API_SEGMENT,
|
|
25
25
|
APP_CONFIG_SOURCE: () => APP_CONFIG_SOURCE,
|
|
26
|
+
APP_LOGO_VALUE_ASSET: () => APP_LOGO_VALUE_ASSET,
|
|
27
|
+
APP_LOGO_VALUE_SLOTS: () => APP_LOGO_VALUE_SLOTS,
|
|
26
28
|
APP_MODES: () => APP_MODES,
|
|
27
29
|
APP_RELEASE_DOC: () => APP_RELEASE_DOC,
|
|
28
30
|
APP_ROOT_IMPORTS: () => APP_ROOT_IMPORTS,
|
|
@@ -250,7 +252,9 @@ __export(index_exports, {
|
|
|
250
252
|
QUANTIFIER_LABELS: () => QUANTIFIER_LABELS,
|
|
251
253
|
RANGED_SURFACE_KEYS: () => RANGED_SURFACE_KEYS,
|
|
252
254
|
RAW_CONFIG_SOURCE: () => RAW_CONFIG_SOURCE,
|
|
255
|
+
REMOTE_APP_COLOR_KEY: () => REMOTE_APP_COLOR_KEY,
|
|
253
256
|
REMOTE_BETA_KEY: () => REMOTE_BETA_KEY,
|
|
257
|
+
REMOTE_GLYPH_KEY: () => REMOTE_GLYPH_KEY,
|
|
254
258
|
REMOTE_MOUNT_KEY: () => REMOTE_MOUNT_KEY,
|
|
255
259
|
REMOTE_MOUNT_NAME_KEY: () => REMOTE_MOUNT_NAME_KEY,
|
|
256
260
|
REMOTE_URL_SLOT_KEY: () => REMOTE_URL_SLOT_KEY,
|
|
@@ -399,6 +403,7 @@ __export(index_exports, {
|
|
|
399
403
|
cacheMethodReads: () => cacheMethodReads,
|
|
400
404
|
callArgBindingOptions: () => callArgBindingOptions,
|
|
401
405
|
callArgBindingRead: () => callArgBindingRead,
|
|
406
|
+
callArgCoverage: () => callArgCoverage,
|
|
402
407
|
callArgEventAllowed: () => callArgEventAllowed,
|
|
403
408
|
callArgEventKey: () => callArgEventKey,
|
|
404
409
|
callArgEventMismatch: () => callArgEventMismatch,
|
|
@@ -1034,8 +1039,10 @@ __export(index_exports, {
|
|
|
1034
1039
|
moveMenuGroup: () => moveMenuGroup,
|
|
1035
1040
|
moveMenuItem: () => moveMenuItem,
|
|
1036
1041
|
moveOutputArm: () => moveOutputArm,
|
|
1042
|
+
moveOutputBlock: () => moveOutputBlock,
|
|
1037
1043
|
moveOutputCall: () => moveOutputCall,
|
|
1038
1044
|
moveOutputCallRows: () => moveOutputCallRows,
|
|
1045
|
+
moveOutputCallTo: () => moveOutputCallTo,
|
|
1039
1046
|
moveRuleNode: () => moveRuleNode,
|
|
1040
1047
|
moveSpacingToStyleDirectives: () => moveSpacingToStyleDirectives,
|
|
1041
1048
|
namedShapes: () => namedShapes,
|
|
@@ -1161,6 +1168,7 @@ __export(index_exports, {
|
|
|
1161
1168
|
outputCallKey: () => outputCallKey,
|
|
1162
1169
|
outputCallKeys: () => outputCallKeys,
|
|
1163
1170
|
outputCallLabel: () => outputCallLabel,
|
|
1171
|
+
outputGroupHoldsBlocks: () => outputGroupHoldsBlocks,
|
|
1164
1172
|
outputLinkBindingTargets: () => outputLinkBindingTargets,
|
|
1165
1173
|
outputLinkMemberName: () => outputLinkMemberName,
|
|
1166
1174
|
outputLinkParamType: () => outputLinkParamType,
|
|
@@ -1289,6 +1297,7 @@ __export(index_exports, {
|
|
|
1289
1297
|
removeMenuGroup: () => removeMenuGroup,
|
|
1290
1298
|
removeMenuItem: () => removeMenuItem,
|
|
1291
1299
|
removeOutputArm: () => removeOutputArm,
|
|
1300
|
+
removeOutputArmKeepingBlocks: () => removeOutputArmKeepingBlocks,
|
|
1292
1301
|
removeOutputCall: () => removeOutputCall,
|
|
1293
1302
|
removeRuleNode: () => removeRuleNode,
|
|
1294
1303
|
removeScreenOutputCall: () => removeScreenOutputCall,
|
|
@@ -1543,6 +1552,7 @@ __export(index_exports, {
|
|
|
1543
1552
|
textSourcesFor: () => textSourcesFor,
|
|
1544
1553
|
themeFileSource: () => themeFileSource,
|
|
1545
1554
|
themeVarsStyle: () => themeVarsStyle,
|
|
1555
|
+
tidyOutputArms: () => tidyOutputArms,
|
|
1546
1556
|
tierOf: () => tierOf,
|
|
1547
1557
|
timerError: () => timerError,
|
|
1548
1558
|
timerPropertyIds: () => timerPropertyIds,
|
|
@@ -1678,6 +1688,7 @@ var ControlType = /* @__PURE__ */ ((ControlType2) => {
|
|
|
1678
1688
|
ControlType2["ICON"] = "icon";
|
|
1679
1689
|
ControlType2["NAV_HEADER"] = "nav_header";
|
|
1680
1690
|
ControlType2["LOGO"] = "logo";
|
|
1691
|
+
ControlType2["APP_LOGO"] = "app_logo";
|
|
1681
1692
|
ControlType2["IMG"] = "img";
|
|
1682
1693
|
ControlType2["DOC"] = "doc";
|
|
1683
1694
|
ControlType2["USER"] = "user";
|
|
@@ -2942,6 +2953,68 @@ var SHARED_ICONS = [
|
|
|
2942
2953
|
// libs/one/src/lib/shared/lib/app-identity/app-logo-icon.ts
|
|
2943
2954
|
var APP_LOGO_ICON = "app_logo";
|
|
2944
2955
|
|
|
2956
|
+
// libs/one/src/lib/shared/lib/app-identity/logo-glyph.ts
|
|
2957
|
+
var LOGO_GLYPH_MAX_BYTES = 16 * 1024;
|
|
2958
|
+
var APP_COLOR = /^#[0-9a-fA-F]{6}$/;
|
|
2959
|
+
var normalizeAppColor = (value) => APP_COLOR.test(value.trim()) ? value.trim().toLowerCase() : void 0;
|
|
2960
|
+
var logoGlyphMaskUrl = (svg) => `url("data:image/svg+xml;utf8,${encodeURIComponent(svg)}")`;
|
|
2961
|
+
|
|
2962
|
+
// libs/one/src/lib/shared/lib/app-identity/splash.ts
|
|
2963
|
+
var SPLASH_ID = "m-splash";
|
|
2964
|
+
var escapeHtml = (value) => value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
2965
|
+
var splashHtml = ({ appColor, glyph, link }) => {
|
|
2966
|
+
const color = normalizeAppColor(appColor) ?? "#0f172a";
|
|
2967
|
+
const mark = glyph?.trim() ? `<div class="${SPLASH_ID}__glyph"></div>` : `<div class="${SPLASH_ID}__letter">${escapeHtml(link.trim().charAt(0).toUpperCase())}</div>`;
|
|
2968
|
+
const mask = glyph?.trim() ? `
|
|
2969
|
+
#${SPLASH_ID} .${SPLASH_ID}__glyph {
|
|
2970
|
+
width: 100%;
|
|
2971
|
+
height: 100%;
|
|
2972
|
+
background: #fff;
|
|
2973
|
+
-webkit-mask: ${logoGlyphMaskUrl(glyph.trim())} center / contain no-repeat;
|
|
2974
|
+
mask: ${logoGlyphMaskUrl(glyph.trim())} center / contain no-repeat;
|
|
2975
|
+
}` : "";
|
|
2976
|
+
return ` <div id="${SPLASH_ID}">
|
|
2977
|
+
<div class="${SPLASH_ID}__mark" aria-hidden="true">${mark}</div>
|
|
2978
|
+
<style>
|
|
2979
|
+
#${SPLASH_ID} {
|
|
2980
|
+
position: fixed;
|
|
2981
|
+
inset: 0;
|
|
2982
|
+
display: flex;
|
|
2983
|
+
align-items: center;
|
|
2984
|
+
justify-content: center;
|
|
2985
|
+
background: ${color};
|
|
2986
|
+
z-index: 99999;
|
|
2987
|
+
transition: opacity 0.35s ease, visibility 0.35s ease;
|
|
2988
|
+
}
|
|
2989
|
+
#${SPLASH_ID}.hidden {
|
|
2990
|
+
opacity: 0;
|
|
2991
|
+
visibility: hidden;
|
|
2992
|
+
pointer-events: none;
|
|
2993
|
+
}
|
|
2994
|
+
#${SPLASH_ID} .${SPLASH_ID}__mark {
|
|
2995
|
+
display: flex;
|
|
2996
|
+
align-items: center;
|
|
2997
|
+
justify-content: center;
|
|
2998
|
+
width: 72px;
|
|
2999
|
+
height: 72px;
|
|
3000
|
+
animation: m-splash-breathe 1.6s ease-in-out infinite;
|
|
3001
|
+
}${mask}
|
|
3002
|
+
#${SPLASH_ID} .${SPLASH_ID}__letter {
|
|
3003
|
+
color: #fff;
|
|
3004
|
+
font: 700 56px/1 system-ui, sans-serif;
|
|
3005
|
+
}
|
|
3006
|
+
@keyframes m-splash-breathe {
|
|
3007
|
+
0%, 100% { opacity: 1; transform: scale(1); }
|
|
3008
|
+
50% { opacity: 0.55; transform: scale(0.93); }
|
|
3009
|
+
}
|
|
3010
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3011
|
+
#${SPLASH_ID} .${SPLASH_ID}__mark { animation: none; }
|
|
3012
|
+
}
|
|
3013
|
+
</style>
|
|
3014
|
+
</div>
|
|
3015
|
+
`;
|
|
3016
|
+
};
|
|
3017
|
+
|
|
2945
3018
|
// libs/one/src/lib/shared/ui/doc/doc-style.ts
|
|
2946
3019
|
var DEFAULT_DOC_VARIANT = "plain";
|
|
2947
3020
|
var DEFAULT_DOC_DENSITY = "default";
|
|
@@ -3109,6 +3182,7 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3109
3182
|
"text" /* TEXT_OUTPUT */,
|
|
3110
3183
|
"icon" /* ICON */,
|
|
3111
3184
|
"logo" /* LOGO */,
|
|
3185
|
+
"app_logo" /* APP_LOGO */,
|
|
3112
3186
|
"img" /* IMG */,
|
|
3113
3187
|
"doc" /* DOC */,
|
|
3114
3188
|
"remote" /* REMOTE */,
|
|
@@ -3161,6 +3235,7 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3161
3235
|
"text" /* TEXT_OUTPUT */,
|
|
3162
3236
|
"icon" /* ICON */,
|
|
3163
3237
|
"logo" /* LOGO */,
|
|
3238
|
+
"app_logo" /* APP_LOGO */,
|
|
3164
3239
|
"img" /* IMG */,
|
|
3165
3240
|
"user" /* USER */,
|
|
3166
3241
|
"stat" /* STAT */,
|
|
@@ -3181,6 +3256,7 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3181
3256
|
"text" /* TEXT_OUTPUT */,
|
|
3182
3257
|
"icon" /* ICON */,
|
|
3183
3258
|
"logo" /* LOGO */,
|
|
3259
|
+
"app_logo" /* APP_LOGO */,
|
|
3184
3260
|
"img" /* IMG */,
|
|
3185
3261
|
"doc" /* DOC */,
|
|
3186
3262
|
"remote" /* REMOTE */,
|
|
@@ -3211,6 +3287,7 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3211
3287
|
"text" /* TEXT_OUTPUT */,
|
|
3212
3288
|
"icon" /* ICON */,
|
|
3213
3289
|
"logo" /* LOGO */,
|
|
3290
|
+
"app_logo" /* APP_LOGO */,
|
|
3214
3291
|
"img" /* IMG */,
|
|
3215
3292
|
"doc" /* DOC */,
|
|
3216
3293
|
"remote" /* REMOTE */,
|
|
@@ -3245,6 +3322,7 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3245
3322
|
"text" /* TEXT_OUTPUT */,
|
|
3246
3323
|
"icon" /* ICON */,
|
|
3247
3324
|
"logo" /* LOGO */,
|
|
3325
|
+
"app_logo" /* APP_LOGO */,
|
|
3248
3326
|
"img" /* IMG */,
|
|
3249
3327
|
"doc" /* DOC */,
|
|
3250
3328
|
"remote" /* REMOTE */,
|
|
@@ -3275,6 +3353,7 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3275
3353
|
"text" /* TEXT_OUTPUT */,
|
|
3276
3354
|
"icon" /* ICON */,
|
|
3277
3355
|
"logo" /* LOGO */,
|
|
3356
|
+
"app_logo" /* APP_LOGO */,
|
|
3278
3357
|
"img" /* IMG */,
|
|
3279
3358
|
"doc" /* DOC */,
|
|
3280
3359
|
"remote" /* REMOTE */,
|
|
@@ -3338,6 +3417,7 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3338
3417
|
"text" /* TEXT_OUTPUT */,
|
|
3339
3418
|
"icon" /* ICON */,
|
|
3340
3419
|
"logo" /* LOGO */,
|
|
3420
|
+
"app_logo" /* APP_LOGO */,
|
|
3341
3421
|
"img" /* IMG */,
|
|
3342
3422
|
"doc" /* DOC */,
|
|
3343
3423
|
"remote" /* REMOTE */,
|
|
@@ -3398,6 +3478,8 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3398
3478
|
["icon" /* ICON */]: [],
|
|
3399
3479
|
// Same leaf rule as an Icon — a brand mark is content, not structure.
|
|
3400
3480
|
["logo" /* LOGO */]: [],
|
|
3481
|
+
// A leaf for the Logo's reason: an AppLogo is content, not structure.
|
|
3482
|
+
["app_logo" /* APP_LOGO */]: [],
|
|
3401
3483
|
["doc" /* DOC */]: [],
|
|
3402
3484
|
["remote" /* REMOTE */]: [],
|
|
3403
3485
|
["plugin" /* PLUGIN */]: [],
|
|
@@ -3639,6 +3721,7 @@ var OWN_DIRECTIVES = {
|
|
|
3639
3721
|
["text" /* TEXT_OUTPUT */]: ["routerLink"],
|
|
3640
3722
|
["icon" /* ICON */]: ["routerLink"],
|
|
3641
3723
|
["logo" /* LOGO */]: ["routerLink"],
|
|
3724
|
+
["app_logo" /* APP_LOGO */]: ["routerLink"],
|
|
3642
3725
|
// A document carries no directive: it is prose, not a link and not a target.
|
|
3643
3726
|
["doc" /* DOC */]: [],
|
|
3644
3727
|
["remote" /* REMOTE */]: [],
|
|
@@ -3798,6 +3881,8 @@ var CONTROL_LABEL = {
|
|
|
3798
3881
|
["text" /* TEXT_OUTPUT */]: "text",
|
|
3799
3882
|
["icon" /* ICON */]: "icon",
|
|
3800
3883
|
["logo" /* LOGO */]: "logo",
|
|
3884
|
+
// Not `app-logo`: a palette chip needs a key of its own.
|
|
3885
|
+
["app_logo" /* APP_LOGO */]: "app-logo-control",
|
|
3801
3886
|
["img" /* IMG */]: "img",
|
|
3802
3887
|
["doc" /* DOC */]: "doc",
|
|
3803
3888
|
["remote" /* REMOTE */]: "remote-control",
|
|
@@ -3861,6 +3946,7 @@ var CONTROL_ICON = {
|
|
|
3861
3946
|
["text" /* TEXT_OUTPUT */]: "control_text",
|
|
3862
3947
|
["icon" /* ICON */]: "control_icon",
|
|
3863
3948
|
["logo" /* LOGO */]: "control_logo",
|
|
3949
|
+
["app_logo" /* APP_LOGO */]: "control_logo",
|
|
3864
3950
|
["img" /* IMG */]: "control_img",
|
|
3865
3951
|
// Reuse the code-file glyph until document artwork joins the shared set.
|
|
3866
3952
|
["doc" /* DOC */]: "control_text",
|
|
@@ -4068,6 +4154,12 @@ var CONTROL_CODEGEN = {
|
|
|
4068
4154
|
// `fill`, `width`, `height`, `priority`, `sizes`, `ngSrcset`, `remote`,
|
|
4069
4155
|
// `data` and `dataType` as individual inputs rather than a `config` bag, so
|
|
4070
4156
|
// there is nothing a `name="<id>"` could resolve.
|
|
4157
|
+
// Folderless for the Logo's reason — AppLogoComponent takes `link`,
|
|
4158
|
+
// `variant`, `tone` and `size` as individual inputs.
|
|
4159
|
+
["app_logo" /* APP_LOGO */]: {
|
|
4160
|
+
tag: "m-app-logo",
|
|
4161
|
+
component: "AppLogoComponent"
|
|
4162
|
+
},
|
|
4071
4163
|
["img" /* IMG */]: {
|
|
4072
4164
|
tag: "m-img",
|
|
4073
4165
|
component: "ImgComponent"
|
|
@@ -6473,6 +6565,7 @@ var FALLBACK_SLOTS = [
|
|
|
6473
6565
|
];
|
|
6474
6566
|
var IMG_VALUE_SLOTS = [BINDING_SLOT.src];
|
|
6475
6567
|
var REMOTE_VALUE_SLOTS = [BINDING_SLOT.link, BINDING_SLOT.path];
|
|
6568
|
+
var APP_LOGO_VALUE_SLOTS = [BINDING_SLOT.link];
|
|
6476
6569
|
var AUDIENCE_PICKER_VALUE_SLOTS = [
|
|
6477
6570
|
BINDING_SLOT.audience,
|
|
6478
6571
|
BINDING_SLOT.source
|
|
@@ -6558,6 +6651,9 @@ var REMOTE_VALUE_ASSET = {
|
|
|
6558
6651
|
[BINDING_SLOT.link]: "remote_link",
|
|
6559
6652
|
[BINDING_SLOT.path]: "remote_path"
|
|
6560
6653
|
};
|
|
6654
|
+
var APP_LOGO_VALUE_ASSET = {
|
|
6655
|
+
[BINDING_SLOT.link]: "app_logo_link"
|
|
6656
|
+
};
|
|
6561
6657
|
var REMOTE_VALUE_LABEL = {
|
|
6562
6658
|
[BINDING_SLOT.link]: "remote-link",
|
|
6563
6659
|
[BINDING_SLOT.path]: "remote-path"
|
|
@@ -8527,6 +8623,16 @@ var rowComplete = (row, target, payload, fieldNames, constants, functions, scope
|
|
|
8527
8623
|
}
|
|
8528
8624
|
return void 0;
|
|
8529
8625
|
};
|
|
8626
|
+
function callArgCoverage(args, rows) {
|
|
8627
|
+
const leaves = requiredCallArgLeaves(args);
|
|
8628
|
+
const mapped = rows.map((row) => targetKey(row.target));
|
|
8629
|
+
return {
|
|
8630
|
+
covered: leaves.filter(
|
|
8631
|
+
(leaf) => mapped.some((key2) => covers(key2, targetKey(leaf.path)))
|
|
8632
|
+
).length,
|
|
8633
|
+
total: leaves.length
|
|
8634
|
+
};
|
|
8635
|
+
}
|
|
8530
8636
|
function validateCallArgs(args, rows, payload, fieldNames = [], constants = {}, functions = {}, scope = {}) {
|
|
8531
8637
|
const targets = callArgTargets(args);
|
|
8532
8638
|
const keys = targets.map((t) => targetKey(t.target));
|
|
@@ -8938,6 +9044,20 @@ function moveOutputCall(control, key2, delta) {
|
|
|
8938
9044
|
])
|
|
8939
9045
|
);
|
|
8940
9046
|
}
|
|
9047
|
+
function moveOutputCallTo(control, key2, toGroup) {
|
|
9048
|
+
if (outputCallGroupKey(key2) === toGroup) return { control, key: key2 };
|
|
9049
|
+
const bag = callRowsAt(control, key2);
|
|
9050
|
+
const left = removeOutputCall(control, key2);
|
|
9051
|
+
const opensGroup = !isOutputCallBound(left, toGroup) && !Object.keys(callRowsAt(left, toGroup)).length && !outputCallIds(left, toGroup).length;
|
|
9052
|
+
if (opensGroup) {
|
|
9053
|
+
return { control: writeCallRows(left, [[toGroup, bag]]), key: toGroup };
|
|
9054
|
+
}
|
|
9055
|
+
const minted = mintOutputCall(left, toGroup);
|
|
9056
|
+
return {
|
|
9057
|
+
control: writeCallRows(minted.control, [[minted.key, bag]]),
|
|
9058
|
+
key: minted.key
|
|
9059
|
+
};
|
|
9060
|
+
}
|
|
8941
9061
|
function moveOutputCallRows(control, from, to) {
|
|
8942
9062
|
const ids = outputCallIds(control, from);
|
|
8943
9063
|
if (!ids.length) return control;
|
|
@@ -10016,6 +10136,103 @@ function removeOutputArm(control, output, armId) {
|
|
|
10016
10136
|
);
|
|
10017
10137
|
return clearRows(dropped, outputArmKey(output, armId));
|
|
10018
10138
|
}
|
|
10139
|
+
var BLOCK_LIST_MAPS = {
|
|
10140
|
+
"state-write": "outputWrites",
|
|
10141
|
+
"screen-write": "outputScreenWrites",
|
|
10142
|
+
emit: "outputEmits"
|
|
10143
|
+
};
|
|
10144
|
+
var BLOCK_ONE_MAPS = {
|
|
10145
|
+
open: "outputOpens",
|
|
10146
|
+
navigate: "outputNavs",
|
|
10147
|
+
"new-tab": "outputNewTabs"
|
|
10148
|
+
};
|
|
10149
|
+
var writeKey = (rows, key2, value) => {
|
|
10150
|
+
const { [key2]: _dropped, ...rest } = rows ?? {};
|
|
10151
|
+
const next = value === void 0 ? rest : { ...rest, [key2]: value };
|
|
10152
|
+
return Object.keys(next).length ? next : void 0;
|
|
10153
|
+
};
|
|
10154
|
+
function moveOutputBlock(control, from, block2, to) {
|
|
10155
|
+
if (from === to) return control;
|
|
10156
|
+
if (block2.kind === "call") {
|
|
10157
|
+
const key2 = outputCallKeys(control, from)[block2.index];
|
|
10158
|
+
if (!key2) return void 0;
|
|
10159
|
+
return moveOutputCallTo(control, key2, to).control;
|
|
10160
|
+
}
|
|
10161
|
+
if (block2.kind in BLOCK_LIST_MAPS) {
|
|
10162
|
+
const map2 = BLOCK_LIST_MAPS[block2.kind];
|
|
10163
|
+
const all2 = control[map2];
|
|
10164
|
+
const rows = all2?.[from] ?? [];
|
|
10165
|
+
const row2 = rows[block2.index];
|
|
10166
|
+
if (row2 === void 0) return void 0;
|
|
10167
|
+
const left = rows.filter((_, index) => index !== block2.index);
|
|
10168
|
+
const withLeft = writeKey(all2, from, left.length ? left : void 0);
|
|
10169
|
+
return {
|
|
10170
|
+
...control,
|
|
10171
|
+
[map2]: writeKey(withLeft, to, [...all2?.[to] ?? [], row2])
|
|
10172
|
+
};
|
|
10173
|
+
}
|
|
10174
|
+
const map = BLOCK_ONE_MAPS[block2.kind];
|
|
10175
|
+
const all = control[map];
|
|
10176
|
+
const row = all?.[from];
|
|
10177
|
+
if (!row) return void 0;
|
|
10178
|
+
const destinations = block2.kind === "new-tab" ? [map] : ["outputOpens", "outputNavs"];
|
|
10179
|
+
if (destinations.some(
|
|
10180
|
+
(one) => control[one]?.[to]
|
|
10181
|
+
)) {
|
|
10182
|
+
return void 0;
|
|
10183
|
+
}
|
|
10184
|
+
return {
|
|
10185
|
+
...control,
|
|
10186
|
+
[map]: writeKey(writeKey(all, from, void 0), to, row)
|
|
10187
|
+
};
|
|
10188
|
+
}
|
|
10189
|
+
var outputGroupHoldsBlocks = (control, key2) => Object.keys(rowsAt(control, key2)).length > 0 || (control.outputEmits?.[key2]?.length ?? 0) > 0 || outputCallIds(control, key2).length > 0;
|
|
10190
|
+
function tidyOutputArms(control, output) {
|
|
10191
|
+
let next = control;
|
|
10192
|
+
for (const arm of outputArms(next, output)) {
|
|
10193
|
+
const key2 = outputArmKey(output, arm.id);
|
|
10194
|
+
if (outputArmMode(arm) === "condition" && !outputGroupHoldsBlocks(next, key2)) {
|
|
10195
|
+
next = removeOutputArm(next, output, arm.id);
|
|
10196
|
+
}
|
|
10197
|
+
}
|
|
10198
|
+
const folds = outputArms(next, output).filter(
|
|
10199
|
+
(arm) => outputArmMode(arm) === "always" || outputArmMode(arm) === "default" && !scannedOutputArms(next, output).length
|
|
10200
|
+
);
|
|
10201
|
+
for (const arm of folds) {
|
|
10202
|
+
next = foldOutputGroup(next, outputArmKey(output, arm.id), output);
|
|
10203
|
+
if (!outputGroupHoldsBlocks(next, outputArmKey(output, arm.id))) {
|
|
10204
|
+
next = removeOutputArm(next, output, arm.id);
|
|
10205
|
+
}
|
|
10206
|
+
}
|
|
10207
|
+
return next;
|
|
10208
|
+
}
|
|
10209
|
+
var foldOutputGroup = (control, from, to) => {
|
|
10210
|
+
let next = control;
|
|
10211
|
+
const tryMove = (block2) => {
|
|
10212
|
+
const moved = moveOutputBlock(next, from, block2, to);
|
|
10213
|
+
if (!moved) return false;
|
|
10214
|
+
next = moved;
|
|
10215
|
+
return true;
|
|
10216
|
+
};
|
|
10217
|
+
const firstCallHeld = isOutputCallBound(next, from) || !!next.outputArgs?.[from] || !!next.outputOutcomes?.[from];
|
|
10218
|
+
let calls = outputCallIds(next, from).length + (firstCallHeld ? 1 : 0);
|
|
10219
|
+
while (calls-- > 0) tryMove({ kind: "call", index: 0 });
|
|
10220
|
+
Object.keys(BLOCK_LIST_MAPS).forEach(
|
|
10221
|
+
(kind) => {
|
|
10222
|
+
const lists = next[BLOCK_LIST_MAPS[kind]];
|
|
10223
|
+
let left = lists?.[from]?.length ?? 0;
|
|
10224
|
+
while (left-- > 0) tryMove({ kind, index: 0 });
|
|
10225
|
+
}
|
|
10226
|
+
);
|
|
10227
|
+
Object.keys(BLOCK_ONE_MAPS).forEach(
|
|
10228
|
+
(kind) => void tryMove({ kind, index: 0 })
|
|
10229
|
+
);
|
|
10230
|
+
return next;
|
|
10231
|
+
};
|
|
10232
|
+
function removeOutputArmKeepingBlocks(control, output, armId) {
|
|
10233
|
+
const folded = foldOutputGroup(control, outputArmKey(output, armId), output);
|
|
10234
|
+
return tidyOutputArms(removeOutputArm(folded, output, armId), output);
|
|
10235
|
+
}
|
|
10019
10236
|
var newOutputArmCheck = (source = "event") => ({ id: genId(), source, operator: "==" });
|
|
10020
10237
|
var outputArmReadsVariable = (control, variableId) => everyOutputArmCheck(control).some(
|
|
10021
10238
|
(check) => check.source === "binding" && check.binding?.root.kind === "screen_variable" && check.binding.root.id === variableId
|
|
@@ -17477,6 +17694,8 @@ var REMOTE_URL_SYNC_KEY = "urlSync";
|
|
|
17477
17694
|
var REMOTE_URL_SLOT_KEY = "urlSlot";
|
|
17478
17695
|
var REMOTE_MOUNT_KEY = "mount";
|
|
17479
17696
|
var REMOTE_BETA_KEY = "beta";
|
|
17697
|
+
var REMOTE_GLYPH_KEY = "glyph";
|
|
17698
|
+
var REMOTE_APP_COLOR_KEY = "appColor";
|
|
17480
17699
|
var remoteUrlModeOf = (configs) => {
|
|
17481
17700
|
const sync = configs?.[REMOTE_URL_SYNC_KEY];
|
|
17482
17701
|
if (sync === true) {
|
|
@@ -19065,6 +19284,10 @@ function bodyConfigs(node) {
|
|
|
19065
19284
|
const path = String(configs["path"] ?? "").trim();
|
|
19066
19285
|
const beta = configs[REMOTE_BETA_KEY] === true;
|
|
19067
19286
|
const createMenu = configs["createMenu"] === true && urlMode !== "none";
|
|
19287
|
+
const glyph = String(configs[REMOTE_GLYPH_KEY] ?? "").trim();
|
|
19288
|
+
const appColor = normalizeAppColor(
|
|
19289
|
+
String(configs[REMOTE_APP_COLOR_KEY] ?? "")
|
|
19290
|
+
);
|
|
19068
19291
|
for (const key2 of Object.keys(configs)) delete configs[key2];
|
|
19069
19292
|
if (link) configs["link"] = link;
|
|
19070
19293
|
if (mountName) configs["name"] = mountName;
|
|
@@ -19073,6 +19296,19 @@ function bodyConfigs(node) {
|
|
|
19073
19296
|
if (urlMode === "none" && path) configs["path"] = path;
|
|
19074
19297
|
if (beta) configs["beta"] = true;
|
|
19075
19298
|
if (createMenu) configs["createMenu"] = true;
|
|
19299
|
+
if (glyph) configs[REMOTE_GLYPH_KEY] = escapeAttributeValue(glyph);
|
|
19300
|
+
if (appColor) configs[REMOTE_APP_COLOR_KEY] = appColor;
|
|
19301
|
+
}
|
|
19302
|
+
if (node.type === "app_logo" /* APP_LOGO */) {
|
|
19303
|
+
const link = String(configs["link"] ?? "").trim();
|
|
19304
|
+
const variant = configs["variant"] === "glow" ? "glow" : "tile";
|
|
19305
|
+
const tone = configs["tone"] === "light" ? "light" : "app";
|
|
19306
|
+
const size = String(configs["size"] ?? "").trim();
|
|
19307
|
+
for (const key2 of Object.keys(configs)) delete configs[key2];
|
|
19308
|
+
if (link) configs["link"] = link;
|
|
19309
|
+
if (variant === "glow") configs["variant"] = variant;
|
|
19310
|
+
if (variant === "glow" && tone === "light") configs["tone"] = tone;
|
|
19311
|
+
if (size) configs["size"] = size;
|
|
19076
19312
|
}
|
|
19077
19313
|
if (node.type === "plugin" /* PLUGIN */) {
|
|
19078
19314
|
const link = String(configs[PLUGIN_LINK_KEY] ?? "").trim();
|
|
@@ -19121,6 +19357,7 @@ var numberOnlyValue = (value) => {
|
|
|
19121
19357
|
const parsed2 = Number(value);
|
|
19122
19358
|
return Number.isFinite(parsed2) ? parsed2 : void 0;
|
|
19123
19359
|
};
|
|
19360
|
+
var escapeAttributeValue = (value) => value.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
19124
19361
|
function attrsFrom(configs, numberOnlyKeys = NUMBER_ONLY_KEYS) {
|
|
19125
19362
|
return Object.entries(configs).map(([key2, value]) => {
|
|
19126
19363
|
const figure = numberOnlyKeys.has(key2) ? numberOnlyValue(value) : void 0;
|
|
@@ -19586,6 +19823,7 @@ var attrBindingSlots = (type) => {
|
|
|
19586
19823
|
if (type === "audience_picker" /* AUDIENCE_PICKER */) return AUDIENCE_PICKER_VALUE_SLOTS;
|
|
19587
19824
|
if (type === "img" /* IMG */) return [BINDING_SLOT.src];
|
|
19588
19825
|
if (type === "remote" /* REMOTE */) return REMOTE_VALUE_SLOTS;
|
|
19826
|
+
if (type === "app_logo" /* APP_LOGO */) return APP_LOGO_VALUE_SLOTS;
|
|
19589
19827
|
if (type === "section_pagination" /* SECTION_PAGINATION */) return [BINDING_SLOT.total];
|
|
19590
19828
|
return hasTextSource(type) ? [BINDING_SLOT.label] : [];
|
|
19591
19829
|
};
|
|
@@ -19833,6 +20071,11 @@ function boundAttrs(node, ctx, storeProp) {
|
|
|
19833
20071
|
}
|
|
19834
20072
|
}
|
|
19835
20073
|
}
|
|
20074
|
+
if (node.type === "app_logo" /* APP_LOGO */) {
|
|
20075
|
+
const binding = bindings?.[BINDING_SLOT.link];
|
|
20076
|
+
const expr = binding && textBindingExpression(binding, scope);
|
|
20077
|
+
if (expr) parts.push(` [link]="${expr}"`);
|
|
20078
|
+
}
|
|
19836
20079
|
if (node.type === "user" /* USER */) {
|
|
19837
20080
|
for (const slot of USER_VALUE_SLOTS) {
|
|
19838
20081
|
const binding = bindings?.[slot];
|
|
@@ -19951,7 +20194,7 @@ function tagAttrs(node, ctx, storeProp) {
|
|
|
19951
20194
|
const resultAttrs = results ? ` [element]="${results.elementMember}" resultInput="${results.resultInput}"` : "";
|
|
19952
20195
|
return `${inlineAttrs(node)}${boundAttrs(node, ctx, storeProp)}${resultAttrs}`;
|
|
19953
20196
|
}
|
|
19954
|
-
if (node.type === "remote" /* REMOTE */ && ctx.controlMap?.[node.id]?.bindings?.[BINDING_SLOT.link]) {
|
|
20197
|
+
if ((node.type === "remote" /* REMOTE */ || node.type === "app_logo" /* APP_LOGO */) && ctx.controlMap?.[node.id]?.bindings?.[BINDING_SLOT.link]) {
|
|
19955
20198
|
const configs2 = { ...node.configs ?? {} };
|
|
19956
20199
|
delete configs2["link"];
|
|
19957
20200
|
return `${inlineAttrs({ ...node, configs: configs2 })}${boundAttrs(node, ctx, storeProp)}`;
|
|
@@ -20178,7 +20421,7 @@ function outputAttrs(node, methods, operationOf, storeProp, ctx) {
|
|
|
20178
20421
|
// with no handler attribute at all.
|
|
20179
20422
|
...Object.keys(node.outputEmits ?? {})
|
|
20180
20423
|
]);
|
|
20181
|
-
const gated =
|
|
20424
|
+
const gated = new Set(dispatched);
|
|
20182
20425
|
for (const key2 of [...outputs]) {
|
|
20183
20426
|
if (outputCallGroupKey(key2) !== key2) {
|
|
20184
20427
|
outputs.delete(key2);
|
|
@@ -22234,7 +22477,10 @@ function dispatchedOutputs(node, methods, operationOf, storeProp, ctx) {
|
|
|
22234
22477
|
}
|
|
22235
22478
|
function dispatcherFormRefs(node, output, methods, operationOf, storeProp, ctx) {
|
|
22236
22479
|
const folded = output === FOLDED_OUTPUT ? foldedClickGroups(node, methods, operationOf, storeProp, ctx) : [];
|
|
22237
|
-
const own =
|
|
22480
|
+
const own = [
|
|
22481
|
+
...directFormRefs(node, output, ctx),
|
|
22482
|
+
...gatedOutputs(node).includes(output) ? outputArmFormRefs(node, output, ctx, storeProp) : []
|
|
22483
|
+
];
|
|
22238
22484
|
const seen = /* @__PURE__ */ new Map();
|
|
22239
22485
|
[...own, ...folded.flatMap((group) => group.refs)].forEach(([id, ref]) => {
|
|
22240
22486
|
if (!seen.has(id)) seen.set(id, ref);
|
|
@@ -22281,7 +22527,7 @@ ${format(
|
|
|
22281
22527
|
)}
|
|
22282
22528
|
}`
|
|
22283
22529
|
);
|
|
22284
|
-
const direct =
|
|
22530
|
+
const direct = format(groupOf(output), " ");
|
|
22285
22531
|
const always = alwaysOutputArms(control, output).map((arm) => bodyOf(arm, " ")).filter(Boolean);
|
|
22286
22532
|
const chain = wired.map(({ arm, expr }) => {
|
|
22287
22533
|
const body2 = bodyOf(arm, " ");
|
|
@@ -24325,7 +24571,7 @@ __export(package_exports, {
|
|
|
24325
24571
|
version: () => version
|
|
24326
24572
|
});
|
|
24327
24573
|
var name = "@magmonium/one";
|
|
24328
|
-
var version = "0.4.
|
|
24574
|
+
var version = "0.4.47";
|
|
24329
24575
|
var description = "Magmonium One \u2014 Angular design-system primitives for mm Apps";
|
|
24330
24576
|
var author = "magmonium";
|
|
24331
24577
|
var license = "MIT";
|
|
@@ -24393,7 +24639,7 @@ __export(package_exports2, {
|
|
|
24393
24639
|
version: () => version2
|
|
24394
24640
|
});
|
|
24395
24641
|
var name2 = "@magmonium/cli";
|
|
24396
|
-
var version2 = "0.8.
|
|
24642
|
+
var version2 = "0.8.17";
|
|
24397
24643
|
var description2 = "A powerful and extensible asset compilation tool that can be shared across multiple projects";
|
|
24398
24644
|
var bin = {
|
|
24399
24645
|
"mag-cli": "bin/cli.js"
|
|
@@ -29670,7 +29916,11 @@ var indexHtml = (appName, config) => `<!doctype html>
|
|
|
29670
29916
|
<meta name="theme-color" content="${config.appColor || FALLBACK_APP_COLOR}" />
|
|
29671
29917
|
</head>
|
|
29672
29918
|
<body>
|
|
29673
|
-
${
|
|
29919
|
+
${splashHtml({
|
|
29920
|
+
appColor: config.appColor || FALLBACK_APP_COLOR,
|
|
29921
|
+
glyph: config.logoGlyph,
|
|
29922
|
+
link: appName
|
|
29923
|
+
})}${RUN_ASSET_CACHE_RESET} <m-one-root></m-one-root>
|
|
29674
29924
|
${RUN_FETCH_BRIDGE}${RUN_ROUTE_REPORTER} </body>
|
|
29675
29925
|
</html>
|
|
29676
29926
|
`;
|
|
@@ -32119,6 +32369,8 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
32119
32369
|
ALL_VARIANT,
|
|
32120
32370
|
API_SEGMENT,
|
|
32121
32371
|
APP_CONFIG_SOURCE,
|
|
32372
|
+
APP_LOGO_VALUE_ASSET,
|
|
32373
|
+
APP_LOGO_VALUE_SLOTS,
|
|
32122
32374
|
APP_MODES,
|
|
32123
32375
|
APP_RELEASE_DOC,
|
|
32124
32376
|
APP_ROOT_IMPORTS,
|
|
@@ -32346,7 +32598,9 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
32346
32598
|
QUANTIFIER_LABELS,
|
|
32347
32599
|
RANGED_SURFACE_KEYS,
|
|
32348
32600
|
RAW_CONFIG_SOURCE,
|
|
32601
|
+
REMOTE_APP_COLOR_KEY,
|
|
32349
32602
|
REMOTE_BETA_KEY,
|
|
32603
|
+
REMOTE_GLYPH_KEY,
|
|
32350
32604
|
REMOTE_MOUNT_KEY,
|
|
32351
32605
|
REMOTE_MOUNT_NAME_KEY,
|
|
32352
32606
|
REMOTE_URL_SLOT_KEY,
|
|
@@ -32495,6 +32749,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
32495
32749
|
cacheMethodReads,
|
|
32496
32750
|
callArgBindingOptions,
|
|
32497
32751
|
callArgBindingRead,
|
|
32752
|
+
callArgCoverage,
|
|
32498
32753
|
callArgEventAllowed,
|
|
32499
32754
|
callArgEventKey,
|
|
32500
32755
|
callArgEventMismatch,
|
|
@@ -33130,8 +33385,10 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
33130
33385
|
moveMenuGroup,
|
|
33131
33386
|
moveMenuItem,
|
|
33132
33387
|
moveOutputArm,
|
|
33388
|
+
moveOutputBlock,
|
|
33133
33389
|
moveOutputCall,
|
|
33134
33390
|
moveOutputCallRows,
|
|
33391
|
+
moveOutputCallTo,
|
|
33135
33392
|
moveRuleNode,
|
|
33136
33393
|
moveSpacingToStyleDirectives,
|
|
33137
33394
|
namedShapes,
|
|
@@ -33257,6 +33514,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
33257
33514
|
outputCallKey,
|
|
33258
33515
|
outputCallKeys,
|
|
33259
33516
|
outputCallLabel,
|
|
33517
|
+
outputGroupHoldsBlocks,
|
|
33260
33518
|
outputLinkBindingTargets,
|
|
33261
33519
|
outputLinkMemberName,
|
|
33262
33520
|
outputLinkParamType,
|
|
@@ -33385,6 +33643,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
33385
33643
|
removeMenuGroup,
|
|
33386
33644
|
removeMenuItem,
|
|
33387
33645
|
removeOutputArm,
|
|
33646
|
+
removeOutputArmKeepingBlocks,
|
|
33388
33647
|
removeOutputCall,
|
|
33389
33648
|
removeRuleNode,
|
|
33390
33649
|
removeScreenOutputCall,
|
|
@@ -33639,6 +33898,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
33639
33898
|
textSourcesFor,
|
|
33640
33899
|
themeFileSource,
|
|
33641
33900
|
themeVarsStyle,
|
|
33901
|
+
tidyOutputArms,
|
|
33642
33902
|
tierOf,
|
|
33643
33903
|
timerError,
|
|
33644
33904
|
timerPropertyIds,
|