@tambo-ai/react 0.65.3 → 0.66.1
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 +120 -20
- package/dist/{providers/hoc → hoc}/with-tambo-interactable.d.ts +2 -2
- package/dist/hoc/with-tambo-interactable.d.ts.map +1 -0
- package/dist/{providers/hoc → hoc}/with-tambo-interactable.js +29 -2
- package/dist/hoc/with-tambo-interactable.js.map +1 -0
- package/dist/hoc/with-tambo-interactable.test.d.ts +2 -0
- package/dist/hoc/with-tambo-interactable.test.d.ts.map +1 -0
- package/dist/hoc/with-tambo-interactable.test.js +192 -0
- package/dist/hoc/with-tambo-interactable.test.js.map +1 -0
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +2 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/use-current-message.d.ts +51 -7
- package/dist/hooks/use-current-message.d.ts.map +1 -1
- package/dist/hooks/use-current-message.js +50 -6
- package/dist/hooks/use-current-message.js.map +1 -1
- package/dist/hooks/use-current-message.test.d.ts +2 -0
- package/dist/hooks/use-current-message.test.d.ts.map +1 -0
- package/dist/hooks/use-current-message.test.js +264 -0
- package/dist/hooks/use-current-message.test.js.map +1 -0
- package/dist/index.d.ts +10 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +2 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/mcp-hooks.d.ts +77 -6
- package/dist/mcp/mcp-hooks.d.ts.map +1 -1
- package/dist/mcp/mcp-hooks.js +104 -40
- package/dist/mcp/mcp-hooks.js.map +1 -1
- package/dist/mcp/mcp-hooks.test.js +83 -18
- package/dist/mcp/mcp-hooks.test.js.map +1 -1
- package/dist/mcp/tambo-mcp-provider.d.ts.map +1 -1
- package/dist/mcp/tambo-mcp-provider.js +2 -1
- package/dist/mcp/tambo-mcp-provider.js.map +1 -1
- package/dist/model/component-metadata.d.ts +444 -14
- package/dist/model/component-metadata.d.ts.map +1 -1
- package/dist/model/component-metadata.js.map +1 -1
- package/dist/model/generate-component-response.d.ts +12 -1
- package/dist/model/generate-component-response.d.ts.map +1 -1
- package/dist/model/generate-component-response.js.map +1 -1
- package/dist/model/resource-info.d.ts +55 -0
- package/dist/model/resource-info.d.ts.map +1 -0
- package/dist/model/resource-info.js +3 -0
- package/dist/model/resource-info.js.map +1 -0
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/tambo-component-provider.d.ts +4 -4
- package/dist/providers/tambo-component-provider.d.ts.map +1 -1
- package/dist/providers/tambo-component-provider.js.map +1 -1
- package/dist/providers/tambo-interactable-provider-partial-updates.test.js +87 -87
- package/dist/providers/tambo-interactable-provider-partial-updates.test.js.map +1 -1
- package/dist/providers/tambo-interactable-provider.d.ts +2 -3
- package/dist/providers/tambo-interactable-provider.d.ts.map +1 -1
- package/dist/providers/tambo-interactable-provider.js +47 -41
- package/dist/providers/tambo-interactable-provider.js.map +1 -1
- package/dist/providers/tambo-interactables-additional-context-edge-cases.test.js +9 -9
- package/dist/providers/tambo-interactables-additional-context-edge-cases.test.js.map +1 -1
- package/dist/providers/tambo-interactables-additional-context.test.js +11 -11
- package/dist/providers/tambo-interactables-additional-context.test.js.map +1 -1
- package/dist/providers/tambo-registry-provider.d.ts +28 -7
- package/dist/providers/tambo-registry-provider.d.ts.map +1 -1
- package/dist/providers/tambo-registry-provider.js +70 -181
- package/dist/providers/tambo-registry-provider.js.map +1 -1
- package/dist/providers/tambo-registry-provider.test.js +152 -30
- package/dist/providers/tambo-registry-provider.test.js.map +1 -1
- package/dist/providers/tambo-registry-schema-compat.test.d.ts +2 -0
- package/dist/providers/tambo-registry-schema-compat.test.d.ts.map +1 -0
- package/dist/providers/tambo-registry-schema-compat.test.js +616 -0
- package/dist/providers/tambo-registry-schema-compat.test.js.map +1 -0
- package/dist/providers/tambo-stubs.d.ts +2 -2
- package/dist/providers/tambo-stubs.d.ts.map +1 -1
- package/dist/providers/tambo-stubs.js +5 -0
- package/dist/providers/tambo-stubs.js.map +1 -1
- package/dist/providers/tambo-thread-input-provider.d.ts +1 -0
- package/dist/providers/tambo-thread-input-provider.d.ts.map +1 -1
- package/dist/providers/tambo-thread-input-provider.js +3 -3
- package/dist/providers/tambo-thread-input-provider.js.map +1 -1
- package/dist/providers/tambo-thread-provider.d.ts.map +1 -1
- package/dist/providers/tambo-thread-provider.js.map +1 -1
- package/dist/providers/tambo-thread-provider.test.js +32 -36
- package/dist/providers/tambo-thread-provider.test.js.map +1 -1
- package/dist/schema/index.d.ts +6 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +18 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/json-schema.d.ts +35 -0
- package/dist/schema/json-schema.d.ts.map +1 -0
- package/dist/schema/json-schema.js +103 -0
- package/dist/schema/json-schema.js.map +1 -0
- package/dist/schema/schema.d.ts +66 -0
- package/dist/schema/schema.d.ts.map +1 -0
- package/dist/schema/schema.js +189 -0
- package/dist/schema/schema.js.map +1 -0
- package/dist/schema/schema.test.d.ts +2 -0
- package/dist/schema/schema.test.d.ts.map +1 -0
- package/dist/schema/schema.test.js +41 -0
- package/dist/schema/schema.test.js.map +1 -0
- package/dist/schema/standard-schema.d.ts +21 -0
- package/dist/schema/standard-schema.d.ts.map +1 -0
- package/dist/schema/standard-schema.js +37 -0
- package/dist/schema/standard-schema.js.map +1 -0
- package/dist/schema/validate.d.ts +14 -0
- package/dist/schema/validate.d.ts.map +1 -0
- package/dist/schema/validate.js +148 -0
- package/dist/schema/validate.js.map +1 -0
- package/dist/schema/validate.test.d.ts +2 -0
- package/dist/schema/validate.test.d.ts.map +1 -0
- package/dist/schema/validate.test.js +128 -0
- package/dist/schema/validate.test.js.map +1 -0
- package/dist/schema/zod.d.ts +54 -0
- package/dist/schema/zod.d.ts.map +1 -0
- package/dist/schema/zod.js +147 -0
- package/dist/schema/zod.js.map +1 -0
- package/dist/testing/tools.d.ts +29 -15
- package/dist/testing/tools.d.ts.map +1 -1
- package/dist/testing/tools.js +64 -19
- package/dist/testing/tools.js.map +1 -1
- package/dist/util/generate-component.d.ts.map +1 -1
- package/dist/util/generate-component.js +3 -3
- package/dist/util/generate-component.js.map +1 -1
- package/dist/util/mcp-server-utils.d.ts +23 -0
- package/dist/util/mcp-server-utils.d.ts.map +1 -0
- package/dist/util/mcp-server-utils.js +107 -0
- package/dist/util/mcp-server-utils.js.map +1 -0
- package/dist/util/mcp-server-utils.test.d.ts +2 -0
- package/dist/util/mcp-server-utils.test.d.ts.map +1 -0
- package/dist/util/mcp-server-utils.test.js +287 -0
- package/dist/util/mcp-server-utils.test.js.map +1 -0
- package/dist/util/message-builder.d.ts +2 -1
- package/dist/util/message-builder.d.ts.map +1 -1
- package/dist/util/message-builder.js +54 -36
- package/dist/util/message-builder.js.map +1 -1
- package/dist/util/message-builder.test.js +500 -13
- package/dist/util/message-builder.test.js.map +1 -1
- package/dist/util/registry-validators.d.ts +26 -0
- package/dist/util/registry-validators.d.ts.map +1 -0
- package/dist/util/registry-validators.js +105 -0
- package/dist/util/registry-validators.js.map +1 -0
- package/dist/util/registry-validators.test.d.ts +2 -0
- package/dist/util/registry-validators.test.d.ts.map +1 -0
- package/dist/util/registry-validators.test.js +235 -0
- package/dist/util/registry-validators.test.js.map +1 -0
- package/dist/util/registry.d.ts +35 -7
- package/dist/util/registry.d.ts.map +1 -1
- package/dist/util/registry.js +60 -77
- package/dist/util/registry.js.map +1 -1
- package/dist/util/registry.test.d.ts +2 -0
- package/dist/util/registry.test.d.ts.map +1 -0
- package/dist/util/registry.test.js +204 -0
- package/dist/util/registry.test.js.map +1 -0
- package/dist/util/resource-validators.d.ts +16 -0
- package/dist/util/resource-validators.d.ts.map +1 -0
- package/dist/util/resource-validators.js +34 -0
- package/dist/util/resource-validators.js.map +1 -0
- package/dist/util/tool-caller.d.ts +2 -2
- package/dist/util/tool-caller.d.ts.map +1 -1
- package/dist/util/tool-caller.js +12 -4
- package/dist/util/tool-caller.js.map +1 -1
- package/esm/{providers/hoc → hoc}/with-tambo-interactable.d.ts +2 -2
- package/esm/hoc/with-tambo-interactable.d.ts.map +1 -0
- package/esm/{providers/hoc → hoc}/with-tambo-interactable.js +29 -2
- package/esm/hoc/with-tambo-interactable.js.map +1 -0
- package/esm/hoc/with-tambo-interactable.test.d.ts +2 -0
- package/esm/hoc/with-tambo-interactable.test.d.ts.map +1 -0
- package/esm/hoc/with-tambo-interactable.test.js +187 -0
- package/esm/hoc/with-tambo-interactable.test.js.map +1 -0
- package/esm/hooks/index.d.ts +1 -1
- package/esm/hooks/index.d.ts.map +1 -1
- package/esm/hooks/index.js +1 -1
- package/esm/hooks/index.js.map +1 -1
- package/esm/hooks/use-current-message.d.ts +51 -7
- package/esm/hooks/use-current-message.d.ts.map +1 -1
- package/esm/hooks/use-current-message.js +48 -5
- package/esm/hooks/use-current-message.js.map +1 -1
- package/esm/hooks/use-current-message.test.d.ts +2 -0
- package/esm/hooks/use-current-message.test.d.ts.map +1 -0
- package/esm/hooks/use-current-message.test.js +259 -0
- package/esm/hooks/use-current-message.test.js.map +1 -0
- package/esm/index.d.ts +10 -8
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +4 -2
- package/esm/index.js.map +1 -1
- package/esm/mcp/index.d.ts +1 -1
- package/esm/mcp/index.d.ts.map +1 -1
- package/esm/mcp/index.js +1 -1
- package/esm/mcp/index.js.map +1 -1
- package/esm/mcp/mcp-hooks.d.ts +77 -6
- package/esm/mcp/mcp-hooks.d.ts.map +1 -1
- package/esm/mcp/mcp-hooks.js +103 -40
- package/esm/mcp/mcp-hooks.js.map +1 -1
- package/esm/mcp/mcp-hooks.test.js +84 -19
- package/esm/mcp/mcp-hooks.test.js.map +1 -1
- package/esm/mcp/tambo-mcp-provider.d.ts.map +1 -1
- package/esm/mcp/tambo-mcp-provider.js +2 -1
- package/esm/mcp/tambo-mcp-provider.js.map +1 -1
- package/esm/model/component-metadata.d.ts +444 -14
- package/esm/model/component-metadata.d.ts.map +1 -1
- package/esm/model/component-metadata.js.map +1 -1
- package/esm/model/generate-component-response.d.ts +12 -1
- package/esm/model/generate-component-response.d.ts.map +1 -1
- package/esm/model/generate-component-response.js.map +1 -1
- package/esm/model/resource-info.d.ts +55 -0
- package/esm/model/resource-info.d.ts.map +1 -0
- package/esm/model/resource-info.js +2 -0
- package/esm/model/resource-info.js.map +1 -0
- package/esm/providers/index.d.ts +1 -1
- package/esm/providers/index.d.ts.map +1 -1
- package/esm/providers/index.js.map +1 -1
- package/esm/providers/tambo-component-provider.d.ts +4 -4
- package/esm/providers/tambo-component-provider.d.ts.map +1 -1
- package/esm/providers/tambo-component-provider.js.map +1 -1
- package/esm/providers/tambo-interactable-provider-partial-updates.test.js +1 -1
- package/esm/providers/tambo-interactable-provider-partial-updates.test.js.map +1 -1
- package/esm/providers/tambo-interactable-provider.d.ts +2 -3
- package/esm/providers/tambo-interactable-provider.d.ts.map +1 -1
- package/esm/providers/tambo-interactable-provider.js +44 -38
- package/esm/providers/tambo-interactable-provider.js.map +1 -1
- package/esm/providers/tambo-interactables-additional-context-edge-cases.test.js +3 -3
- package/esm/providers/tambo-interactables-additional-context-edge-cases.test.js.map +1 -1
- package/esm/providers/tambo-interactables-additional-context.test.js +3 -3
- package/esm/providers/tambo-interactables-additional-context.test.js.map +1 -1
- package/esm/providers/tambo-registry-provider.d.ts +28 -7
- package/esm/providers/tambo-registry-provider.d.ts.map +1 -1
- package/esm/providers/tambo-registry-provider.js +67 -175
- package/esm/providers/tambo-registry-provider.js.map +1 -1
- package/esm/providers/tambo-registry-provider.test.js +148 -26
- package/esm/providers/tambo-registry-provider.test.js.map +1 -1
- package/esm/providers/tambo-registry-schema-compat.test.d.ts +2 -0
- package/esm/providers/tambo-registry-schema-compat.test.d.ts.map +1 -0
- package/esm/providers/tambo-registry-schema-compat.test.js +578 -0
- package/esm/providers/tambo-registry-schema-compat.test.js.map +1 -0
- package/esm/providers/tambo-stubs.d.ts +2 -2
- package/esm/providers/tambo-stubs.d.ts.map +1 -1
- package/esm/providers/tambo-stubs.js +5 -0
- package/esm/providers/tambo-stubs.js.map +1 -1
- package/esm/providers/tambo-thread-input-provider.d.ts +1 -0
- package/esm/providers/tambo-thread-input-provider.d.ts.map +1 -1
- package/esm/providers/tambo-thread-input-provider.js +3 -3
- package/esm/providers/tambo-thread-input-provider.js.map +1 -1
- package/esm/providers/tambo-thread-provider.d.ts.map +1 -1
- package/esm/providers/tambo-thread-provider.js.map +1 -1
- package/esm/providers/tambo-thread-provider.test.js +24 -28
- package/esm/providers/tambo-thread-provider.test.js.map +1 -1
- package/esm/schema/index.d.ts +6 -0
- package/esm/schema/index.d.ts.map +1 -0
- package/esm/schema/index.js +6 -0
- package/esm/schema/index.js.map +1 -0
- package/esm/schema/json-schema.d.ts +35 -0
- package/esm/schema/json-schema.d.ts.map +1 -0
- package/esm/schema/json-schema.js +98 -0
- package/esm/schema/json-schema.js.map +1 -0
- package/esm/schema/schema.d.ts +66 -0
- package/esm/schema/schema.d.ts.map +1 -0
- package/esm/schema/schema.js +182 -0
- package/esm/schema/schema.js.map +1 -0
- package/esm/schema/schema.test.d.ts +2 -0
- package/esm/schema/schema.test.d.ts.map +1 -0
- package/esm/schema/schema.test.js +39 -0
- package/esm/schema/schema.test.js.map +1 -0
- package/esm/schema/standard-schema.d.ts +21 -0
- package/esm/schema/standard-schema.d.ts.map +1 -0
- package/esm/schema/standard-schema.js +34 -0
- package/esm/schema/standard-schema.js.map +1 -0
- package/esm/schema/validate.d.ts +14 -0
- package/esm/schema/validate.d.ts.map +1 -0
- package/esm/schema/validate.js +145 -0
- package/esm/schema/validate.js.map +1 -0
- package/esm/schema/validate.test.d.ts +2 -0
- package/esm/schema/validate.test.d.ts.map +1 -0
- package/esm/schema/validate.test.js +126 -0
- package/esm/schema/validate.test.js.map +1 -0
- package/esm/schema/zod.d.ts +54 -0
- package/esm/schema/zod.d.ts.map +1 -0
- package/esm/schema/zod.js +136 -0
- package/esm/schema/zod.js.map +1 -0
- package/esm/testing/tools.d.ts +29 -15
- package/esm/testing/tools.d.ts.map +1 -1
- package/esm/testing/tools.js +62 -16
- package/esm/testing/tools.js.map +1 -1
- package/esm/util/generate-component.d.ts.map +1 -1
- package/esm/util/generate-component.js +3 -3
- package/esm/util/generate-component.js.map +1 -1
- package/esm/util/mcp-server-utils.d.ts +23 -0
- package/esm/util/mcp-server-utils.d.ts.map +1 -0
- package/esm/util/mcp-server-utils.js +102 -0
- package/esm/util/mcp-server-utils.js.map +1 -0
- package/esm/util/mcp-server-utils.test.d.ts +2 -0
- package/esm/util/mcp-server-utils.test.d.ts.map +1 -0
- package/esm/util/mcp-server-utils.test.js +285 -0
- package/esm/util/mcp-server-utils.test.js.map +1 -0
- package/esm/util/message-builder.d.ts +2 -1
- package/esm/util/message-builder.d.ts.map +1 -1
- package/esm/util/message-builder.js +54 -36
- package/esm/util/message-builder.js.map +1 -1
- package/esm/util/message-builder.test.js +500 -13
- package/esm/util/message-builder.test.js.map +1 -1
- package/esm/util/registry-validators.d.ts +26 -0
- package/esm/util/registry-validators.d.ts.map +1 -0
- package/esm/util/registry-validators.js +100 -0
- package/esm/util/registry-validators.js.map +1 -0
- package/esm/util/registry-validators.test.d.ts +2 -0
- package/esm/util/registry-validators.test.d.ts.map +1 -0
- package/esm/util/registry-validators.test.js +233 -0
- package/esm/util/registry-validators.test.js.map +1 -0
- package/esm/util/registry.d.ts +35 -7
- package/esm/util/registry.d.ts.map +1 -1
- package/esm/util/registry.js +57 -73
- package/esm/util/registry.js.map +1 -1
- package/esm/util/registry.test.d.ts +2 -0
- package/esm/util/registry.test.d.ts.map +1 -0
- package/esm/util/registry.test.js +169 -0
- package/esm/util/registry.test.js.map +1 -0
- package/esm/util/resource-validators.d.ts +16 -0
- package/esm/util/resource-validators.d.ts.map +1 -0
- package/esm/util/resource-validators.js +30 -0
- package/esm/util/resource-validators.js.map +1 -0
- package/esm/util/tool-caller.d.ts +2 -2
- package/esm/util/tool-caller.d.ts.map +1 -1
- package/esm/util/tool-caller.js +12 -4
- package/esm/util/tool-caller.js.map +1 -1
- package/package.json +13 -8
- package/dist/providers/hoc/with-tambo-interactable.d.ts.map +0 -1
- package/dist/providers/hoc/with-tambo-interactable.js.map +0 -1
- package/dist/util/validate-zod-schema.d.ts +0 -10
- package/dist/util/validate-zod-schema.d.ts.map +0 -1
- package/dist/util/validate-zod-schema.js +0 -100
- package/dist/util/validate-zod-schema.js.map +0 -1
- package/dist/util/validate-zod-schema.test.d.ts +0 -2
- package/dist/util/validate-zod-schema.test.d.ts.map +0 -1
- package/dist/util/validate-zod-schema.test.js +0 -96
- package/dist/util/validate-zod-schema.test.js.map +0 -1
- package/esm/providers/hoc/with-tambo-interactable.d.ts.map +0 -1
- package/esm/providers/hoc/with-tambo-interactable.js.map +0 -1
- package/esm/util/validate-zod-schema.d.ts +0 -10
- package/esm/util/validate-zod-schema.d.ts.map +0 -1
- package/esm/util/validate-zod-schema.js +0 -97
- package/esm/util/validate-zod-schema.js.map +0 -1
- package/esm/util/validate-zod-schema.test.d.ts +0 -2
- package/esm/util/validate-zod-schema.test.d.ts.map +0 -1
- package/esm/util/validate-zod-schema.test.js +0 -94
- package/esm/util/validate-zod-schema.test.js.map +0 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ListResourcesResult, ReadResourceResult } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
/**
|
|
3
|
+
* A single resource item from the MCP SDK listResources response.
|
|
4
|
+
* Re-exported for convenience when registering static resources.
|
|
5
|
+
*/
|
|
6
|
+
export type ListResourceItem = ListResourcesResult["resources"][number];
|
|
7
|
+
export type { ReadResourceResult };
|
|
8
|
+
/**
|
|
9
|
+
* Configuration for a dynamic resource source that can search and fetch resources.
|
|
10
|
+
*
|
|
11
|
+
* Both `listResources` and `getResource` must be provided together - you cannot
|
|
12
|
+
* provide one without the other.
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const resourceSource: ResourceSource = {
|
|
16
|
+
* listResources: async (search) => {
|
|
17
|
+
* const allResources = await fetchMyResources();
|
|
18
|
+
* return search
|
|
19
|
+
* ? allResources.filter(r => r.name.includes(search))
|
|
20
|
+
* : allResources;
|
|
21
|
+
* },
|
|
22
|
+
* getResource: async (uri, args) => {
|
|
23
|
+
* const content = await fetchResourceContent(uri, args);
|
|
24
|
+
* return {
|
|
25
|
+
* contents: [{
|
|
26
|
+
* uri,
|
|
27
|
+
* mimeType: 'text/plain',
|
|
28
|
+
* text: content,
|
|
29
|
+
* }],
|
|
30
|
+
* };
|
|
31
|
+
* },
|
|
32
|
+
* };
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export interface ResourceSource {
|
|
36
|
+
/**
|
|
37
|
+
* Lists available resources, optionally filtered by a search string.
|
|
38
|
+
* @param search - Optional search string to filter resources
|
|
39
|
+
* @returns Promise resolving to an array of resource items
|
|
40
|
+
*/
|
|
41
|
+
listResources: (search?: string) => Promise<ListResourceItem[]>;
|
|
42
|
+
/**
|
|
43
|
+
* Fetches the content of a specific resource by URI.
|
|
44
|
+
*
|
|
45
|
+
* Note: `getResource` may be invoked for URIs that have not previously
|
|
46
|
+
* been returned by `listResources` (for example, when the caller already
|
|
47
|
+
* knows a concrete URI). Implementations should handle unknown URIs
|
|
48
|
+
* gracefully rather than assuming they were listed first.
|
|
49
|
+
* @param uri - The URI of the resource to fetch
|
|
50
|
+
* @param args - Optional arguments to pass to the resource fetch
|
|
51
|
+
* @returns Promise resolving to the resource content
|
|
52
|
+
*/
|
|
53
|
+
getResource: (uri: string, args?: Record<string, unknown>) => Promise<ReadResourceResult>;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=resource-info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-info.d.ts","sourceRoot":"","sources":["../../src/model/resource-info.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,oCAAoC,CAAC;AAE5C;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAIxE,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,aAAa,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAEhE;;;;;;;;;;OAUG;IACH,WAAW,EAAE,CACX,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC3B,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-info.js","sourceRoot":"","sources":["../../src/model/resource-info.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n ListResourcesResult,\n ReadResourceResult,\n} from \"@modelcontextprotocol/sdk/types.js\";\n\n/**\n * A single resource item from the MCP SDK listResources response.\n * Re-exported for convenience when registering static resources.\n */\nexport type ListResourceItem = ListResourcesResult[\"resources\"][number];\n\n// Re-export the MCP SDK ReadResourceResult type so consumers can depend on\n// a stable SDK surface without importing directly from the MCP package.\nexport type { ReadResourceResult };\n\n/**\n * Configuration for a dynamic resource source that can search and fetch resources.\n *\n * Both `listResources` and `getResource` must be provided together - you cannot\n * provide one without the other.\n * @example\n * ```typescript\n * const resourceSource: ResourceSource = {\n * listResources: async (search) => {\n * const allResources = await fetchMyResources();\n * return search\n * ? allResources.filter(r => r.name.includes(search))\n * : allResources;\n * },\n * getResource: async (uri, args) => {\n * const content = await fetchResourceContent(uri, args);\n * return {\n * contents: [{\n * uri,\n * mimeType: 'text/plain',\n * text: content,\n * }],\n * };\n * },\n * };\n * ```\n */\nexport interface ResourceSource {\n /**\n * Lists available resources, optionally filtered by a search string.\n * @param search - Optional search string to filter resources\n * @returns Promise resolving to an array of resource items\n */\n listResources: (search?: string) => Promise<ListResourceItem[]>;\n\n /**\n * Fetches the content of a specific resource by URI.\n *\n * Note: `getResource` may be invoked for URIs that have not previously\n * been returned by `listResources` (for example, when the caller already\n * knows a concrete URI). Implementations should handle unknown URIs\n * gracefully rather than assuming they were listed first.\n * @param uri - The URI of the resource to fetch\n * @param args - Optional arguments to pass to the resource fetch\n * @returns Promise resolving to the resource content\n */\n getResource: (\n uri: string,\n args?: Record<string, unknown>,\n ) => Promise<ReadResourceResult>;\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { TamboComponent, TamboTool } from "../model/component-metadata";
|
|
1
|
+
export type { RegisterToolFn, RegisterToolsFn, TamboComponent, TamboTool, } from "../model/component-metadata";
|
|
2
2
|
export { TamboClientProvider, useIsTamboTokenUpdating, useTamboClient, } from "./tambo-client-provider";
|
|
3
3
|
export { TamboComponentProvider, useTamboComponent, } from "./tambo-component-provider";
|
|
4
4
|
export { TamboContextAttachmentProvider, useTamboContextAttachment, type ContextAttachment, type ContextAttachmentState, type ContextHelperData, type TamboContextAttachmentProviderProps, } from "./tambo-context-attachment-provider";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AAAA,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,cAAc,EACd,eAAe,EACf,cAAc,EACd,SAAS,GACV,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,EACzB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,mCAAmC,GACzC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,2BAA2B,EAC3B,sBAAsB,EACtB,KAAK,+BAA+B,EACpC,KAAK,gCAAgC,GACtC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,OAAO,EACP,SAAS,EACT,OAAO,EACP,uBAAuB,EACvB,cAAc,GACf,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,yBAAyB,EACzB,YAAY,EACZ,2BAA2B,GAC5B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,EAChB,KAAK,oBAAoB,GAC1B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,KAAK,4BAA4B,GAClC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,EACd,KAAK,wBAAwB,GAC9B,MAAM,yBAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":";;;AAMA,iEAIiC;AAH/B,4HAAA,mBAAmB,OAAA;AACnB,gIAAA,uBAAuB,OAAA;AACvB,uHAAA,cAAc,OAAA;AAEhB,uEAGoC;AAFlC,kIAAA,sBAAsB,OAAA;AACtB,6HAAA,iBAAiB,OAAA;AAEnB,yFAO6C;AAN3C,mJAAA,8BAA8B,OAAA;AAC9B,8IAAA,yBAAyB,OAAA;AAM3B,mFAK0C;AAJxC,6IAAA,2BAA2B,OAAA;AAC3B,wIAAA,sBAAsB,OAAA;AAIxB,2EAMsC;AALpC,qHAAA,OAAO,OAAA;AACP,uHAAA,SAAS,OAAA;AACT,qHAAA,OAAO,OAAA;AACP,qIAAA,uBAAuB,OAAA;AACvB,4HAAA,cAAc,OAAA;AAOhB,mDAAyE;AAAhE,8GAAA,YAAY,OAAA;AAAE,+GAAA,aAAa,OAAA;AAAE,0GAAA,QAAQ,OAAA;AAC9C,qEAKmC;AAJjC,gIAAA,qBAAqB,OAAA;AACrB,iIAAA,sBAAsB,OAAA;AACtB,2HAAA,gBAAgB,OAAA;AAGlB,6CAA+E;AAAtE,gHAAA,iBAAiB,OAAA;AAC1B,6EAIuC;AAHrC,uIAAA,wBAAwB,OAAA;AACxB,kIAAA,mBAAmB,OAAA;AAGrB,iEAMiC;AAL/B,2HAAA,kBAAkB,OAAA;AAClB,4HAAA,mBAAmB,OAAA;AACnB,gIAAA,uBAAuB,OAAA;AACvB,uHAAA,cAAc,OAAA","sourcesContent":["export type {\n RegisterToolFn,\n RegisterToolsFn,\n TamboComponent,\n TamboTool,\n} from \"../model/component-metadata\";\nexport {\n TamboClientProvider,\n useIsTamboTokenUpdating,\n useTamboClient,\n} from \"./tambo-client-provider\";\nexport {\n TamboComponentProvider,\n useTamboComponent,\n} from \"./tambo-component-provider\";\nexport {\n TamboContextAttachmentProvider,\n useTamboContextAttachment,\n type ContextAttachment,\n type ContextAttachmentState,\n type ContextHelperData,\n type TamboContextAttachmentProviderProps,\n} from \"./tambo-context-attachment-provider\";\nexport {\n TamboContextHelpersProvider,\n useTamboContextHelpers,\n type TamboContextHelpersContextProps,\n type TamboContextHelpersProviderProps,\n} from \"./tambo-context-helpers-provider\";\nexport {\n Pending,\n Streaming,\n Success,\n TamboPropStreamProvider,\n useTamboStream,\n} from \"./tambo-prop-stream-provider\";\nexport type {\n StreamStateComponentProps,\n StreamStatus,\n TamboPropStreamContextValue,\n} from \"./tambo-prop-stream-provider\";\nexport { TamboContext, TamboProvider, useTambo } from \"./tambo-provider\";\nexport {\n TamboRegistryProvider,\n useTamboMcpServerInfos,\n useTamboRegistry,\n type TamboRegistryContext,\n} from \"./tambo-registry-provider\";\nexport { TamboStubProvider, type TamboStubProviderProps } from \"./tambo-stubs\";\nexport {\n TamboThreadInputProvider,\n useTamboThreadInput,\n type TamboThreadInputContextProps,\n} from \"./tambo-thread-input-provider\";\nexport {\n TamboThreadContext,\n TamboThreadProvider,\n useTamboGenerationStage,\n useTamboThread,\n type TamboThreadProviderProps,\n} from \"./tambo-thread-provider\";\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from "react";
|
|
2
|
-
import { TamboComponent, TamboTool } from "../model/component-metadata";
|
|
2
|
+
import { RegisterToolFn, RegisterToolsFn, TamboComponent, TamboTool, TamboToolWithToolSchema } from "../model/component-metadata";
|
|
3
3
|
export interface TamboComponentContextProps {
|
|
4
4
|
registerComponent: (options: TamboComponent) => void;
|
|
5
|
-
registerTool:
|
|
6
|
-
registerTools:
|
|
7
|
-
addToolAssociation: (componentName: string, tool: TamboTool) => void;
|
|
5
|
+
registerTool: RegisterToolFn;
|
|
6
|
+
registerTools: RegisterToolsFn;
|
|
7
|
+
addToolAssociation: (componentName: string, tool: TamboTool | TamboToolWithToolSchema) => void;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* The TamboComponentProvider is a React provider that provides component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tambo-component-provider.d.ts","sourceRoot":"","sources":["../../src/providers/tambo-component-provider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAiB,iBAAiB,EAAc,MAAM,OAAO,CAAC;AAC5E,OAAO,
|
|
1
|
+
{"version":3,"file":"tambo-component-provider.d.ts","sourceRoot":"","sources":["../../src/providers/tambo-component-provider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAiB,iBAAiB,EAAc,MAAM,OAAO,CAAC;AAC5E,OAAO,EACL,cAAc,EACd,eAAe,EACf,cAAc,EACd,SAAS,EACT,uBAAuB,EACxB,MAAM,6BAA6B,CAAC;AAIrC,MAAM,WAAW,0BAA0B;IACzC,iBAAiB,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IACrD,YAAY,EAAE,cAAc,CAAC;IAC7B,aAAa,EAAE,eAAe,CAAC;IAC/B,kBAAkB,EAAE,CAClB,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,SAAS,GAAG,uBAAuB,KACtC,IAAI,CAAC;CACX;AAqBD;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAoB9D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,kCAE7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tambo-component-provider.js","sourceRoot":"","sources":["../../src/providers/tambo-component-provider.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACb,+CAA4E;
|
|
1
|
+
{"version":3,"file":"tambo-component-provider.js","sourceRoot":"","sources":["../../src/providers/tambo-component-provider.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACb,+CAA4E;AAQ5E,mEAAyD;AACzD,uEAA6D;AAY7D,MAAM,qBAAqB,GAAG,IAAA,qBAAa,EAA6B;IACtE;;OAEG;IACH,iBAAiB,EAAE,GAAG,EAAE,GAAE,CAAC;IAC3B;;OAEG;IACH,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC;IACtB;;OAEG;IACH,aAAa,EAAE,GAAG,EAAE,GAAE,CAAC;IACvB;;OAEG;IACH,kBAAkB,EAAE,GAAG,EAAE,GAAE,CAAC;CAC7B,CAAC,CAAC;AAEH;;;;;;GAMG;AACI,MAAM,sBAAsB,GAAgC,CAAC,EAClE,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,IAAA,sCAAc,GAAE,CAAC;IAChC,MAAM,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,YAAY,EAAE,aAAa,EAAE,GAC1E,IAAA,0CAAgB,GAAE,CAAC;IAErB,MAAM,KAAK,GAAG;QACZ,MAAM;QACN,iBAAiB;QACjB,YAAY;QACZ,aAAa;QACb,kBAAkB;KACnB,CAAC;IAEF,OAAO,CACL,8BAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,IACzC,QAAQ,CACsB,CAClC,CAAC;AACJ,CAAC,CAAC;AApBW,QAAA,sBAAsB,0BAoBjC;AAEF;;;;GAIG;AACI,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,OAAO,IAAA,kBAAU,EAAC,qBAAqB,CAAC,CAAC;AAC3C,CAAC,CAAC;AAFW,QAAA,iBAAiB,qBAE5B","sourcesContent":["\"use client\";\nimport React, { createContext, PropsWithChildren, useContext } from \"react\";\nimport {\n RegisterToolFn,\n RegisterToolsFn,\n TamboComponent,\n TamboTool,\n TamboToolWithToolSchema,\n} from \"../model/component-metadata\";\nimport { useTamboClient } from \"./tambo-client-provider\";\nimport { useTamboRegistry } from \"./tambo-registry-provider\";\n\nexport interface TamboComponentContextProps {\n registerComponent: (options: TamboComponent) => void;\n registerTool: RegisterToolFn;\n registerTools: RegisterToolsFn;\n addToolAssociation: (\n componentName: string,\n tool: TamboTool | TamboToolWithToolSchema,\n ) => void;\n}\n\nconst TamboComponentContext = createContext<TamboComponentContextProps>({\n /**\n *\n */\n registerComponent: () => {},\n /**\n *\n */\n registerTool: () => {},\n /**\n *\n */\n registerTools: () => {},\n /**\n *\n */\n addToolAssociation: () => {},\n});\n\n/**\n * The TamboComponentProvider is a React provider that provides component\n * registration services to the descendants of the provider.\n * @param props - The props for the TamboComponentProvider\n * @param props.children - The children to wrap\n * @returns The TamboComponentProvider component\n */\nexport const TamboComponentProvider: React.FC<PropsWithChildren> = ({\n children,\n}) => {\n const client = useTamboClient();\n const { registerComponent, addToolAssociation, registerTool, registerTools } =\n useTamboRegistry();\n\n const value = {\n client,\n registerComponent,\n registerTool,\n registerTools,\n addToolAssociation,\n };\n\n return (\n <TamboComponentContext.Provider value={value}>\n {children}\n </TamboComponentContext.Provider>\n );\n};\n\n/**\n * The useTamboComponent hook provides access to the component registration\n * services to the descendants of the TamboComponentProvider.\n * @returns The component registration services\n */\nexport const useTamboComponent = () => {\n return useContext(TamboComponentContext);\n};\n"]}
|
|
@@ -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
|
|
8
|
+
const zodInternalAlias_1 = require("zodInternalAlias");
|
|
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:
|
|
56
|
-
title:
|
|
57
|
-
count:
|
|
58
|
-
active:
|
|
59
|
-
metadata:
|
|
60
|
-
type:
|
|
61
|
-
version:
|
|
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(),
|
|
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:
|
|
104
|
-
title:
|
|
105
|
-
count:
|
|
106
|
-
active:
|
|
107
|
-
description:
|
|
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(),
|
|
108
108
|
}),
|
|
109
109
|
};
|
|
110
110
|
let componentId = "";
|
|
@@ -155,14 +155,14 @@ describe("updateInteractableComponentProps - Partial Updates", () => {
|
|
|
155
155
|
},
|
|
156
156
|
},
|
|
157
157
|
},
|
|
158
|
-
propsSchema:
|
|
159
|
-
title:
|
|
160
|
-
config:
|
|
161
|
-
theme:
|
|
162
|
-
language:
|
|
163
|
-
features:
|
|
164
|
-
notifications:
|
|
165
|
-
analytics:
|
|
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(),
|
|
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:
|
|
204
|
-
title:
|
|
205
|
-
items:
|
|
206
|
-
tags:
|
|
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()),
|
|
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:
|
|
237
|
-
title:
|
|
238
|
-
count:
|
|
239
|
-
description:
|
|
236
|
+
propsSchema: zodInternalAlias_1.z.object({
|
|
237
|
+
title: zodInternalAlias_1.z.string(),
|
|
238
|
+
count: zodInternalAlias_1.z.number(),
|
|
239
|
+
description: zodInternalAlias_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:
|
|
288
|
+
propsSchema: zodInternalAlias_1.z.object({ title: zodInternalAlias_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:
|
|
303
|
+
propsSchema: zodInternalAlias_1.z.object({ title: zodInternalAlias_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:
|
|
322
|
+
propsSchema: zodInternalAlias_1.z.object({ title: zodInternalAlias_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:
|
|
341
|
+
propsSchema: zodInternalAlias_1.z.object({ title: zodInternalAlias_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:
|
|
369
|
-
title:
|
|
370
|
-
count:
|
|
371
|
-
active:
|
|
372
|
-
metadata:
|
|
373
|
-
type:
|
|
374
|
-
version:
|
|
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(),
|
|
375
375
|
}),
|
|
376
|
-
items:
|
|
376
|
+
items: zodInternalAlias_1.z.array(zodInternalAlias_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:
|
|
431
|
-
users:
|
|
432
|
-
id:
|
|
433
|
-
name:
|
|
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(),
|
|
434
434
|
})),
|
|
435
|
-
settings:
|
|
436
|
-
theme:
|
|
437
|
-
language:
|
|
438
|
-
notifications:
|
|
439
|
-
privacy:
|
|
440
|
-
shareData:
|
|
441
|
-
analytics:
|
|
442
|
-
marketing:
|
|
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(),
|
|
443
443
|
}),
|
|
444
444
|
}),
|
|
445
|
-
metadata:
|
|
446
|
-
version:
|
|
447
|
-
build:
|
|
448
|
-
timestamp:
|
|
445
|
+
metadata: zodInternalAlias_1.z.object({
|
|
446
|
+
version: zodInternalAlias_1.z.string(),
|
|
447
|
+
build: zodInternalAlias_1.z.string(),
|
|
448
|
+
timestamp: zodInternalAlias_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:
|
|
492
|
-
title:
|
|
493
|
-
count:
|
|
494
|
-
newProperty:
|
|
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(),
|
|
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:
|
|
525
|
-
title:
|
|
526
|
-
count:
|
|
527
|
-
active:
|
|
524
|
+
propsSchema: zodInternalAlias_1.z.object({
|
|
525
|
+
title: zodInternalAlias_1.z.string(),
|
|
526
|
+
count: zodInternalAlias_1.z.number(),
|
|
527
|
+
active: zodInternalAlias_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:
|
|
569
|
-
title:
|
|
570
|
-
config:
|
|
571
|
-
theme:
|
|
572
|
-
language:
|
|
573
|
-
features:
|
|
574
|
-
notifications:
|
|
575
|
-
analytics:
|
|
576
|
-
experimental:
|
|
577
|
-
beta:
|
|
578
|
-
alpha:
|
|
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(),
|
|
579
579
|
}),
|
|
580
580
|
}),
|
|
581
581
|
}),
|
|
@@ -639,17 +639,17 @@ describe("updateInteractableComponentProps - Partial Updates", () => {
|
|
|
639
639
|
},
|
|
640
640
|
},
|
|
641
641
|
},
|
|
642
|
-
propsSchema:
|
|
643
|
-
title:
|
|
644
|
-
config:
|
|
645
|
-
theme:
|
|
646
|
-
language:
|
|
647
|
-
features:
|
|
648
|
-
notifications:
|
|
649
|
-
analytics:
|
|
650
|
-
experimental:
|
|
651
|
-
beta:
|
|
652
|
-
alpha:
|
|
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(),
|
|
653
653
|
}),
|
|
654
654
|
}),
|
|
655
655
|
}),
|