@inf-monkeys-tech/monkeys 1.1.13 → 1.1.15

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/README.md CHANGED
@@ -60,6 +60,6 @@ The current `OntologyBindingSchema`, `PageRuntimeBundleSchema`, and `compilePage
60
60
 
61
61
  `assertViewProviderContract` checks provider/capability identity and ownership, then checks the declared contract. Unversioned nodes require exact revisions. `assertDeclarativeCapabilityContract` can prove an unversioned snapshot equivalent by reconstructing and comparing its complete immutable manifest/provider hashes; IDs alone are insufficient. `projectRuntimeContracts` additionally uses governed historical entries to enrich a rebuildable Page or Workbench projection. It preserves definitions, release references and dependency snapshots, and recalculates only the projection content hash.
62
62
 
63
- `assertCompatibleCapabilityUpgrade` guards catalog activation and package publication. Compatible inputs accept every historical value; outputs must remain valid for historical consumers. Optional input properties, enum widening and documentation annotations are supported; unknown Schema changes fail closed. Provider identity, lifecycle, effects, placement and access requirements remain protected. Breaking changes require a separate capability/provider identity with the existing implementation retained. Behavioral regression tests remain necessary alongside Schema checks.
63
+ `assertCompatibleCapabilityUpgrade` guards catalog activation and package publication. Compatible inputs accept every historical value; outputs must remain valid for historical consumers. Optional input properties, optional ports, enum widening and documentation annotations are supported; unknown Schema changes fail closed. Provider identity, lifecycle, effects, placement and access requirements remain protected. Breaking changes require a separate capability/provider identity with the existing implementation retained. Behavioral regression tests remain necessary alongside Schema checks.
64
64
 
65
65
  `sameSchemaContract` compares stable identity, tenant scope, Schema version and content hash, allowing a different metadata revision for identical Schema content. Raw query results, permissions, command validation and immutable snapshot verification must continue to use their owning validators.
@@ -18387,6 +18387,7 @@ function resolveThemeTokens(input) {
18387
18387
  return result;
18388
18388
  };
18389
18389
  for (const path of collected.keys()) resolveToken(path);
18390
+ assertBentoTokens(resolved);
18390
18391
  const resolvedDocument = {};
18391
18392
  for (const token of resolved.values()) {
18392
18393
  const segments = token.path.split(".");
@@ -18466,6 +18467,35 @@ var MONKEYS_REQUIRED_THEME_TOKEN_PATHS = Object.freeze({
18466
18467
  "semantic.spacing.global.comfortable": "dimension",
18467
18468
  "semantic.font.body": "fontFamily"
18468
18469
  });
18470
+ function assertBentoTokens(tokens) {
18471
+ const fields = {
18472
+ background: "color",
18473
+ borderColor: "color",
18474
+ borderWidth: "dimension",
18475
+ borderStyle: "strokeStyle",
18476
+ radius: "dimension",
18477
+ shadow: "shadow",
18478
+ padding: "dimension",
18479
+ gap: "dimension"
18480
+ };
18481
+ for (const [path, token] of tokens) {
18482
+ if (!path.startsWith("semantic.bento.")) continue;
18483
+ const match = /^semantic\.bento\.(?:default|levels\.level([1-9]\d*))\.([a-zA-Z]+)(?:\.([a-z]+))?$/.exec(path);
18484
+ const field = match?.[2];
18485
+ const axis = match?.[3];
18486
+ const expected = field && fields[field];
18487
+ const modes = field === "padding" || field === "gap" ? ["compact", "default", "comfortable"] : ["light", "dark"];
18488
+ if (!match || !expected || token.type !== expected || axis && !modes.includes(axis) || match[1] && !Number.isSafeInteger(Number(match[1]))) {
18489
+ throw new ThemeTokenValidationError("Invalid Bento semantic token.", [{ path, message: "Expected a supported Bento field, type, level and mode." }]);
18490
+ }
18491
+ if (field === "borderStyle" && typeof token.value !== "string") {
18492
+ throw new ThemeTokenValidationError("Invalid Bento border style.", [{ path, message: "Bento borders require a CSS stroke keyword." }]);
18493
+ }
18494
+ if (token.type === "dimension" && token.value.value < 0) {
18495
+ throw new ThemeTokenValidationError("Invalid Bento dimension.", [{ path, message: "Bento dimensions must be non-negative." }]);
18496
+ }
18497
+ }
18498
+ }
18469
18499
 
18470
18500
  // src/contracts/theme.ts
18471
18501
  var ThemeTokenTypeSchema = z22.enum(THEME_TOKEN_TYPES);