@tambo-ai/react 0.66.1 → 0.66.2

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.
Files changed (109) hide show
  1. package/dist/hooks/use-current-message.d.ts +2 -0
  2. package/dist/hooks/use-current-message.d.ts.map +1 -1
  3. package/dist/hooks/use-current-message.js +1 -0
  4. package/dist/hooks/use-current-message.js.map +1 -1
  5. package/dist/hooks/use-current-message.test.js +5 -0
  6. package/dist/hooks/use-current-message.test.js.map +1 -1
  7. package/dist/model/component-metadata.d.ts +2 -2
  8. package/dist/model/component-metadata.d.ts.map +1 -1
  9. package/dist/model/component-metadata.js.map +1 -1
  10. package/dist/providers/tambo-interactable-provider-partial-updates.test.js +87 -87
  11. package/dist/providers/tambo-interactable-provider-partial-updates.test.js.map +1 -1
  12. package/dist/providers/tambo-interactable-provider.d.ts.map +1 -1
  13. package/dist/providers/tambo-interactable-provider.js +46 -40
  14. package/dist/providers/tambo-interactable-provider.js.map +1 -1
  15. package/dist/providers/tambo-interactables-additional-context-edge-cases.test.js +8 -8
  16. package/dist/providers/tambo-interactables-additional-context-edge-cases.test.js.map +1 -1
  17. package/dist/providers/tambo-interactables-additional-context.test.js +10 -10
  18. package/dist/providers/tambo-interactables-additional-context.test.js.map +1 -1
  19. package/dist/providers/tambo-registry-provider.test.js +28 -18
  20. package/dist/providers/tambo-registry-provider.test.js.map +1 -1
  21. package/dist/providers/tambo-registry-schema-compat.test.js +57 -28
  22. package/dist/providers/tambo-registry-schema-compat.test.js.map +1 -1
  23. package/dist/providers/tambo-thread-provider.test.js +21 -19
  24. package/dist/providers/tambo-thread-provider.test.js.map +1 -1
  25. package/dist/schema/alias.d.ts +3 -0
  26. package/dist/schema/alias.d.ts.map +1 -0
  27. package/dist/schema/alias.js +6 -0
  28. package/dist/schema/alias.js.map +1 -0
  29. package/dist/schema/json-schema.js +29 -29
  30. package/dist/schema/json-schema.js.map +1 -1
  31. package/dist/schema/schema.d.ts.map +1 -1
  32. package/dist/schema/schema.js +20 -9
  33. package/dist/schema/schema.js.map +1 -1
  34. package/dist/schema/schema.test.js +291 -3
  35. package/dist/schema/schema.test.js.map +1 -1
  36. package/dist/schema/standard-schema.js +8 -8
  37. package/dist/schema/standard-schema.js.map +1 -1
  38. package/dist/schema/validate.test.js +31 -31
  39. package/dist/schema/validate.test.js.map +1 -1
  40. package/dist/schema/zod.d.ts +1 -1
  41. package/dist/schema/zod.d.ts.map +1 -1
  42. package/dist/schema/zod.js +25 -24
  43. package/dist/schema/zod.js.map +1 -1
  44. package/dist/util/registry-validators.d.ts.map +1 -1
  45. package/dist/util/registry-validators.js +40 -0
  46. package/dist/util/registry-validators.js.map +1 -1
  47. package/dist/util/registry-validators.test.js +69 -0
  48. package/dist/util/registry-validators.test.js.map +1 -1
  49. package/dist/util/registry.d.ts +1 -5
  50. package/dist/util/registry.d.ts.map +1 -1
  51. package/dist/util/registry.js +1 -5
  52. package/dist/util/registry.js.map +1 -1
  53. package/dist/util/registry.test.js +80 -67
  54. package/dist/util/registry.test.js.map +1 -1
  55. package/esm/hooks/use-current-message.d.ts +2 -0
  56. package/esm/hooks/use-current-message.d.ts.map +1 -1
  57. package/esm/hooks/use-current-message.js +1 -0
  58. package/esm/hooks/use-current-message.js.map +1 -1
  59. package/esm/hooks/use-current-message.test.js +5 -0
  60. package/esm/hooks/use-current-message.test.js.map +1 -1
  61. package/esm/model/component-metadata.d.ts +2 -2
  62. package/esm/model/component-metadata.d.ts.map +1 -1
  63. package/esm/model/component-metadata.js.map +1 -1
  64. package/esm/providers/tambo-interactable-provider-partial-updates.test.js +1 -1
  65. package/esm/providers/tambo-interactable-provider-partial-updates.test.js.map +1 -1
  66. package/esm/providers/tambo-interactable-provider.d.ts.map +1 -1
  67. package/esm/providers/tambo-interactable-provider.js +17 -11
  68. package/esm/providers/tambo-interactable-provider.js.map +1 -1
  69. package/esm/providers/tambo-interactables-additional-context-edge-cases.test.js +1 -1
  70. package/esm/providers/tambo-interactables-additional-context-edge-cases.test.js.map +1 -1
  71. package/esm/providers/tambo-interactables-additional-context.test.js +1 -1
  72. package/esm/providers/tambo-interactables-additional-context.test.js.map +1 -1
  73. package/esm/providers/tambo-registry-provider.test.js +16 -6
  74. package/esm/providers/tambo-registry-provider.test.js.map +1 -1
  75. package/esm/providers/tambo-registry-schema-compat.test.js +57 -28
  76. package/esm/providers/tambo-registry-schema-compat.test.js.map +1 -1
  77. package/esm/providers/tambo-thread-provider.test.js +8 -6
  78. package/esm/providers/tambo-thread-provider.test.js.map +1 -1
  79. package/esm/schema/alias.d.ts +3 -0
  80. package/esm/schema/alias.d.ts.map +1 -0
  81. package/esm/schema/alias.js +13 -0
  82. package/esm/schema/alias.js.map +1 -0
  83. package/esm/schema/json-schema.js +1 -1
  84. package/esm/schema/json-schema.js.map +1 -1
  85. package/esm/schema/schema.d.ts.map +1 -1
  86. package/esm/schema/schema.js +20 -9
  87. package/esm/schema/schema.js.map +1 -1
  88. package/esm/schema/schema.test.js +258 -3
  89. package/esm/schema/schema.test.js.map +1 -1
  90. package/esm/schema/standard-schema.js +1 -1
  91. package/esm/schema/standard-schema.js.map +1 -1
  92. package/esm/schema/validate.test.js +1 -1
  93. package/esm/schema/validate.test.js.map +1 -1
  94. package/esm/schema/zod.d.ts +1 -1
  95. package/esm/schema/zod.d.ts.map +1 -1
  96. package/esm/schema/zod.js +25 -24
  97. package/esm/schema/zod.js.map +1 -1
  98. package/esm/util/registry-validators.d.ts.map +1 -1
  99. package/esm/util/registry-validators.js +40 -0
  100. package/esm/util/registry-validators.js.map +1 -1
  101. package/esm/util/registry-validators.test.js +69 -0
  102. package/esm/util/registry-validators.test.js.map +1 -1
  103. package/esm/util/registry.d.ts +1 -5
  104. package/esm/util/registry.d.ts.map +1 -1
  105. package/esm/util/registry.js +1 -5
  106. package/esm/util/registry.js.map +1 -1
  107. package/esm/util/registry.test.js +80 -67
  108. package/esm/util/registry.test.js.map +1 -1
  109. package/package.json +1 -2
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const react_1 = require("@testing-library/react");
7
7
  const react_2 = __importDefault(require("react"));
8
- const zodInternalAlias_1 = require("zodInternalAlias");
8
+ const v4_1 = require("zod/v4");
9
9
  const tambo_interactable_provider_1 = require("./tambo-interactable-provider");
10
10
  // Mock the context helpers
11
11
  const mockAddContextHelper = jest.fn();
@@ -52,13 +52,13 @@ describe("updateInteractableComponentProps - Partial Updates", () => {
52
52
  active: true,
53
53
  metadata: { type: "test", version: "1.0" },
54
54
  },
55
- propsSchema: zodInternalAlias_1.z.object({
56
- title: zodInternalAlias_1.z.string(),
57
- count: zodInternalAlias_1.z.number(),
58
- active: zodInternalAlias_1.z.boolean(),
59
- metadata: zodInternalAlias_1.z.object({
60
- type: zodInternalAlias_1.z.string(),
61
- version: zodInternalAlias_1.z.string(),
55
+ propsSchema: v4_1.z.object({
56
+ title: v4_1.z.string(),
57
+ count: v4_1.z.number(),
58
+ active: v4_1.z.boolean(),
59
+ metadata: v4_1.z.object({
60
+ type: v4_1.z.string(),
61
+ version: v4_1.z.string(),
62
62
  }),
63
63
  }),
64
64
  };
@@ -100,11 +100,11 @@ describe("updateInteractableComponentProps - Partial Updates", () => {
100
100
  active: true,
101
101
  description: "Original description",
102
102
  },
103
- propsSchema: zodInternalAlias_1.z.object({
104
- title: zodInternalAlias_1.z.string(),
105
- count: zodInternalAlias_1.z.number(),
106
- active: zodInternalAlias_1.z.boolean(),
107
- description: zodInternalAlias_1.z.string(),
103
+ propsSchema: v4_1.z.object({
104
+ title: v4_1.z.string(),
105
+ count: v4_1.z.number(),
106
+ active: v4_1.z.boolean(),
107
+ description: v4_1.z.string(),
108
108
  }),
109
109
  };
110
110
  let componentId = "";
@@ -155,14 +155,14 @@ describe("updateInteractableComponentProps - Partial Updates", () => {
155
155
  },
156
156
  },
157
157
  },
158
- propsSchema: zodInternalAlias_1.z.object({
159
- title: zodInternalAlias_1.z.string(),
160
- config: zodInternalAlias_1.z.object({
161
- theme: zodInternalAlias_1.z.string(),
162
- language: zodInternalAlias_1.z.string(),
163
- features: zodInternalAlias_1.z.object({
164
- notifications: zodInternalAlias_1.z.boolean(),
165
- analytics: zodInternalAlias_1.z.boolean(),
158
+ propsSchema: v4_1.z.object({
159
+ title: v4_1.z.string(),
160
+ config: v4_1.z.object({
161
+ theme: v4_1.z.string(),
162
+ language: v4_1.z.string(),
163
+ features: v4_1.z.object({
164
+ notifications: v4_1.z.boolean(),
165
+ analytics: v4_1.z.boolean(),
166
166
  }),
167
167
  }),
168
168
  }),
@@ -200,10 +200,10 @@ describe("updateInteractableComponentProps - Partial Updates", () => {
200
200
  items: ["item1", "item2", "item3"],
201
201
  tags: ["tag1", "tag2"],
202
202
  },
203
- propsSchema: zodInternalAlias_1.z.object({
204
- title: zodInternalAlias_1.z.string(),
205
- items: zodInternalAlias_1.z.array(zodInternalAlias_1.z.string()),
206
- tags: zodInternalAlias_1.z.array(zodInternalAlias_1.z.string()),
203
+ propsSchema: v4_1.z.object({
204
+ title: v4_1.z.string(),
205
+ items: v4_1.z.array(v4_1.z.string()),
206
+ tags: v4_1.z.array(v4_1.z.string()),
207
207
  }),
208
208
  };
209
209
  let componentId = "";
@@ -233,10 +233,10 @@ describe("updateInteractableComponentProps - Partial Updates", () => {
233
233
  count: 5,
234
234
  description: "Original description",
235
235
  },
236
- propsSchema: zodInternalAlias_1.z.object({
237
- title: zodInternalAlias_1.z.string(),
238
- count: zodInternalAlias_1.z.number(),
239
- description: zodInternalAlias_1.z.string(),
236
+ propsSchema: v4_1.z.object({
237
+ title: v4_1.z.string(),
238
+ count: v4_1.z.number(),
239
+ description: v4_1.z.string(),
240
240
  }),
241
241
  };
242
242
  let componentId = "";
@@ -285,7 +285,7 @@ describe("updateInteractableComponentProps - Partial Updates", () => {
285
285
  description: "A component with spaces in name",
286
286
  component: () => react_2.default.createElement("div", null, "Invalid"),
287
287
  props: { title: "Test" },
288
- propsSchema: zodInternalAlias_1.z.object({ title: zodInternalAlias_1.z.string() }),
288
+ propsSchema: v4_1.z.object({ title: v4_1.z.string() }),
289
289
  };
290
290
  expect(() => {
291
291
  (0, react_1.act)(() => {
@@ -300,7 +300,7 @@ describe("updateInteractableComponentProps - Partial Updates", () => {
300
300
  description: "A test component",
301
301
  component: () => react_2.default.createElement("div", null, "Test"),
302
302
  props: { title: "Original Title" },
303
- propsSchema: zodInternalAlias_1.z.object({ title: zodInternalAlias_1.z.string() }),
303
+ propsSchema: v4_1.z.object({ title: v4_1.z.string() }),
304
304
  };
305
305
  let componentId = "";
306
306
  (0, react_1.act)(() => {
@@ -319,7 +319,7 @@ describe("updateInteractableComponentProps - Partial Updates", () => {
319
319
  description: "A test component",
320
320
  component: () => react_2.default.createElement("div", null, "Test"),
321
321
  props: { title: "Original Title" },
322
- propsSchema: zodInternalAlias_1.z.object({ title: zodInternalAlias_1.z.string() }),
322
+ propsSchema: v4_1.z.object({ title: v4_1.z.string() }),
323
323
  };
324
324
  let componentId = "";
325
325
  (0, react_1.act)(() => {
@@ -338,7 +338,7 @@ describe("updateInteractableComponentProps - Partial Updates", () => {
338
338
  description: "A test component",
339
339
  component: () => react_2.default.createElement("div", null, "Test"),
340
340
  props: { title: "Original Title" },
341
- propsSchema: zodInternalAlias_1.z.object({ title: zodInternalAlias_1.z.string() }),
341
+ propsSchema: v4_1.z.object({ title: v4_1.z.string() }),
342
342
  };
343
343
  let componentId = "";
344
344
  (0, react_1.act)(() => {
@@ -365,15 +365,15 @@ describe("updateInteractableComponentProps - Partial Updates", () => {
365
365
  metadata: { type: "test", version: "1.0" },
366
366
  items: ["item1", "item2"],
367
367
  },
368
- propsSchema: zodInternalAlias_1.z.object({
369
- title: zodInternalAlias_1.z.string(),
370
- count: zodInternalAlias_1.z.number(),
371
- active: zodInternalAlias_1.z.boolean(),
372
- metadata: zodInternalAlias_1.z.object({
373
- type: zodInternalAlias_1.z.string(),
374
- version: zodInternalAlias_1.z.string(),
368
+ propsSchema: v4_1.z.object({
369
+ title: v4_1.z.string(),
370
+ count: v4_1.z.number(),
371
+ active: v4_1.z.boolean(),
372
+ metadata: v4_1.z.object({
373
+ type: v4_1.z.string(),
374
+ version: v4_1.z.string(),
375
375
  }),
376
- items: zodInternalAlias_1.z.array(zodInternalAlias_1.z.string()),
376
+ items: v4_1.z.array(v4_1.z.string()),
377
377
  }),
378
378
  };
379
379
  let componentId = "";
@@ -427,25 +427,25 @@ describe("updateInteractableComponentProps - Partial Updates", () => {
427
427
  description: "A test component with large data",
428
428
  component: () => react_2.default.createElement("div", null, "Test"),
429
429
  props: largeData,
430
- propsSchema: zodInternalAlias_1.z.object({
431
- users: zodInternalAlias_1.z.array(zodInternalAlias_1.z.object({
432
- id: zodInternalAlias_1.z.number(),
433
- name: zodInternalAlias_1.z.string(),
430
+ propsSchema: v4_1.z.object({
431
+ users: v4_1.z.array(v4_1.z.object({
432
+ id: v4_1.z.number(),
433
+ name: v4_1.z.string(),
434
434
  })),
435
- settings: zodInternalAlias_1.z.object({
436
- theme: zodInternalAlias_1.z.string(),
437
- language: zodInternalAlias_1.z.string(),
438
- notifications: zodInternalAlias_1.z.boolean(),
439
- privacy: zodInternalAlias_1.z.object({
440
- shareData: zodInternalAlias_1.z.boolean(),
441
- analytics: zodInternalAlias_1.z.boolean(),
442
- marketing: zodInternalAlias_1.z.boolean(),
435
+ settings: v4_1.z.object({
436
+ theme: v4_1.z.string(),
437
+ language: v4_1.z.string(),
438
+ notifications: v4_1.z.boolean(),
439
+ privacy: v4_1.z.object({
440
+ shareData: v4_1.z.boolean(),
441
+ analytics: v4_1.z.boolean(),
442
+ marketing: v4_1.z.boolean(),
443
443
  }),
444
444
  }),
445
- metadata: zodInternalAlias_1.z.object({
446
- version: zodInternalAlias_1.z.string(),
447
- build: zodInternalAlias_1.z.string(),
448
- timestamp: zodInternalAlias_1.z.number(),
445
+ metadata: v4_1.z.object({
446
+ version: v4_1.z.string(),
447
+ build: v4_1.z.string(),
448
+ timestamp: v4_1.z.number(),
449
449
  }),
450
450
  }),
451
451
  };
@@ -488,10 +488,10 @@ describe("updateInteractableComponentProps - Partial Updates", () => {
488
488
  title: "Original Title",
489
489
  count: 0,
490
490
  },
491
- propsSchema: zodInternalAlias_1.z.object({
492
- title: zodInternalAlias_1.z.string(),
493
- count: zodInternalAlias_1.z.number(),
494
- newProperty: zodInternalAlias_1.z.string().optional(),
491
+ propsSchema: v4_1.z.object({
492
+ title: v4_1.z.string(),
493
+ count: v4_1.z.number(),
494
+ newProperty: v4_1.z.string().optional(),
495
495
  }),
496
496
  };
497
497
  let componentId = "";
@@ -521,10 +521,10 @@ describe("updateInteractableComponentProps - Partial Updates", () => {
521
521
  count: 5,
522
522
  active: true,
523
523
  },
524
- propsSchema: zodInternalAlias_1.z.object({
525
- title: zodInternalAlias_1.z.string(),
526
- count: zodInternalAlias_1.z.number(),
527
- active: zodInternalAlias_1.z.boolean(),
524
+ propsSchema: v4_1.z.object({
525
+ title: v4_1.z.string(),
526
+ count: v4_1.z.number(),
527
+ active: v4_1.z.boolean(),
528
528
  }),
529
529
  };
530
530
  let componentId = "";
@@ -565,17 +565,17 @@ describe("updateInteractableComponentProps - Partial Updates", () => {
565
565
  },
566
566
  },
567
567
  },
568
- propsSchema: zodInternalAlias_1.z.object({
569
- title: zodInternalAlias_1.z.string(),
570
- config: zodInternalAlias_1.z.object({
571
- theme: zodInternalAlias_1.z.string(),
572
- language: zodInternalAlias_1.z.string(),
573
- features: zodInternalAlias_1.z.object({
574
- notifications: zodInternalAlias_1.z.boolean(),
575
- analytics: zodInternalAlias_1.z.boolean(),
576
- experimental: zodInternalAlias_1.z.object({
577
- beta: zodInternalAlias_1.z.boolean(),
578
- alpha: zodInternalAlias_1.z.boolean(),
568
+ propsSchema: v4_1.z.object({
569
+ title: v4_1.z.string(),
570
+ config: v4_1.z.object({
571
+ theme: v4_1.z.string(),
572
+ language: v4_1.z.string(),
573
+ features: v4_1.z.object({
574
+ notifications: v4_1.z.boolean(),
575
+ analytics: v4_1.z.boolean(),
576
+ experimental: v4_1.z.object({
577
+ beta: v4_1.z.boolean(),
578
+ alpha: v4_1.z.boolean(),
579
579
  }),
580
580
  }),
581
581
  }),
@@ -639,17 +639,17 @@ describe("updateInteractableComponentProps - Partial Updates", () => {
639
639
  },
640
640
  },
641
641
  },
642
- propsSchema: zodInternalAlias_1.z.object({
643
- title: zodInternalAlias_1.z.string(),
644
- config: zodInternalAlias_1.z.object({
645
- theme: zodInternalAlias_1.z.string(),
646
- language: zodInternalAlias_1.z.string(),
647
- features: zodInternalAlias_1.z.object({
648
- notifications: zodInternalAlias_1.z.boolean(),
649
- analytics: zodInternalAlias_1.z.boolean(),
650
- experimental: zodInternalAlias_1.z.object({
651
- beta: zodInternalAlias_1.z.boolean(),
652
- alpha: zodInternalAlias_1.z.boolean(),
642
+ propsSchema: v4_1.z.object({
643
+ title: v4_1.z.string(),
644
+ config: v4_1.z.object({
645
+ theme: v4_1.z.string(),
646
+ language: v4_1.z.string(),
647
+ features: v4_1.z.object({
648
+ notifications: v4_1.z.boolean(),
649
+ analytics: v4_1.z.boolean(),
650
+ experimental: v4_1.z.object({
651
+ beta: v4_1.z.boolean(),
652
+ alpha: v4_1.z.boolean(),
653
653
  }),
654
654
  }),
655
655
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"tambo-interactable-provider-partial-updates.test.js","sourceRoot":"","sources":["../../src/providers/tambo-interactable-provider-partial-updates.test.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyD;AACzD,kDAA0B;AAC1B,uDAAqC;AAErC,+EAGuC;AAEvC,2BAA2B;AAC3B,MAAM,oBAAoB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AACvC,MAAM,uBAAuB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AAE1C,IAAI,CAAC,IAAI,CAAC,kCAAkC,EAAE,GAAG,EAAE,CAAC,CAAC;IACnD,2BAA2B,EAAE,CAAC,EAC5B,QAAQ,GAGT,EAAE,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BACF;qBACF;iBACF,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;gBAC7D,KAAK,EAAE,gBAAgB;gBACvB,MAAM,EAAE;oBACN,4DAA4D;oBAC5D,QAAQ,EAAE;wBACR,qEAAqE;wBACrE,YAAY,EAAE;4BACZ,IAAI,EAAE,IAAI,EAAE,UAAU;4BACtB,8CAA8C;yBAC/C;qBACF;iBACF;aACF,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { act, renderHook } from \"@testing-library/react\";\nimport React from \"react\";\nimport { z } from \"zodInternalAlias\";\nimport { TamboInteractableComponent } from \"../model/tambo-interactable\";\nimport {\n TamboInteractableProvider,\n useTamboInteractable,\n} from \"./tambo-interactable-provider\";\n\n// Mock the context helpers\nconst mockAddContextHelper = jest.fn();\nconst mockRemoveContextHelper = jest.fn();\n\njest.mock(\"./tambo-context-helpers-provider\", () => ({\n TamboContextHelpersProvider: ({\n children,\n }: {\n children: React.ReactNode;\n }) => <>{children}</>,\n useTamboContextHelpers: () => ({\n addContextHelper: mockAddContextHelper,\n removeContextHelper: mockRemoveContextHelper,\n }),\n}));\n\n// Mock the component provider\nconst mockRegisterTool = jest.fn();\n\njest.mock(\"./tambo-component-provider\", () => ({\n useTamboComponent: () => ({\n registerTool: mockRegisterTool,\n }),\n}));\n\n// Mock the context helper creation\njest.mock(\"../context-helpers/current-interactables-context-helper\", () => ({\n createInteractablesContextHelper: () =>\n jest.fn(() => ({\n name: \"interactables\",\n context: {\n description: \"Test interactables context\",\n components: [],\n },\n })),\n}));\n\ndescribe(\"updateInteractableComponentProps - Partial Updates\", () => {\n beforeEach(() => {\n jest.clearAllMocks();\n });\n\n const wrapper = ({ children }: { children: React.ReactNode }) => (\n <TamboInteractableProvider>{children}</TamboInteractableProvider>\n );\n\n describe(\"Partial Updates Functionality\", () => {\n it(\"should apply partial updates to existing props\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: {\n title: \"Original Title\",\n count: 0,\n active: true,\n metadata: { type: \"test\", version: \"1.0\" },\n },\n propsSchema: z.object({\n title: z.string(),\n count: z.number(),\n active: z.boolean(),\n metadata: z.object({\n type: z.string(),\n version: z.string(),\n }),\n }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n // Verify initial state\n expect(result.current.interactableComponents[0].props).toEqual({\n title: \"Original Title\",\n count: 0,\n active: true,\n metadata: { type: \"test\", version: \"1.0\" },\n });\n\n // Apply partial update - only change count\n let updateResult = \"\";\n act(() => {\n updateResult = result.current.updateInteractableComponentProps(\n componentId,\n {\n count: 5,\n },\n );\n });\n\n expect(updateResult).toBe(\"Updated successfully\");\n expect(result.current.interactableComponents[0].props).toEqual({\n title: \"Original Title\", // unchanged\n count: 5, // updated\n active: true, // unchanged\n metadata: { type: \"test\", version: \"1.0\" }, // unchanged\n });\n });\n\n it(\"should apply multiple partial updates in sequence\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: {\n title: \"Original Title\",\n count: 0,\n active: true,\n description: \"Original description\",\n },\n propsSchema: z.object({\n title: z.string(),\n count: z.number(),\n active: z.boolean(),\n description: z.string(),\n }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n // First partial update - change title and count\n act(() => {\n result.current.updateInteractableComponentProps(componentId, {\n title: \"Updated Title\",\n count: 10,\n });\n });\n\n expect(result.current.interactableComponents[0].props).toEqual({\n title: \"Updated Title\",\n count: 10,\n active: true,\n description: \"Original description\",\n });\n\n // Second partial update - change active and description\n act(() => {\n result.current.updateInteractableComponentProps(componentId, {\n active: false,\n description: \"Updated description\",\n });\n });\n\n expect(result.current.interactableComponents[0].props).toEqual({\n title: \"Updated Title\", // from previous update\n count: 10, // from previous update\n active: false, // new update\n description: \"Updated description\", // new update\n });\n });\n\n it(\"should handle nested object partial updates (shallow merge behavior)\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: {\n title: \"Original Title\",\n config: {\n theme: \"light\",\n language: \"en\",\n features: {\n notifications: true,\n analytics: false,\n },\n },\n },\n propsSchema: z.object({\n title: z.string(),\n config: z.object({\n theme: z.string(),\n language: z.string(),\n features: z.object({\n notifications: z.boolean(),\n analytics: z.boolean(),\n }),\n }),\n }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n // Partial update - replace entire config object (shallow merge behavior)\n act(() => {\n result.current.updateInteractableComponentProps(componentId, {\n config: {\n theme: \"dark\",\n // Note: language and features are not provided, so they will be undefined\n // This demonstrates the shallow merge behavior\n },\n });\n });\n\n expect(result.current.interactableComponents[0].props).toEqual({\n title: \"Original Title\",\n config: {\n theme: \"dark\", // updated\n // language and features are now undefined due to shallow merge\n },\n });\n });\n\n it(\"should handle array partial updates\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: {\n title: \"Original Title\",\n items: [\"item1\", \"item2\", \"item3\"],\n tags: [\"tag1\", \"tag2\"],\n },\n propsSchema: z.object({\n title: z.string(),\n items: z.array(z.string()),\n tags: z.array(z.string()),\n }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n // Partial update - only change items array\n act(() => {\n result.current.updateInteractableComponentProps(componentId, {\n items: [\"newItem1\", \"newItem2\"],\n });\n });\n\n expect(result.current.interactableComponents[0].props).toEqual({\n title: \"Original Title\", // unchanged\n items: [\"newItem1\", \"newItem2\"], // updated\n tags: [\"tag1\", \"tag2\"], // unchanged\n });\n });\n\n it(\"should handle null and undefined values in partial updates\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: {\n title: \"Original Title\",\n count: 5,\n description: \"Original description\",\n },\n propsSchema: z.object({\n title: z.string(),\n count: z.number(),\n description: z.string(),\n }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n // Partial update with null value\n act(() => {\n result.current.updateInteractableComponentProps(componentId, {\n description: null as any,\n });\n });\n\n expect(result.current.interactableComponents[0].props).toEqual({\n title: \"Original Title\",\n count: 5,\n description: null,\n });\n\n // Partial update with undefined value\n act(() => {\n result.current.updateInteractableComponentProps(componentId, {\n count: undefined as any,\n });\n });\n\n expect(result.current.interactableComponents[0].props).toEqual({\n title: \"Original Title\",\n count: undefined,\n description: null,\n });\n });\n });\n\n describe(\"Error Handling\", () => {\n it(\"should return error for non-existent component\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n let updateResult = \"\";\n act(() => {\n updateResult = result.current.updateInteractableComponentProps(\n \"non-existent\",\n {\n title: \"New Title\",\n },\n );\n });\n\n expect(updateResult).toBe(\"Updated successfully\");\n });\n\n it(\"should throw error when component name contains spaces\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const invalidComponent: Omit<\n TamboInteractableComponent,\n \"id\" | \"createdAt\"\n > = {\n name: \"Invalid Component Name\", // Contains spaces\n description: \"A component with spaces in name\",\n component: () => <div>Invalid</div>,\n props: { title: \"Test\" },\n propsSchema: z.object({ title: z.string() }),\n };\n\n expect(() => {\n act(() => {\n result.current.addInteractableComponent(invalidComponent);\n });\n }).toThrow(\n 'component \"Invalid Component Name\" must only contain letters, numbers, underscores, and hyphens.',\n );\n });\n\n it(\"should return warning for empty props object\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: { title: \"Original Title\" },\n propsSchema: z.object({ title: z.string() }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n let updateResult = \"\";\n act(() => {\n updateResult = result.current.updateInteractableComponentProps(\n componentId,\n {},\n );\n });\n\n expect(updateResult).toBe(\n `Warning: No props provided for component with ID ${componentId}.`,\n );\n });\n\n it(\"should return warning for null props\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: { title: \"Original Title\" },\n propsSchema: z.object({ title: z.string() }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n let updateResult = \"\";\n act(() => {\n updateResult = result.current.updateInteractableComponentProps(\n componentId,\n null as any,\n );\n });\n\n expect(updateResult).toBe(\n `Warning: No props provided for component with ID ${componentId}.`,\n );\n });\n\n it(\"should return warning for undefined props\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: { title: \"Original Title\" },\n propsSchema: z.object({ title: z.string() }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n let updateResult = \"\";\n act(() => {\n updateResult = result.current.updateInteractableComponentProps(\n componentId,\n undefined as any,\n );\n });\n\n expect(updateResult).toBe(\n `Warning: No props provided for component with ID ${componentId}.`,\n );\n });\n });\n\n describe(\"Performance and Efficiency\", () => {\n it(\"should only update changed properties without affecting others\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: {\n title: \"Original Title\",\n count: 0,\n active: true,\n metadata: { type: \"test\", version: \"1.0\" },\n items: [\"item1\", \"item2\"],\n },\n propsSchema: z.object({\n title: z.string(),\n count: z.number(),\n active: z.boolean(),\n metadata: z.object({\n type: z.string(),\n version: z.string(),\n }),\n items: z.array(z.string()),\n }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n const originalProps = result.current.interactableComponents[0].props;\n const originalMetadata = originalProps.metadata;\n const originalItems = originalProps.items;\n\n // Apply minimal partial update - only change count\n act(() => {\n result.current.updateInteractableComponentProps(componentId, {\n count: 1,\n });\n });\n\n const updatedProps = result.current.interactableComponents[0].props;\n\n // Verify that only count changed\n expect(updatedProps.count).toBe(1);\n expect(updatedProps.title).toBe(\"Original Title\");\n expect(updatedProps.active).toBe(true);\n\n // Verify that nested objects are preserved (same reference for efficiency)\n expect(updatedProps.metadata).toBe(originalMetadata);\n expect(updatedProps.items).toBe(originalItems);\n });\n\n it(\"should handle large objects efficiently with partial updates\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n // Create a component with a large initial state\n const largeData = {\n users: Array.from({ length: 1000 }, (_, i) => ({\n id: i,\n name: `User ${i}`,\n })),\n settings: {\n theme: \"light\",\n language: \"en\",\n notifications: true,\n privacy: {\n shareData: false,\n analytics: true,\n marketing: false,\n },\n },\n metadata: {\n version: \"1.0.0\",\n build: \"12345\",\n timestamp: Date.now(),\n },\n };\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component with large data\",\n component: () => <div>Test</div>,\n props: largeData,\n propsSchema: z.object({\n users: z.array(\n z.object({\n id: z.number(),\n name: z.string(),\n }),\n ),\n settings: z.object({\n theme: z.string(),\n language: z.string(),\n notifications: z.boolean(),\n privacy: z.object({\n shareData: z.boolean(),\n analytics: z.boolean(),\n marketing: z.boolean(),\n }),\n }),\n metadata: z.object({\n version: z.string(),\n build: z.string(),\n timestamp: z.number(),\n }),\n }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n const originalProps = result.current.interactableComponents[0].props;\n const originalUsers = originalProps.users;\n\n // Apply a small partial update - only change theme (shallow merge behavior)\n act(() => {\n result.current.updateInteractableComponentProps(componentId, {\n settings: {\n theme: \"dark\",\n // Note: other settings properties are not provided, so they will be undefined\n // This demonstrates the shallow merge behavior\n },\n });\n });\n\n const updatedProps = result.current.interactableComponents[0].props;\n\n // Verify the update worked\n expect(updatedProps.settings.theme).toBe(\"dark\");\n // Due to shallow merge, other properties are now undefined\n expect(updatedProps.settings.language).toBeUndefined();\n expect(updatedProps.settings.notifications).toBeUndefined();\n\n // Verify that large arrays are preserved (same reference for efficiency)\n expect(updatedProps.users).toBe(originalUsers);\n\n // Verify that metadata is preserved (not updated)\n expect(updatedProps.metadata).toBe(originalProps.metadata);\n });\n });\n\n describe(\"Edge Cases\", () => {\n it(\"should handle updating a property that doesn't exist in original props\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: {\n title: \"Original Title\",\n count: 0,\n },\n propsSchema: z.object({\n title: z.string(),\n count: z.number(),\n newProperty: z.string().optional(),\n }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n // Add a new property that wasn't in the original props\n act(() => {\n result.current.updateInteractableComponentProps(componentId, {\n newProperty: \"New Value\",\n });\n });\n\n expect(result.current.interactableComponents[0].props).toEqual({\n title: \"Original Title\",\n count: 0,\n newProperty: \"New Value\",\n });\n });\n\n it(\"should handle updating with same values (no-op updates)\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: {\n title: \"Original Title\",\n count: 5,\n active: true,\n },\n propsSchema: z.object({\n title: z.string(),\n count: z.number(),\n active: z.boolean(),\n }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n const originalProps = result.current.interactableComponents[0].props;\n\n // Update with the same values\n let updateResult = \"\";\n act(() => {\n updateResult = result.current.updateInteractableComponentProps(\n componentId,\n {\n title: \"Original Title\",\n count: 5,\n active: true,\n },\n );\n });\n\n expect(updateResult).toBe(\"Updated successfully\");\n expect(result.current.interactableComponents[0].props).toEqual(\n originalProps,\n );\n });\n\n it(\"should handle proper nested partial updates by providing complete nested structure\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: {\n title: \"Original Title\",\n config: {\n theme: \"light\",\n language: \"en\",\n features: {\n notifications: true,\n analytics: false,\n experimental: {\n beta: false,\n alpha: true,\n },\n },\n },\n },\n propsSchema: z.object({\n title: z.string(),\n config: z.object({\n theme: z.string(),\n language: z.string(),\n features: z.object({\n notifications: z.boolean(),\n analytics: z.boolean(),\n experimental: z.object({\n beta: z.boolean(),\n alpha: z.boolean(),\n }),\n }),\n }),\n }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n // Proper nested partial update - provide complete nested structure\n act(() => {\n result.current.updateInteractableComponentProps(componentId, {\n config: {\n theme: \"light\", // keep original\n language: \"en\", // keep original\n features: {\n notifications: true, // keep original\n analytics: false, // keep original\n experimental: {\n beta: true, // update this\n alpha: true, // keep original\n },\n },\n },\n });\n });\n\n expect(result.current.interactableComponents[0].props).toEqual({\n title: \"Original Title\",\n config: {\n theme: \"light\", // unchanged\n language: \"en\", // unchanged\n features: {\n notifications: true, // unchanged\n analytics: false, // unchanged\n experimental: {\n beta: true, // updated\n alpha: true, // unchanged\n },\n },\n },\n });\n });\n\n it(\"should handle complex nested partial updates (shallow merge behavior)\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: {\n title: \"Original Title\",\n config: {\n theme: \"light\",\n language: \"en\",\n features: {\n notifications: true,\n analytics: false,\n experimental: {\n beta: false,\n alpha: true,\n },\n },\n },\n },\n propsSchema: z.object({\n title: z.string(),\n config: z.object({\n theme: z.string(),\n language: z.string(),\n features: z.object({\n notifications: z.boolean(),\n analytics: z.boolean(),\n experimental: z.object({\n beta: z.boolean(),\n alpha: z.boolean(),\n }),\n }),\n }),\n }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n // Deep nested partial update - only change beta flag (shallow merge behavior)\n act(() => {\n result.current.updateInteractableComponentProps(componentId, {\n config: {\n features: {\n experimental: {\n beta: true,\n // Note: alpha is not provided, so it will be undefined\n // This demonstrates the shallow merge behavior\n },\n },\n },\n });\n });\n\n expect(result.current.interactableComponents[0].props).toEqual({\n title: \"Original Title\",\n config: {\n // theme and language are now undefined due to shallow merge\n features: {\n // notifications and analytics are now undefined due to shallow merge\n experimental: {\n beta: true, // updated\n // alpha is now undefined due to shallow merge\n },\n },\n },\n });\n });\n });\n});\n"]}
1
+ {"version":3,"file":"tambo-interactable-provider-partial-updates.test.js","sourceRoot":"","sources":["../../src/providers/tambo-interactable-provider-part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C;YAEH,8EAA8E;YAC9E,IAAA,WAAG,EAAC,GAAG,EAAE;gBACP,MAAM,CAAC,OAAO,CAAC,gCAAgC,CAAC,WAAW,EAAE;oBAC3D,MAAM,EAAE;wBACN,QAAQ,EAAE;4BACR,YAAY,EAAE;gCACZ,IAAI,EAAE,IAAI;gCACV,uDAAuD;gCACvD,+CAA+C;6BAChD;yBACF;qBACF;iBACF,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;gBAC7D,KAAK,EAAE,gBAAgB;gBACvB,MAAM,EAAE;oBACN,4DAA4D;oBAC5D,QAAQ,EAAE;wBACR,qEAAqE;wBACrE,YAAY,EAAE;4BACZ,IAAI,EAAE,IAAI,EAAE,UAAU;4BACtB,8CAA8C;yBAC/C;qBACF;iBACF;aACF,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { act, renderHook } from \"@testing-library/react\";\nimport React from \"react\";\nimport { z } from \"zod/v4\";\nimport { TamboInteractableComponent } from \"../model/tambo-interactable\";\nimport {\n TamboInteractableProvider,\n useTamboInteractable,\n} from \"./tambo-interactable-provider\";\n\n// Mock the context helpers\nconst mockAddContextHelper = jest.fn();\nconst mockRemoveContextHelper = jest.fn();\n\njest.mock(\"./tambo-context-helpers-provider\", () => ({\n TamboContextHelpersProvider: ({\n children,\n }: {\n children: React.ReactNode;\n }) => <>{children}</>,\n useTamboContextHelpers: () => ({\n addContextHelper: mockAddContextHelper,\n removeContextHelper: mockRemoveContextHelper,\n }),\n}));\n\n// Mock the component provider\nconst mockRegisterTool = jest.fn();\n\njest.mock(\"./tambo-component-provider\", () => ({\n useTamboComponent: () => ({\n registerTool: mockRegisterTool,\n }),\n}));\n\n// Mock the context helper creation\njest.mock(\"../context-helpers/current-interactables-context-helper\", () => ({\n createInteractablesContextHelper: () =>\n jest.fn(() => ({\n name: \"interactables\",\n context: {\n description: \"Test interactables context\",\n components: [],\n },\n })),\n}));\n\ndescribe(\"updateInteractableComponentProps - Partial Updates\", () => {\n beforeEach(() => {\n jest.clearAllMocks();\n });\n\n const wrapper = ({ children }: { children: React.ReactNode }) => (\n <TamboInteractableProvider>{children}</TamboInteractableProvider>\n );\n\n describe(\"Partial Updates Functionality\", () => {\n it(\"should apply partial updates to existing props\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: {\n title: \"Original Title\",\n count: 0,\n active: true,\n metadata: { type: \"test\", version: \"1.0\" },\n },\n propsSchema: z.object({\n title: z.string(),\n count: z.number(),\n active: z.boolean(),\n metadata: z.object({\n type: z.string(),\n version: z.string(),\n }),\n }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n // Verify initial state\n expect(result.current.interactableComponents[0].props).toEqual({\n title: \"Original Title\",\n count: 0,\n active: true,\n metadata: { type: \"test\", version: \"1.0\" },\n });\n\n // Apply partial update - only change count\n let updateResult = \"\";\n act(() => {\n updateResult = result.current.updateInteractableComponentProps(\n componentId,\n {\n count: 5,\n },\n );\n });\n\n expect(updateResult).toBe(\"Updated successfully\");\n expect(result.current.interactableComponents[0].props).toEqual({\n title: \"Original Title\", // unchanged\n count: 5, // updated\n active: true, // unchanged\n metadata: { type: \"test\", version: \"1.0\" }, // unchanged\n });\n });\n\n it(\"should apply multiple partial updates in sequence\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: {\n title: \"Original Title\",\n count: 0,\n active: true,\n description: \"Original description\",\n },\n propsSchema: z.object({\n title: z.string(),\n count: z.number(),\n active: z.boolean(),\n description: z.string(),\n }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n // First partial update - change title and count\n act(() => {\n result.current.updateInteractableComponentProps(componentId, {\n title: \"Updated Title\",\n count: 10,\n });\n });\n\n expect(result.current.interactableComponents[0].props).toEqual({\n title: \"Updated Title\",\n count: 10,\n active: true,\n description: \"Original description\",\n });\n\n // Second partial update - change active and description\n act(() => {\n result.current.updateInteractableComponentProps(componentId, {\n active: false,\n description: \"Updated description\",\n });\n });\n\n expect(result.current.interactableComponents[0].props).toEqual({\n title: \"Updated Title\", // from previous update\n count: 10, // from previous update\n active: false, // new update\n description: \"Updated description\", // new update\n });\n });\n\n it(\"should handle nested object partial updates (shallow merge behavior)\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: {\n title: \"Original Title\",\n config: {\n theme: \"light\",\n language: \"en\",\n features: {\n notifications: true,\n analytics: false,\n },\n },\n },\n propsSchema: z.object({\n title: z.string(),\n config: z.object({\n theme: z.string(),\n language: z.string(),\n features: z.object({\n notifications: z.boolean(),\n analytics: z.boolean(),\n }),\n }),\n }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n // Partial update - replace entire config object (shallow merge behavior)\n act(() => {\n result.current.updateInteractableComponentProps(componentId, {\n config: {\n theme: \"dark\",\n // Note: language and features are not provided, so they will be undefined\n // This demonstrates the shallow merge behavior\n },\n });\n });\n\n expect(result.current.interactableComponents[0].props).toEqual({\n title: \"Original Title\",\n config: {\n theme: \"dark\", // updated\n // language and features are now undefined due to shallow merge\n },\n });\n });\n\n it(\"should handle array partial updates\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: {\n title: \"Original Title\",\n items: [\"item1\", \"item2\", \"item3\"],\n tags: [\"tag1\", \"tag2\"],\n },\n propsSchema: z.object({\n title: z.string(),\n items: z.array(z.string()),\n tags: z.array(z.string()),\n }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n // Partial update - only change items array\n act(() => {\n result.current.updateInteractableComponentProps(componentId, {\n items: [\"newItem1\", \"newItem2\"],\n });\n });\n\n expect(result.current.interactableComponents[0].props).toEqual({\n title: \"Original Title\", // unchanged\n items: [\"newItem1\", \"newItem2\"], // updated\n tags: [\"tag1\", \"tag2\"], // unchanged\n });\n });\n\n it(\"should handle null and undefined values in partial updates\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: {\n title: \"Original Title\",\n count: 5,\n description: \"Original description\",\n },\n propsSchema: z.object({\n title: z.string(),\n count: z.number(),\n description: z.string(),\n }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n // Partial update with null value\n act(() => {\n result.current.updateInteractableComponentProps(componentId, {\n description: null as any,\n });\n });\n\n expect(result.current.interactableComponents[0].props).toEqual({\n title: \"Original Title\",\n count: 5,\n description: null,\n });\n\n // Partial update with undefined value\n act(() => {\n result.current.updateInteractableComponentProps(componentId, {\n count: undefined as any,\n });\n });\n\n expect(result.current.interactableComponents[0].props).toEqual({\n title: \"Original Title\",\n count: undefined,\n description: null,\n });\n });\n });\n\n describe(\"Error Handling\", () => {\n it(\"should return error for non-existent component\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n let updateResult = \"\";\n act(() => {\n updateResult = result.current.updateInteractableComponentProps(\n \"non-existent\",\n {\n title: \"New Title\",\n },\n );\n });\n\n expect(updateResult).toBe(\"Updated successfully\");\n });\n\n it(\"should throw error when component name contains spaces\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const invalidComponent: Omit<\n TamboInteractableComponent,\n \"id\" | \"createdAt\"\n > = {\n name: \"Invalid Component Name\", // Contains spaces\n description: \"A component with spaces in name\",\n component: () => <div>Invalid</div>,\n props: { title: \"Test\" },\n propsSchema: z.object({ title: z.string() }),\n };\n\n expect(() => {\n act(() => {\n result.current.addInteractableComponent(invalidComponent);\n });\n }).toThrow(\n 'component \"Invalid Component Name\" must only contain letters, numbers, underscores, and hyphens.',\n );\n });\n\n it(\"should return warning for empty props object\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: { title: \"Original Title\" },\n propsSchema: z.object({ title: z.string() }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n let updateResult = \"\";\n act(() => {\n updateResult = result.current.updateInteractableComponentProps(\n componentId,\n {},\n );\n });\n\n expect(updateResult).toBe(\n `Warning: No props provided for component with ID ${componentId}.`,\n );\n });\n\n it(\"should return warning for null props\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: { title: \"Original Title\" },\n propsSchema: z.object({ title: z.string() }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n let updateResult = \"\";\n act(() => {\n updateResult = result.current.updateInteractableComponentProps(\n componentId,\n null as any,\n );\n });\n\n expect(updateResult).toBe(\n `Warning: No props provided for component with ID ${componentId}.`,\n );\n });\n\n it(\"should return warning for undefined props\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: { title: \"Original Title\" },\n propsSchema: z.object({ title: z.string() }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n let updateResult = \"\";\n act(() => {\n updateResult = result.current.updateInteractableComponentProps(\n componentId,\n undefined as any,\n );\n });\n\n expect(updateResult).toBe(\n `Warning: No props provided for component with ID ${componentId}.`,\n );\n });\n });\n\n describe(\"Performance and Efficiency\", () => {\n it(\"should only update changed properties without affecting others\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: {\n title: \"Original Title\",\n count: 0,\n active: true,\n metadata: { type: \"test\", version: \"1.0\" },\n items: [\"item1\", \"item2\"],\n },\n propsSchema: z.object({\n title: z.string(),\n count: z.number(),\n active: z.boolean(),\n metadata: z.object({\n type: z.string(),\n version: z.string(),\n }),\n items: z.array(z.string()),\n }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n const originalProps = result.current.interactableComponents[0].props;\n const originalMetadata = originalProps.metadata;\n const originalItems = originalProps.items;\n\n // Apply minimal partial update - only change count\n act(() => {\n result.current.updateInteractableComponentProps(componentId, {\n count: 1,\n });\n });\n\n const updatedProps = result.current.interactableComponents[0].props;\n\n // Verify that only count changed\n expect(updatedProps.count).toBe(1);\n expect(updatedProps.title).toBe(\"Original Title\");\n expect(updatedProps.active).toBe(true);\n\n // Verify that nested objects are preserved (same reference for efficiency)\n expect(updatedProps.metadata).toBe(originalMetadata);\n expect(updatedProps.items).toBe(originalItems);\n });\n\n it(\"should handle large objects efficiently with partial updates\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n // Create a component with a large initial state\n const largeData = {\n users: Array.from({ length: 1000 }, (_, i) => ({\n id: i,\n name: `User ${i}`,\n })),\n settings: {\n theme: \"light\",\n language: \"en\",\n notifications: true,\n privacy: {\n shareData: false,\n analytics: true,\n marketing: false,\n },\n },\n metadata: {\n version: \"1.0.0\",\n build: \"12345\",\n timestamp: Date.now(),\n },\n };\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component with large data\",\n component: () => <div>Test</div>,\n props: largeData,\n propsSchema: z.object({\n users: z.array(\n z.object({\n id: z.number(),\n name: z.string(),\n }),\n ),\n settings: z.object({\n theme: z.string(),\n language: z.string(),\n notifications: z.boolean(),\n privacy: z.object({\n shareData: z.boolean(),\n analytics: z.boolean(),\n marketing: z.boolean(),\n }),\n }),\n metadata: z.object({\n version: z.string(),\n build: z.string(),\n timestamp: z.number(),\n }),\n }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n const originalProps = result.current.interactableComponents[0].props;\n const originalUsers = originalProps.users;\n\n // Apply a small partial update - only change theme (shallow merge behavior)\n act(() => {\n result.current.updateInteractableComponentProps(componentId, {\n settings: {\n theme: \"dark\",\n // Note: other settings properties are not provided, so they will be undefined\n // This demonstrates the shallow merge behavior\n },\n });\n });\n\n const updatedProps = result.current.interactableComponents[0].props;\n\n // Verify the update worked\n expect(updatedProps.settings.theme).toBe(\"dark\");\n // Due to shallow merge, other properties are now undefined\n expect(updatedProps.settings.language).toBeUndefined();\n expect(updatedProps.settings.notifications).toBeUndefined();\n\n // Verify that large arrays are preserved (same reference for efficiency)\n expect(updatedProps.users).toBe(originalUsers);\n\n // Verify that metadata is preserved (not updated)\n expect(updatedProps.metadata).toBe(originalProps.metadata);\n });\n });\n\n describe(\"Edge Cases\", () => {\n it(\"should handle updating a property that doesn't exist in original props\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: {\n title: \"Original Title\",\n count: 0,\n },\n propsSchema: z.object({\n title: z.string(),\n count: z.number(),\n newProperty: z.string().optional(),\n }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n // Add a new property that wasn't in the original props\n act(() => {\n result.current.updateInteractableComponentProps(componentId, {\n newProperty: \"New Value\",\n });\n });\n\n expect(result.current.interactableComponents[0].props).toEqual({\n title: \"Original Title\",\n count: 0,\n newProperty: \"New Value\",\n });\n });\n\n it(\"should handle updating with same values (no-op updates)\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: {\n title: \"Original Title\",\n count: 5,\n active: true,\n },\n propsSchema: z.object({\n title: z.string(),\n count: z.number(),\n active: z.boolean(),\n }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n const originalProps = result.current.interactableComponents[0].props;\n\n // Update with the same values\n let updateResult = \"\";\n act(() => {\n updateResult = result.current.updateInteractableComponentProps(\n componentId,\n {\n title: \"Original Title\",\n count: 5,\n active: true,\n },\n );\n });\n\n expect(updateResult).toBe(\"Updated successfully\");\n expect(result.current.interactableComponents[0].props).toEqual(\n originalProps,\n );\n });\n\n it(\"should handle proper nested partial updates by providing complete nested structure\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: {\n title: \"Original Title\",\n config: {\n theme: \"light\",\n language: \"en\",\n features: {\n notifications: true,\n analytics: false,\n experimental: {\n beta: false,\n alpha: true,\n },\n },\n },\n },\n propsSchema: z.object({\n title: z.string(),\n config: z.object({\n theme: z.string(),\n language: z.string(),\n features: z.object({\n notifications: z.boolean(),\n analytics: z.boolean(),\n experimental: z.object({\n beta: z.boolean(),\n alpha: z.boolean(),\n }),\n }),\n }),\n }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n // Proper nested partial update - provide complete nested structure\n act(() => {\n result.current.updateInteractableComponentProps(componentId, {\n config: {\n theme: \"light\", // keep original\n language: \"en\", // keep original\n features: {\n notifications: true, // keep original\n analytics: false, // keep original\n experimental: {\n beta: true, // update this\n alpha: true, // keep original\n },\n },\n },\n });\n });\n\n expect(result.current.interactableComponents[0].props).toEqual({\n title: \"Original Title\",\n config: {\n theme: \"light\", // unchanged\n language: \"en\", // unchanged\n features: {\n notifications: true, // unchanged\n analytics: false, // unchanged\n experimental: {\n beta: true, // updated\n alpha: true, // unchanged\n },\n },\n },\n });\n });\n\n it(\"should handle complex nested partial updates (shallow merge behavior)\", () => {\n const { result } = renderHook(() => useTamboInteractable(), { wrapper });\n\n const component: Omit<TamboInteractableComponent, \"id\" | \"createdAt\"> = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => <div>Test</div>,\n props: {\n title: \"Original Title\",\n config: {\n theme: \"light\",\n language: \"en\",\n features: {\n notifications: true,\n analytics: false,\n experimental: {\n beta: false,\n alpha: true,\n },\n },\n },\n },\n propsSchema: z.object({\n title: z.string(),\n config: z.object({\n theme: z.string(),\n language: z.string(),\n features: z.object({\n notifications: z.boolean(),\n analytics: z.boolean(),\n experimental: z.object({\n beta: z.boolean(),\n alpha: z.boolean(),\n }),\n }),\n }),\n }),\n };\n\n let componentId = \"\";\n act(() => {\n componentId = result.current.addInteractableComponent(component);\n });\n\n // Deep nested partial update - only change beta flag (shallow merge behavior)\n act(() => {\n result.current.updateInteractableComponentProps(componentId, {\n config: {\n features: {\n experimental: {\n beta: true,\n // Note: alpha is not provided, so it will be undefined\n // This demonstrates the shallow merge behavior\n },\n },\n },\n });\n });\n\n expect(result.current.interactableComponents[0].props).toEqual({\n title: \"Original Title\",\n config: {\n // theme and language are now undefined due to shallow merge\n features: {\n // notifications and analytics are now undefined due to shallow merge\n experimental: {\n beta: true, // updated\n // alpha is now undefined due to shallow merge\n },\n },\n },\n });\n });\n });\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"tambo-interactable-provider.d.ts","sourceRoot":"","sources":["../../src/providers/tambo-interactable-provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAEZ,iBAAiB,EAKlB,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,6BAA6B,CAAC;AAKrC,QAAA,MAAM,wBAAwB,yCAQ5B,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAoRjE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,gCAEhC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;GAS3C,CAAC"}
1
+ {"version":3,"file":"tambo-interactable-provider.d.ts","sourceRoot":"","sources":["../../src/providers/tambo-interactable-provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAEZ,iBAAiB,EAKlB,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,6BAA6B,CAAC;AAKrC,QAAA,MAAM,wBAAwB,yCAQ5B,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA0RjE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,gCAEhC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;GAS3C,CAAC"}