@progress/kendo-react-common 14.5.0-develop.8 → 15.0.0-develop.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.
Files changed (42) hide show
  1. package/README.md +4 -4
  2. package/WebMcpProvider.d.ts +108 -0
  3. package/WebMcpProvider.js +9 -0
  4. package/WebMcpProvider.mjs +41 -0
  5. package/dist/cdn/js/kendo-react-common.js +1 -1
  6. package/hooks/index.d.ts +1 -0
  7. package/hooks/useMergedRef.d.ts +16 -0
  8. package/hooks/useMergedRef.js +8 -0
  9. package/hooks/useMergedRef.mjs +20 -0
  10. package/hooks/usePaidChildrenWatermark.d.ts +37 -0
  11. package/hooks/usePaidChildrenWatermark.js +9 -0
  12. package/hooks/usePaidChildrenWatermark.mjs +29 -0
  13. package/icons/BaseIconProps.d.ts +0 -2
  14. package/icons/Icon.js +1 -1
  15. package/icons/Icon.mjs +11 -13
  16. package/icons/SvgIcon.d.ts +18 -0
  17. package/icons/SvgIcon.js +1 -1
  18. package/icons/SvgIcon.mjs +73 -71
  19. package/icons/models/theme-color.d.ts +1 -3
  20. package/icons/models/variant.d.ts +18 -0
  21. package/index.d.mts +4 -0
  22. package/index.d.ts +4 -0
  23. package/index.js +1 -1
  24. package/index.mjs +178 -169
  25. package/package.json +7 -2
  26. package/theme.js +1 -1
  27. package/theme.mjs +4 -2
  28. package/typography/Typography.js +1 -1
  29. package/typography/Typography.mjs +6 -8
  30. package/typography/TypographyProps.d.ts +1 -3
  31. package/unstyled/buttons.d.ts +2 -4
  32. package/unstyled/buttons.js +1 -1
  33. package/unstyled/buttons.mjs +70 -72
  34. package/unstyled/icons.d.ts +2 -4
  35. package/unstyled/icons.js +1 -1
  36. package/unstyled/icons.mjs +10 -11
  37. package/unstyled/json-classes.js +1 -1
  38. package/unstyled/json-classes.mjs +13 -15
  39. package/validate-package.js +2 -2
  40. package/validate-package.mjs +10 -10
  41. package/watermark/WatermarkOverlay.js +1 -1
  42. package/watermark/WatermarkOverlay.mjs +30 -29
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![KendoReact NPM Banner](https://raw.githubusercontent.com/telerik/kendo-react/master/images/kendoreact-github-banner.png)](https://www.telerik.com/kendo-react-ui/components/free?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-common&utm_content=banner)
1
+ [![KendoReact NPM Banner](https://raw.githubusercontent.com/telerik/kendo-react/master/images/kendoreact-github-banner.png)](https://www.telerik.com/kendo-react-ui/components/getting-started/free-vs-premium?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-common&utm_content=banner)
2
2
 
3
3
  # KendoReact Common Library for React
4
4
 
@@ -6,7 +6,7 @@
6
6
  >
7
7
  > - This package is а part of [KendoReact](https://www.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-common)—an enterprise-grade UI library with 120+ free and premium components.
8
8
  > - It contains both free and premium KendoReact components and tools. To use the premium components, you must install a license key file, whether you are on a paid license or a 30-day free trial. To receive a license key, either [purchase a license](https://www.telerik.com/kendo-react-ui/pricing) or start a [free trial](https://www.telerik.com/download-login-v2-kendo-react-ui). You can use the free components without having to sign up or get a license key.
9
- > - If you're looking for free React components, check out [Get Started with KendoReact Free](https://www.telerik.com/kendo-react-ui/components/free).
9
+ > - If you're looking for free React components, check out [Get Started with KendoReact Free](https://www.telerik.com/kendo-react-ui/components/getting-started).
10
10
  > - If you have an active license, visit the [KendoReact My License page](https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-common) to learn how to configure your KendoReact licensing.
11
11
  > - Installing and working with this package indicates that you [accept the KendoReact License Agreement](https://www.telerik.com/purchase/license-agreement/progress-kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-common).
12
12
  > - The 30-day free trial gives you access to all KendoReact components and their full functionality. Additionally, for the period of your trial, you can use our legendary technical support provided directly by the KendoReact dev team!
@@ -121,7 +121,7 @@ import { AdaptiveModeContext } from '@progress/kendo-react-common';
121
121
 
122
122
  The following table outlines the key resources available with KendoReact and KendoReact Free.
123
123
 
124
- | | [KendoReact Free](https://www.telerik.com/kendo-react-ui/components/free) | [KendoReact](https://www.telerik.com/kendo-react-ui) |
124
+ | | [KendoReact Free](https://www.telerik.com/kendo-react-ui/components/getting-started/free-vs-premium) | [KendoReact](https://www.telerik.com/kendo-react-ui) |
125
125
  | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
126
126
  | React components | 50+ | 120+ |
127
127
  | Four professional themes | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z" stroke="white" stroke-width="2"/></svg> | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z" stroke="white" stroke-width="2"/></svg> |
@@ -146,7 +146,7 @@ For any issues you might encounter while working with the KendoReact Common pack
146
146
  General resources:
147
147
 
148
148
  - [Getting Started with KendoReact](https://www.telerik.com/kendo-react-ui/components/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-common)
149
- - [Get Started with KendoReact Free](https://www.telerik.com/kendo-react-ui/components/free)
149
+ - [Get Started with KendoReact Free](https://www.telerik.com/kendo-react-ui/components/getting-started)
150
150
  - [KendoReact Roadmap](https://www.telerik.com/kendo-react-ui/roadmap/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-common)
151
151
  - [Blogs](https://www.telerik.com/blogs/tag/kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-common)
152
152
  - [Demos, documentation, and component reference](https://www.telerik.com/kendo-react-ui/components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-common)
@@ -0,0 +1,108 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ /**
9
+ * WebMcpProvider – Generic React Context Provider for Web MCP configuration.
10
+ *
11
+ * Wraps a section of the component tree so that any KendoReact component
12
+ * (Grid, Form, Scheduler, etc.) inside it automatically registers
13
+ * browser-native AI agent tools via `navigator.modelContext.registerTool()` (Chrome 146+).
14
+ *
15
+ * Lives in `@progress/kendo-react-common` so every component package can
16
+ * consume the context without cross-package imports.
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * import { WebMcpProvider } from '@progress/kendo-react-common';
21
+ *
22
+ * <WebMcpProvider>
23
+ * <Grid data={dataResult} sortable webMcp={{ dataName: 'employees' }} />
24
+ * </WebMcpProvider>
25
+ * ```
26
+ */
27
+ import * as React from 'react';
28
+ /** @internal Result returned by a registered Web MCP tool. */
29
+ export interface WebMcpToolResult {
30
+ content: Array<{
31
+ type: 'text';
32
+ text: string;
33
+ }>;
34
+ isError?: boolean;
35
+ }
36
+ /** @internal Handle returned by `navigator.modelContext.registerTool()`. */
37
+ export interface WebMcpToolRegistration {
38
+ unregister: () => void;
39
+ }
40
+ /** @internal The `navigator.modelContext` surface in Chrome 146+. */
41
+ export interface WebMcpModelContext {
42
+ registerTool: (config: {
43
+ name: string;
44
+ description: string;
45
+ inputSchema: Record<string, unknown>;
46
+ execute: (args: Record<string, unknown>) => Promise<WebMcpToolResult>;
47
+ }) => WebMcpToolRegistration;
48
+ }
49
+ /** Describes a single tool to register via WebMcpProvider. */
50
+ export interface McpToolOption {
51
+ /** Short identifier used as suffix in the tool name. */
52
+ name: string;
53
+ /** Human-readable description shown to AI agents. */
54
+ description: string;
55
+ /** Internal command identifier used by the component's execution router. */
56
+ commandType: string;
57
+ /** Whether this tool should be registered (typically derived from component props). */
58
+ enabled: boolean;
59
+ }
60
+ /** Configuration object for the `webMcp` prop on individual components. */
61
+ export interface WebMcpProps {
62
+ /** Human-readable data name exposed to AI agents. Overrides the provider's `dataName`. */
63
+ dataName?: string;
64
+ /** Optional callback to filter or customise the tools before registration. */
65
+ tools?: (tools: McpToolOption[]) => McpToolOption[];
66
+ }
67
+ /** Shared Web MCP configuration propagated via React Context. */
68
+ export interface WebMcpContextValue {
69
+ /** Human-readable data name exposed to AI agents. Any language works. Optional when each component provides its own via `webMcp={{ dataName }}`. */
70
+ dataName?: string;
71
+ /**
72
+ * Registration callback provided by a smart provider.
73
+ * Components call this to announce themselves so the provider can
74
+ * create tools on their behalf. Returns an unregister function.
75
+ *
76
+ * @param componentType - Identifier string, e.g. 'textbox', 'grid'.
77
+ * @param handle - The imperative handle exposed via forwardRef.
78
+ * @param props - The current React props of the component.
79
+ * @param webMcpConfig - Component-level webMcp config (when object), or undefined (when boolean).
80
+ * @returns A cleanup function that removes the registration.
81
+ */
82
+ register?: (componentType: string, handle: unknown, propsRef: {
83
+ current: unknown;
84
+ }, webMcpConfig?: Record<string, unknown>) => () => void;
85
+ }
86
+ /** Props accepted by `<WebMcpProvider>`. */
87
+ export interface WebMcpProviderProps extends WebMcpContextValue {
88
+ children: React.ReactNode;
89
+ }
90
+ /** @internal */
91
+ export declare const WebMcpContext: React.Context<WebMcpContextValue | null>;
92
+ /** Provides Web MCP configuration to all descendant KendoReact components. */
93
+ export declare const WebMcpProvider: React.FC<WebMcpProviderProps>;
94
+ /** Returns the `navigator.modelContext` if available (Chrome 146+), or `null`. */
95
+ export declare function getModelContext(): WebMcpModelContext | null;
96
+ /**
97
+ * Tiny hook that components call to register themselves with a parent
98
+ * `WebMcpProvider`. Only runs when `webMcp` is truthy — zero cost otherwise.
99
+ *
100
+ * The component package only needs this single call — all tool creation
101
+ * logic lives in the provider's adapter (in `@progress/kendo-react-webmcp`).
102
+ *
103
+ * @param componentType - Identifier string, e.g. 'textbox', 'grid'.
104
+ * @param handle - Ref to the component's imperative handle.
105
+ * @param props - The current React props.
106
+ * @param webMcp - The component's `webMcp` prop. `true` for defaults, object for config.
107
+ */
108
+ export declare function useWebMcpRegister(componentType: string, handle: React.RefObject<unknown>, props: unknown, webMcp?: boolean | WebMcpProps | Record<string, unknown>): void;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react");function l(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const t=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,t.get?t:{enumerable:!0,get:()=>e[o]})}}return n.default=e,Object.freeze(n)}const r=l(a),i=r.createContext(null);i.displayName="WebMcpContext";const g=({children:e,dataName:n})=>{const o=r.useMemo(()=>({dataName:n}),[n]);return r.createElement(i.Provider,{value:o},e)};function d(){return typeof navigator!="undefined"&&navigator.modelContext?navigator.modelContext:null}function b(e,n,o,t){const c=r.useContext(i),u=r.useRef(o);u.current=o;const s=r.useMemo(()=>typeof t=="object"?JSON.stringify(t):String(!!t),[t]);r.useEffect(()=>{if(!t||!(c!=null&&c.register))return;const f=typeof t=="object"?t:void 0;return c.register(e,n.current,u,f)},[s,c,e,n])}exports.WebMcpContext=i;exports.WebMcpProvider=g;exports.getModelContext=d;exports.useWebMcpRegister=b;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import * as t from "react";
10
+ const s = t.createContext(null);
11
+ s.displayName = "WebMcpContext";
12
+ const g = ({ children: r, dataName: o }) => {
13
+ const i = t.useMemo(() => ({ dataName: o }), [o]);
14
+ return /* @__PURE__ */ t.createElement(s.Provider, { value: i }, r);
15
+ };
16
+ function a() {
17
+ return typeof navigator != "undefined" && navigator.modelContext ? navigator.modelContext : null;
18
+ }
19
+ function l(r, o, i, e) {
20
+ const n = t.useContext(s), u = t.useRef(i);
21
+ u.current = i;
22
+ const f = t.useMemo(
23
+ () => typeof e == "object" ? JSON.stringify(e) : String(!!e),
24
+ // webMcp is intentionally listed as the only dep — we want a stable key
25
+ // based on the serialised value, not the object reference.
26
+ // eslint-disable-next-line react-hooks/exhaustive-deps
27
+ [e]
28
+ );
29
+ t.useEffect(() => {
30
+ if (!e || !(n != null && n.register))
31
+ return;
32
+ const c = typeof e == "object" ? e : void 0;
33
+ return n.register(r, o.current, u, c);
34
+ }, [f, n, r, o]);
35
+ }
36
+ export {
37
+ s as WebMcpContext,
38
+ g as WebMcpProvider,
39
+ a as getModelContext,
40
+ l as useWebMcpRegister
41
+ };