@opencx/widget-react 4.0.44 → 4.0.45

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.
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ export type WidgetRef = {
3
+ newChat: (options?: {
4
+ message?: string;
5
+ }) => Promise<void>;
6
+ };
7
+ export declare function WidgetImperativeHandler({ widgetRef, }: {
8
+ widgetRef: React.Ref<WidgetRef>;
9
+ }): null;
10
+ //# sourceMappingURL=WidgetImperativeHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WidgetImperativeHandler.d.ts","sourceRoot":"","sources":["../../src/WidgetImperativeHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5D,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,GACV,EAAE;IACD,SAAS,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;CACjC,QAwCA"}
@@ -1,10 +1,12 @@
1
1
  import { default as React } from 'react';
2
2
  import { WidgetConfig } from '@opencx/widget-core';
3
3
  import { WidgetComponentType } from '@opencx/widget-react-headless';
4
- declare function WidgetWrapper({ options, components, loadingComponent, }: {
4
+ import { WidgetRef } from './WidgetImperativeHandler';
5
+ declare const Widget: React.ForwardRefExoticComponent<{
5
6
  options: WidgetConfig;
6
7
  components?: WidgetComponentType[];
7
8
  loadingComponent?: React.ReactNode;
8
- }): React.JSX.Element;
9
- export { WidgetWrapper as Widget };
9
+ } & React.RefAttributes<WidgetRef>>;
10
+ export { Widget };
11
+ export type { WidgetRef };
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAGV,YAAY,EACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,+BAA+B,CAAC;AAmDvC,iBAAS,aAAa,CAAC,EACrB,OAAO,EACP,UAAe,EACf,gBAAgB,GACjB,EAAE;IACD,OAAO,EAAE,YAAY,CAAC;IACtB,UAAU,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACnC,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACpC,qBAiBA;AAED,OAAO,EAAE,aAAa,IAAI,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAGV,YAAY,EACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,+BAA+B,CAAC;AAOvC,OAAO,EAEL,KAAK,SAAS,EACf,MAAM,2BAA2B,CAAC;AA6CnC,QAAA,MAAM,MAAM;aAGC,YAAY;iBACR,mBAAmB,EAAE;uBACf,KAAK,CAAC,SAAS;mCAoBpC,CAAC;AAGH,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,YAAY,EAAE,SAAS,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@opencx/widget-react",
3
3
  "private": false,
4
- "version": "4.0.44",
4
+ "version": "4.0.45",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",
@@ -37,8 +37,8 @@
37
37
  "tailwind-merge": "^2.4.0",
38
38
  "tinycolor2": "^1.6.0",
39
39
  "zod": "^3.23.8",
40
- "@opencx/widget-react-headless": "4.0.44",
41
- "@opencx/widget-core": "4.0.44"
40
+ "@opencx/widget-core": "4.0.45",
41
+ "@opencx/widget-react-headless": "4.0.45"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@types/react": ">=18 <20",