@inf-monkeys-tech/monkeys 1.1.2 → 1.1.4

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.
@@ -7725,7 +7725,8 @@ var RenderLayoutSchema = z3.object({
7725
7725
  var RenderResponsiveRuleSchema = z3.object({
7726
7726
  minWidthPx: z3.number().nonnegative().optional(),
7727
7727
  maxWidthPx: z3.number().positive().optional(),
7728
- layout: RenderLayoutSchema
7728
+ layout: RenderLayoutSchema,
7729
+ style: z3.lazy(() => RenderStyleSchema).optional()
7729
7730
  }).strict().superRefine((rule, context) => {
7730
7731
  if (rule.minWidthPx === void 0 && rule.maxWidthPx === void 0) {
7731
7732
  context.addIssue({
@@ -18647,6 +18648,12 @@ var resolvePage = (input) => {
18647
18648
  const queryBindings = [];
18648
18649
  const actionBindings = [];
18649
18650
  const interactionBindings = [];
18651
+ const nodesById = /* @__PURE__ */ new Map();
18652
+ const indexNode = (node) => {
18653
+ nodesById.set(node.id, node);
18654
+ node.children?.forEach(indexNode);
18655
+ };
18656
+ indexNode(page.body);
18650
18657
  const visitNode = (node, parentNodeId) => {
18651
18658
  const registration = singleByStableIdentity(
18652
18659
  capabilityRegistrations,
@@ -18767,15 +18774,13 @@ var resolvePage = (input) => {
18767
18774
  ...cursorWindow,
18768
18775
  pageChangeIntentSchemaRevisionRef: (() => {
18769
18776
  const sourceInstanceId = cursorWindow.sourceCapabilityInstanceId ?? node.id;
18770
- const sourceRegistration = capabilityInstances.find(
18771
- (instance) => instance.instanceId === sourceInstanceId
18772
- );
18773
- const sourceCapability = sourceRegistration && capabilityRegistrations.find(
18774
- (candidate) => sameRevisionRef(
18775
- candidate.revisionRef,
18776
- sourceRegistration.capabilityRevisionRef
18777
- )
18778
- );
18777
+ const sourceNode = nodesById.get(sourceInstanceId);
18778
+ const sourceCapability = sourceNode ? singleByStableIdentity(
18779
+ capabilityRegistrations,
18780
+ "capability",
18781
+ sourceNode.component,
18782
+ `page.body.${sourceNode.id}.component`
18783
+ ) : void 0;
18779
18784
  const sourcePort = sourceCapability?.outputPorts.find(
18780
18785
  (candidate) => candidate.name === cursorWindow.pageChangePort
18781
18786
  );