@inf-monkeys-tech/monkeys 1.1.38 → 1.1.40
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/lib/contracts/declarative-control-http.d.ts +817 -190
- package/lib/contracts/declarative-control-http.d.ts.map +1 -1
- package/lib/contracts/declarative-control.d.ts +140 -30
- package/lib/contracts/declarative-control.d.ts.map +1 -1
- package/lib/contracts/declarative-control.js +101 -85
- package/lib/contracts/declarative-control.js.map +1 -1
- package/lib/contracts/declarative-document-import.d.ts +215 -50
- package/lib/contracts/declarative-document-import.d.ts.map +1 -1
- package/lib/contracts/declarative-publication-job.d.ts +172 -40
- package/lib/contracts/declarative-publication-job.d.ts.map +1 -1
- package/lib/esm/{chunk-MIG553ZW.mjs → chunk-5UMICQYH.mjs} +5 -3
- package/lib/esm/chunk-5UMICQYH.mjs.map +1 -0
- package/lib/esm/{chunk-RHIQIBBA.mjs → chunk-AJWWNJFI.mjs} +2 -2
- package/lib/esm/{chunk-V6RHZIZ4.mjs → chunk-FIIAQQUQ.mjs} +2 -2
- package/lib/esm/{chunk-QZ4R7KDA.mjs → chunk-G2HBRCFH.mjs} +94 -75
- package/lib/esm/chunk-G2HBRCFH.mjs.map +1 -0
- package/lib/esm/{chunk-5BYSA3KN.mjs → chunk-NIFHONOR.mjs} +3 -3
- package/lib/esm/{chunk-UJBIER7C.mjs → chunk-YYDR6UML.mjs} +2 -2
- package/lib/esm/contracts/index.mjs +8 -6
- package/lib/esm/index.mjs +10 -8
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +3 -3
- package/lib/esm/schemas/index.mjs +3 -3
- package/lib/json-schema/navigation-runtime-bundle.schema.json +470 -26
- package/lib/json-schema/navigation.schema.json +503 -26
- package/lib/runtime/declarative-control-compiler.d.ts.map +1 -1
- package/lib/runtime/declarative-control-compiler.js +2 -0
- package/lib/runtime/declarative-control-compiler.js.map +1 -1
- package/lib/runtime/runtime-definition-wire.d.ts +43 -10
- package/lib/runtime/runtime-definition-wire.d.ts.map +1 -1
- package/lib/schemas/index.d.ts +86 -20
- package/lib/schemas/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/lib/esm/chunk-MIG553ZW.mjs.map +0 -1
- package/lib/esm/chunk-QZ4R7KDA.mjs.map +0 -1
- /package/lib/esm/{chunk-RHIQIBBA.mjs.map → chunk-AJWWNJFI.mjs.map} +0 -0
- /package/lib/esm/{chunk-V6RHZIZ4.mjs.map → chunk-FIIAQQUQ.mjs.map} +0 -0
- /package/lib/esm/{chunk-5BYSA3KN.mjs.map → chunk-NIFHONOR.mjs.map} +0 -0
- /package/lib/esm/{chunk-UJBIER7C.mjs.map → chunk-YYDR6UML.mjs.map} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CursorWindowBindingSchema = exports.DomainQueryDefinitionSchema = exports.DomainQueryDataSourceSchema = exports.RegisteredServiceDomainQueryDataSourceSchema = exports.GovernedCatalogDomainQueryDataSourceSchema = exports.GovernedCatalogResourceKindSchema = exports.InteractionBindingSchema = exports.PageStateDefinitionSchema = exports.LegacyBrowserPreferenceImportSchema = exports.ResolvedPageEntryTransitionSchema = exports.PageEntryTransitionSchema = exports.PageStateActivationSchema = exports.PageStateConditionSchema = exports.BindingSourceSchema = exports.DeclarativeRouteClaimSchema = exports.LegacyRouteTakeoverAuthorizationSchema = exports.LegacySlotRestorationSchema = exports.WorkbenchIdentitySchema = exports.PublicationPlanSchema = exports.PublicationPlanOperationSchema = exports.ReleaseEvidenceSchema = exports.ReleaseValidationSchema = exports.ReleaseDependencySchema = exports.ReleaseDependencyRoleSchema = exports.ReleaseOperationSchema = exports.CompiledRouteClaimSchema = exports.CompiledRouteMatcherSchema = exports.RouteClaimSchema = exports.LegacyRouteClaimSchema = exports.RouteSpaceSchema = exports.RouteSpaceParameterSchema = exports.RoutePathTemplateSchema = exports.ManagementAccessSchema = exports.PermissionAlternativePolicySchema = exports.AccessPolicySchema = exports.DeclarativeRuntimeShellDescriptorSchema = exports.DeclarativeShellSurfaceChromeSchema = exports.DeclarativeShellHeaderChromeSchema = exports.ProductSurfaceSchema = exports.DeclarativeLifecycleSchema = exports.StableRefAliasMapSchema = exports.StableRefAliasSchema = exports.RevisionRefSchema = exports.StableRefSchema = exports.ReferenceVisibilitySchema = exports.TenantScopeSchema = exports.ScopedIdentityRefSchema = exports.I18nTextSchema = exports.DECLARATIVE_CONTROL_SCHEMA_VERSION = exports.analyzePageBindingDependencies = void 0;
|
|
4
|
-
exports.
|
|
5
|
-
exports.DECLARATIVE_CONTROL_ONTOLOGY_DEFINITIONS = exports.DeclarativeControlOntologyDefinitionSchema = exports.NavigationRuntimeBundleSchema = exports.CompiledNavigationNodeSchema = exports.CompiledNavigationSeparatorNodeSchema = exports.CompiledNavigationTargetNodeSchema = exports.CompiledNavigationGroupNodeSchema = exports.CompiledNavigationResolvedTargetSchema = exports.CompiledNavigationDomainCommandTargetSchema = exports.CompiledNavigationRegisteredMenuActionTargetSchema = exports.WorkbenchRuntimeBundleSchema = exports.WorkbenchRuntimeIdentitySchema = exports.ReadablePageRuntimeBundleSchema = exports.LegacyPageRuntimeBundleSchema = exports.PageRuntimeBundleSchema = void 0;
|
|
4
|
+
exports.DeclarativeWorkbenchCatalogSchema = exports.DeclarativeWorkbenchCatalogEntrySchema = exports.DeclarativeRouteOwnerIndexSchema = exports.DeclarativeRouteOwnerIndexEntrySchema = exports.NavigationReleaseSchema = exports.UnavailableNavigationTargetSchema = exports.ResolvedNavigationTargetSchema = exports.NavigationSchema = exports.NavigationNodeSchema = exports.NavigationHeadbarSchema = exports.NavigationHeadbarActionSchema = exports.NavigationSeparatorNodeSchema = exports.NavigationTargetNodeSchema = exports.NavigationGroupNodeSchema = exports.WorkbenchReleaseSchema = exports.WorkbenchSchema = exports.WorkbenchAppInstanceSchema = exports.WorkbenchGroupSchema = exports.PageReleaseSchema = exports.ResolvedPageSchema = exports.PageSchema = exports.PageSharedStateBindingSchema = exports.PageNodeSchema = exports.PageActionSchema = exports.ProgramBindingSchema = exports.PageProgramActionSchema = exports.ActionProgramArtifactSchema = exports.ActionProgramDefinitionSchema = exports.ActionProgramDependencySchema = exports.DEFAULT_ACTION_PROGRAM_BUDGETS = exports.ActionProgramBudgetsSchema = exports.ACTION_PROGRAM_ABI = exports.PageDataSchema = exports.PageInteractionSchema = exports.PageEntrySchema = exports.PageEntryTargetSchema = exports.PageStateSchema = exports.PageRouteStatePresentationSchema = exports.PageMigrationEquivalenceSchema = exports.PageMigrationEquivalenceDimensionSchema = exports.ActionBindingSchema = exports.ActionResultClipboardEffectSchema = exports.ActionResultBindingEffectSchema = exports.ActionResultBindingEffectSourceSchema = exports.PersistedOntologyBindingSchema = exports.LegacyOntologyBindingSchema = exports.OntologyBindingSchema = exports.CapabilityInstanceSchema = exports.QueryBindingSchema = exports.QueryResultStateBindingSchema = void 0;
|
|
5
|
+
exports.DECLARATIVE_CONTROL_ONTOLOGY_DEFINITIONS = exports.DeclarativeControlOntologyDefinitionSchema = exports.NavigationRuntimeBundleSchema = exports.CompiledNavigationNodeSchema = exports.CompiledNavigationSeparatorNodeSchema = exports.CompiledNavigationTargetNodeSchema = exports.CompiledNavigationGroupNodeSchema = exports.CompiledNavigationResolvedTargetSchema = exports.CompiledNavigationDomainCommandTargetSchema = exports.CompiledNavigationRegisteredMenuActionTargetSchema = exports.WorkbenchRuntimeBundleSchema = exports.WorkbenchRuntimeIdentitySchema = exports.ReadablePageRuntimeBundleSchema = exports.LegacyPageRuntimeBundleSchema = exports.PageRuntimeBundleSchema = exports.ResolvedWorkbenchAppInstanceSchema = void 0;
|
|
6
6
|
const zod_1 = require("zod");
|
|
7
7
|
const common_1 = require("./common");
|
|
8
8
|
const data_1 = require("./data");
|
|
@@ -4272,64 +4272,84 @@ exports.NavigationSeparatorNodeSchema = zod_1.z
|
|
|
4272
4272
|
kind: zod_1.z.literal("separator"),
|
|
4273
4273
|
})
|
|
4274
4274
|
.strict();
|
|
4275
|
-
const
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
})
|
|
4283
|
-
.
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
.strict()
|
|
4300
|
-
.
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4275
|
+
const HeadbarActionConditionShape = { when: page_expression_1.PageExpressionSchema.optional() };
|
|
4276
|
+
exports.NavigationHeadbarActionSchema = zod_1.z.discriminatedUnion("kind", [
|
|
4277
|
+
zod_1.z.object({
|
|
4278
|
+
...HeadbarActionConditionShape,
|
|
4279
|
+
kind: zod_1.z.literal("navigate"),
|
|
4280
|
+
nodeId: common_1.ContractIdentifierSchema,
|
|
4281
|
+
rememberLocation: common_1.ContractIdentifierSchema.optional(),
|
|
4282
|
+
}).strict(),
|
|
4283
|
+
zod_1.z.object({
|
|
4284
|
+
...HeadbarActionConditionShape,
|
|
4285
|
+
kind: zod_1.z.literal("restore-location"),
|
|
4286
|
+
key: common_1.ContractIdentifierSchema,
|
|
4287
|
+
}).strict(),
|
|
4288
|
+
zod_1.z.object({
|
|
4289
|
+
...HeadbarActionConditionShape,
|
|
4290
|
+
kind: zod_1.z.literal("set-state"),
|
|
4291
|
+
stateId: common_1.ContractIdentifierSchema,
|
|
4292
|
+
value: page_expression_1.PageExpressionSchema,
|
|
4293
|
+
}).strict(),
|
|
4294
|
+
]);
|
|
4295
|
+
exports.NavigationHeadbarSchema = zod_1.z.object({
|
|
4296
|
+
state: zod_1.z.record(common_1.ContractIdentifierSchema, zod_1.z.object({
|
|
4297
|
+
defaultValue: zod_1.z.union([zod_1.z.string(), zod_1.z.number().finite(), zod_1.z.boolean(), zod_1.z.null()]),
|
|
4298
|
+
persistence: zod_1.z.enum(["none", "user-preference"]),
|
|
4299
|
+
}).strict()).default({}),
|
|
4300
|
+
navigationVisible: page_expression_1.PageExpressionSchema.optional(),
|
|
4301
|
+
buttons: zod_1.z.array(zod_1.z.object({
|
|
4302
|
+
id: common_1.ContractIdentifierSchema,
|
|
4303
|
+
label: exports.I18nTextSchema,
|
|
4304
|
+
icon: zod_1.z.discriminatedUnion("kind", [
|
|
4305
|
+
zod_1.z.object({ kind: zod_1.z.literal("text"), value: zod_1.z.string().trim().min(1).max(16) }).strict(),
|
|
4306
|
+
zod_1.z.object({ kind: zod_1.z.literal("design-icon"), name: common_1.ContractIdentifierSchema }).strict(),
|
|
4307
|
+
]),
|
|
4308
|
+
presentation: zod_1.z.enum(["icon", "icon-label"]).default("icon"),
|
|
4309
|
+
when: page_expression_1.PageExpressionSchema.optional(),
|
|
4310
|
+
onPress: zod_1.z.array(exports.NavigationHeadbarActionSchema).min(1).max(8),
|
|
4311
|
+
}).strict()).max(32),
|
|
4312
|
+
}).strict().superRefine((value, context) => {
|
|
4313
|
+
if (Object.keys(value.state).length > 32)
|
|
4314
|
+
context.addIssue({ code: "custom", path: ["state"], message: "Headbar supports at most 32 state values." });
|
|
4315
|
+
const ids = value.buttons.map(button => button.id);
|
|
4316
|
+
if (new Set(ids).size !== ids.length)
|
|
4317
|
+
context.addIssue({ code: "custom", path: ["buttons"], message: "Headbar button identities must be unique." });
|
|
4318
|
+
const checkExpression = (expression, path) => {
|
|
4319
|
+
if (!expression)
|
|
4320
|
+
return;
|
|
4321
|
+
for (const read of (0, page_expression_1.collectExternalPageExpressionReads)(expression)) {
|
|
4322
|
+
if (read.root === "state" && read.path.length && Object.prototype.hasOwnProperty.call(value.state, read.path[0]))
|
|
4323
|
+
continue;
|
|
4324
|
+
if (read.root === "scope" && read.path[0] === "targets")
|
|
4325
|
+
continue;
|
|
4326
|
+
context.addIssue({ code: "custom", path, message: "Headbar expressions may read declared state and resolved navigation targets only." });
|
|
4327
|
+
}
|
|
4328
|
+
};
|
|
4329
|
+
checkExpression(value.navigationVisible, ["navigationVisible"]);
|
|
4330
|
+
value.buttons.forEach((button, index) => {
|
|
4331
|
+
checkExpression(button.when, ["buttons", index, "when"]);
|
|
4332
|
+
button.onPress.forEach((action, actionIndex) => {
|
|
4333
|
+
const path = ["buttons", index, "onPress", actionIndex];
|
|
4334
|
+
checkExpression(action.when, [...path, "when"]);
|
|
4335
|
+
if (action.kind === "set-state") {
|
|
4336
|
+
if (!Object.prototype.hasOwnProperty.call(value.state, action.stateId))
|
|
4337
|
+
context.addIssue({ code: "custom", path, message: "Headbar actions must update declared state." });
|
|
4338
|
+
checkExpression(action.value, [...path, "value"]);
|
|
4339
|
+
}
|
|
4330
4340
|
});
|
|
4331
|
-
}
|
|
4341
|
+
});
|
|
4332
4342
|
});
|
|
4343
|
+
const validateHeadbarTargets = (headbar, nodes, context) => {
|
|
4344
|
+
headbar?.buttons.forEach((button, index) => button.onPress.forEach((action, actionIndex) => {
|
|
4345
|
+
if (action.kind !== "navigate")
|
|
4346
|
+
return;
|
|
4347
|
+
const target = nodes.find(node => node.nodeId === action.nodeId);
|
|
4348
|
+
if (!target || target.kind !== "target" || !["page", "workbench"].includes(target.targetRef?.kind ?? "")) {
|
|
4349
|
+
context.addIssue({ code: "custom", path: ["headbar", "buttons", index, "onPress", actionIndex], message: "Headbar navigation requires a Page or Workbench target in this Navigation." });
|
|
4350
|
+
}
|
|
4351
|
+
}));
|
|
4352
|
+
};
|
|
4333
4353
|
exports.NavigationNodeSchema = zod_1.z.discriminatedUnion("kind", [
|
|
4334
4354
|
exports.NavigationGroupNodeSchema,
|
|
4335
4355
|
exports.NavigationTargetNodeSchema,
|
|
@@ -4399,7 +4419,14 @@ exports.NavigationSchema = zod_1.z
|
|
|
4399
4419
|
placements: zod_1.z.array(common_1.ContractIdentifierSchema).min(1),
|
|
4400
4420
|
lifecycle: exports.DeclarativeLifecycleSchema,
|
|
4401
4421
|
nodes: zod_1.z.array(exports.NavigationNodeSchema),
|
|
4402
|
-
|
|
4422
|
+
headbar: exports.NavigationHeadbarSchema.optional(),
|
|
4423
|
+
/** Historical releases retain this opaque payload for revision readback and rolling upgrades. New Headbar runtimes ignore it. */
|
|
4424
|
+
headbarModeSwitch: common_1.JsonObjectSchema.optional(),
|
|
4425
|
+
menuRef: zod_1.z.object({
|
|
4426
|
+
applicationId: common_1.ContractIdentifierSchema,
|
|
4427
|
+
surface: common_1.ContractIdentifierSchema,
|
|
4428
|
+
menuId: common_1.ContractIdentifierSchema,
|
|
4429
|
+
}).strict().optional(),
|
|
4403
4430
|
managementAccess: exports.ManagementAccessSchema,
|
|
4404
4431
|
performanceBudgetRef: exports.RevisionRefSchema,
|
|
4405
4432
|
observationPolicyRevisionRef: exports.RevisionRefSchema,
|
|
@@ -4407,17 +4434,13 @@ exports.NavigationSchema = zod_1.z
|
|
|
4407
4434
|
.strict()
|
|
4408
4435
|
.superRefine((value, context) => {
|
|
4409
4436
|
validateNavigationTree(value.nodes, context);
|
|
4410
|
-
|
|
4411
|
-
if (
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
message: "The smart Headbar mode must point to a Page target in the same Navigation.",
|
|
4418
|
-
});
|
|
4419
|
-
}
|
|
4420
|
-
}
|
|
4437
|
+
validateHeadbarTargets(value.headbar, value.nodes, context);
|
|
4438
|
+
if (value.headbar && value.headbarModeSwitch)
|
|
4439
|
+
context.addIssue({ code: "custom", path: ["headbar"], message: "Headbar controls replace the historical declaration; both cannot be authored together." });
|
|
4440
|
+
if (value.menuRef && (value.nodes.length || value.headbar))
|
|
4441
|
+
context.addIssue({
|
|
4442
|
+
code: "custom", path: ["menuRef"], message: "A menu reference delegates menu ownership and cannot duplicate nodes or controls.",
|
|
4443
|
+
});
|
|
4421
4444
|
value.nodes.forEach((node, index) => {
|
|
4422
4445
|
if (node.kind === "target" &&
|
|
4423
4446
|
!["page", "workbench", "menu-action", "domain-command"].includes(node.targetRef.kind)) {
|
|
@@ -4926,7 +4949,14 @@ exports.NavigationRuntimeBundleSchema = zod_1.z
|
|
|
4926
4949
|
surface: exports.ProductSurfaceSchema,
|
|
4927
4950
|
placement: common_1.ContractIdentifierSchema,
|
|
4928
4951
|
nodes: zod_1.z.array(exports.CompiledNavigationNodeSchema),
|
|
4929
|
-
|
|
4952
|
+
headbar: exports.NavigationHeadbarSchema.optional(),
|
|
4953
|
+
/** Historical releases retain this opaque payload for revision readback and rolling upgrades. New Headbar runtimes ignore it. */
|
|
4954
|
+
headbarModeSwitch: common_1.JsonObjectSchema.optional(),
|
|
4955
|
+
menuRef: zod_1.z.object({
|
|
4956
|
+
applicationId: common_1.ContractIdentifierSchema,
|
|
4957
|
+
surface: common_1.ContractIdentifierSchema,
|
|
4958
|
+
menuId: common_1.ContractIdentifierSchema,
|
|
4959
|
+
}).strict().optional(),
|
|
4930
4960
|
performanceBudgetRef: exports.RevisionRefSchema,
|
|
4931
4961
|
observationPolicyRevisionRef: exports.RevisionRefSchema,
|
|
4932
4962
|
})
|
|
@@ -4934,20 +4964,6 @@ exports.NavigationRuntimeBundleSchema = zod_1.z
|
|
|
4934
4964
|
.superRefine((value, context) => {
|
|
4935
4965
|
validateRuntimeBundleBase(value, "navigation-release", context);
|
|
4936
4966
|
validateRuntimeBundleReference(value.navigationRevisionRef, value.tenantScope, "navigationRevisionRef", "navigation", value.navigationId, context);
|
|
4937
|
-
const targetNodeId = value.headbarModeSwitch?.modes.find((mode) => mode.id === "smart")?.targetNodeId;
|
|
4938
|
-
if (targetNodeId) {
|
|
4939
|
-
const target = value.nodes.find((node) => node.nodeId === targetNodeId);
|
|
4940
|
-
if (target?.kind !== "target" ||
|
|
4941
|
-
target.targetRef.kind !== "page" ||
|
|
4942
|
-
target.resolvedTarget.kind !== "route" ||
|
|
4943
|
-
target.disabled) {
|
|
4944
|
-
context.addIssue({
|
|
4945
|
-
code: "custom",
|
|
4946
|
-
path: ["headbarModeSwitch", "modes"],
|
|
4947
|
-
message: "The smart Headbar mode must resolve to an enabled Page route in the compiled Navigation.",
|
|
4948
|
-
});
|
|
4949
|
-
}
|
|
4950
|
-
}
|
|
4951
4967
|
});
|
|
4952
4968
|
exports.DeclarativeControlOntologyDefinitionSchema = data_1.OntologyDefinitionSchema.extend({
|
|
4953
4969
|
classification: zod_1.z.literal("control"),
|