@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.
package/lib/esm/index.mjs CHANGED
@@ -9001,7 +9001,8 @@ var RenderLayoutSchema = z7.object({
9001
9001
  var RenderResponsiveRuleSchema = z7.object({
9002
9002
  minWidthPx: z7.number().nonnegative().optional(),
9003
9003
  maxWidthPx: z7.number().positive().optional(),
9004
- layout: RenderLayoutSchema
9004
+ layout: RenderLayoutSchema,
9005
+ style: z7.lazy(() => RenderStyleSchema).optional()
9005
9006
  }).strict().superRefine((rule, context) => {
9006
9007
  if (rule.minWidthPx === void 0 && rule.maxWidthPx === void 0) {
9007
9008
  context.addIssue({
@@ -23009,6 +23010,12 @@ var resolvePage = (input) => {
23009
23010
  const queryBindings = [];
23010
23011
  const actionBindings = [];
23011
23012
  const interactionBindings = [];
23013
+ const nodesById = /* @__PURE__ */ new Map();
23014
+ const indexNode = (node) => {
23015
+ nodesById.set(node.id, node);
23016
+ node.children?.forEach(indexNode);
23017
+ };
23018
+ indexNode(page.body);
23012
23019
  const visitNode = (node, parentNodeId) => {
23013
23020
  const registration = singleByStableIdentity(
23014
23021
  capabilityRegistrations,
@@ -23129,15 +23136,13 @@ var resolvePage = (input) => {
23129
23136
  ...cursorWindow,
23130
23137
  pageChangeIntentSchemaRevisionRef: (() => {
23131
23138
  const sourceInstanceId = cursorWindow.sourceCapabilityInstanceId ?? node.id;
23132
- const sourceRegistration = capabilityInstances.find(
23133
- (instance) => instance.instanceId === sourceInstanceId
23134
- );
23135
- const sourceCapability = sourceRegistration && capabilityRegistrations.find(
23136
- (candidate) => sameRevisionRef(
23137
- candidate.revisionRef,
23138
- sourceRegistration.capabilityRevisionRef
23139
- )
23140
- );
23139
+ const sourceNode = nodesById.get(sourceInstanceId);
23140
+ const sourceCapability = sourceNode ? singleByStableIdentity(
23141
+ capabilityRegistrations,
23142
+ "capability",
23143
+ sourceNode.component,
23144
+ `page.body.${sourceNode.id}.component`
23145
+ ) : void 0;
23141
23146
  const sourcePort = sourceCapability?.outputPorts.find(
23142
23147
  (candidate) => candidate.name === cursorWindow.pageChangePort
23143
23148
  );