@antglobal/copilot-cards-core 1.0.6 → 1.0.8

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/dist/index.cjs CHANGED
@@ -1997,7 +1997,9 @@ function validateSchemaDetailed(input) {
1997
1997
  addIssue(issues, 'SLOTS_UNINSPECTABLE', elementPath(id, 'props', 'slots'), `Element "${id}" slots could not be inspected safely`, { elementId: id });
1998
1998
  continue;
1999
1999
  }
2000
- if (rawSlots.kind === 'value' && !isPlainObject(rawSlots.value)) {
2000
+ if (rawSlots.kind === 'value'
2001
+ && rawSlots.value !== null
2002
+ && !isPlainObject(rawSlots.value)) {
2001
2003
  addIssue(issues, 'SLOTS_TYPE_MISMATCH', elementPath(id, 'props', 'slots'), `Element "${id}" "slots" field must be an object`, { elementId: id });
2002
2004
  continue;
2003
2005
  }
package/dist/index.d.ts CHANGED
@@ -201,7 +201,7 @@ interface ElementNode {
201
201
  props: {
202
202
  style?: Record<string, any>;
203
203
  content?: ExpressionValue | string;
204
- slots?: Partial<Record<SlotLayout, SlotContent>>;
204
+ slots?: Partial<Record<SlotLayout, SlotContent>> | null;
205
205
  [key: string]: any;
206
206
  };
207
207
  /** Lifecycle hooks — each is a chain of ActionSteps. */
package/dist/index.js CHANGED
@@ -1995,7 +1995,9 @@ function validateSchemaDetailed(input) {
1995
1995
  addIssue(issues, 'SLOTS_UNINSPECTABLE', elementPath(id, 'props', 'slots'), `Element "${id}" slots could not be inspected safely`, { elementId: id });
1996
1996
  continue;
1997
1997
  }
1998
- if (rawSlots.kind === 'value' && !isPlainObject(rawSlots.value)) {
1998
+ if (rawSlots.kind === 'value'
1999
+ && rawSlots.value !== null
2000
+ && !isPlainObject(rawSlots.value)) {
1999
2001
  addIssue(issues, 'SLOTS_TYPE_MISMATCH', elementPath(id, 'props', 'slots'), `Element "${id}" "slots" field must be an object`, { elementId: id });
2000
2002
  continue;
2001
2003
  }
@@ -490,7 +490,9 @@ function validateSchemaDetailed(input) {
490
490
  addIssue(issues, 'SLOTS_UNINSPECTABLE', elementPath(id, 'props', 'slots'), `Element "${id}" slots could not be inspected safely`, { elementId: id });
491
491
  continue;
492
492
  }
493
- if (rawSlots.kind === 'value' && !isPlainObject(rawSlots.value)) {
493
+ if (rawSlots.kind === 'value'
494
+ && rawSlots.value !== null
495
+ && !isPlainObject(rawSlots.value)) {
494
496
  addIssue(issues, 'SLOTS_TYPE_MISMATCH', elementPath(id, 'props', 'slots'), `Element "${id}" "slots" field must be an object`, { elementId: id });
495
497
  continue;
496
498
  }
@@ -130,7 +130,7 @@ interface ElementNode {
130
130
  props: {
131
131
  style?: Record<string, any>;
132
132
  content?: ExpressionValue | string;
133
- slots?: Partial<Record<SlotLayout, SlotContent>>;
133
+ slots?: Partial<Record<SlotLayout, SlotContent>> | null;
134
134
  [key: string]: any;
135
135
  };
136
136
  /** Lifecycle hooks — each is a chain of ActionSteps. */
@@ -488,7 +488,9 @@ function validateSchemaDetailed(input) {
488
488
  addIssue(issues, 'SLOTS_UNINSPECTABLE', elementPath(id, 'props', 'slots'), `Element "${id}" slots could not be inspected safely`, { elementId: id });
489
489
  continue;
490
490
  }
491
- if (rawSlots.kind === 'value' && !isPlainObject(rawSlots.value)) {
491
+ if (rawSlots.kind === 'value'
492
+ && rawSlots.value !== null
493
+ && !isPlainObject(rawSlots.value)) {
492
494
  addIssue(issues, 'SLOTS_TYPE_MISMATCH', elementPath(id, 'props', 'slots'), `Element "${id}" "slots" field must be an object`, { elementId: id });
493
495
  continue;
494
496
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antglobal/copilot-cards-core",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Core logic engine for copilot bot card SDK — no UI, pure logic (Expression Engine, Action Runner, Schema Parser, Lifecycle Manager)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",