@revvue/embed-react 0.0.0-beta.3 → 0.0.0-beta.4

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 (62) hide show
  1. package/dist/css/dialog.css +1 -1
  2. package/dist/css/drawer.css +1 -1
  3. package/dist/css/popover.css +1 -1
  4. package/dist/package.cjs +268 -106
  5. package/dist/package.mjs +266 -108
  6. package/dist/types/bindings/dialog/build-stable-deps.d.ts +5 -0
  7. package/dist/types/bindings/dialog/build-stable-deps.d.ts.map +1 -0
  8. package/dist/types/bindings/dialog/dialog.d.ts +5 -0
  9. package/dist/types/bindings/dialog/dialog.d.ts.map +1 -0
  10. package/dist/types/bindings/dialog/index.d.ts.map +1 -0
  11. package/dist/types/bindings/drawer/build-stable-deps.d.ts +11 -0
  12. package/dist/types/bindings/drawer/build-stable-deps.d.ts.map +1 -0
  13. package/dist/types/bindings/drawer/drawer.d.ts +24 -0
  14. package/dist/types/bindings/drawer/drawer.d.ts.map +1 -0
  15. package/dist/types/bindings/drawer/index.d.ts.map +1 -0
  16. package/dist/types/bindings/index.d.ts.map +1 -0
  17. package/dist/types/bindings/popover/build-stable-deps.d.ts +10 -0
  18. package/dist/types/bindings/popover/build-stable-deps.d.ts.map +1 -0
  19. package/dist/types/bindings/popover/index.d.ts.map +1 -0
  20. package/dist/types/bindings/popover/popover.d.ts +42 -0
  21. package/dist/types/bindings/popover/popover.d.ts.map +1 -0
  22. package/dist/types/bindings/widget/build-stable-deps.d.ts.map +1 -0
  23. package/dist/types/bindings/widget/index.d.ts.map +1 -0
  24. package/dist/types/bindings/widget/widget.d.ts +24 -0
  25. package/dist/types/bindings/widget/widget.d.ts.map +1 -0
  26. package/dist/types/index.d.ts +2 -1
  27. package/dist/types/index.d.ts.map +1 -1
  28. package/dist/types/internal/create-floating-bindings.d.ts +60 -0
  29. package/dist/types/internal/create-floating-bindings.d.ts.map +1 -0
  30. package/dist/types/internal/create-widget-bindings.d.ts +32 -0
  31. package/dist/types/internal/create-widget-bindings.d.ts.map +1 -0
  32. package/dist/types/internal/index.d.ts +4 -0
  33. package/dist/types/internal/index.d.ts.map +1 -0
  34. package/dist/types/internal/slot.d.ts +31 -0
  35. package/dist/types/internal/slot.d.ts.map +1 -0
  36. package/package.json +2 -2
  37. package/dist/types/components/dialog/build-stable-deps.d.ts +0 -3
  38. package/dist/types/components/dialog/build-stable-deps.d.ts.map +0 -1
  39. package/dist/types/components/dialog/dialog.d.ts +0 -6
  40. package/dist/types/components/dialog/dialog.d.ts.map +0 -1
  41. package/dist/types/components/dialog/index.d.ts.map +0 -1
  42. package/dist/types/components/drawer/build-stable-deps.d.ts +0 -3
  43. package/dist/types/components/drawer/build-stable-deps.d.ts.map +0 -1
  44. package/dist/types/components/drawer/drawer.d.ts +0 -6
  45. package/dist/types/components/drawer/drawer.d.ts.map +0 -1
  46. package/dist/types/components/drawer/index.d.ts.map +0 -1
  47. package/dist/types/components/index.d.ts.map +0 -1
  48. package/dist/types/components/popover/build-stable-deps.d.ts +0 -3
  49. package/dist/types/components/popover/build-stable-deps.d.ts.map +0 -1
  50. package/dist/types/components/popover/index.d.ts.map +0 -1
  51. package/dist/types/components/popover/popover.d.ts +0 -29
  52. package/dist/types/components/popover/popover.d.ts.map +0 -1
  53. package/dist/types/components/widget/build-stable-deps.d.ts.map +0 -1
  54. package/dist/types/components/widget/index.d.ts.map +0 -1
  55. package/dist/types/components/widget/widget.d.ts +0 -11
  56. package/dist/types/components/widget/widget.d.ts.map +0 -1
  57. /package/dist/types/{components → bindings}/dialog/index.d.ts +0 -0
  58. /package/dist/types/{components → bindings}/drawer/index.d.ts +0 -0
  59. /package/dist/types/{components → bindings}/index.d.ts +0 -0
  60. /package/dist/types/{components → bindings}/popover/index.d.ts +0 -0
  61. /package/dist/types/{components → bindings}/widget/build-stable-deps.d.ts +0 -0
  62. /package/dist/types/{components → bindings}/widget/index.d.ts +0 -0
@@ -0,0 +1,60 @@
1
+ import { EmbedFloating } from '@revvue/embed';
2
+ import { ComponentType, CSSProperties, MouseEvent, ReactNode, RefObject } from 'react';
3
+ import { SlotInjectedProps } from './slot';
4
+ type FloatingHandlers = Pick<EmbedFloating, "open" | "close" | "toggle" | "refresh" | "focus">;
5
+ /**
6
+ * Imperative API the hook returns to the consumer. `getTriggerProps()` is the
7
+ * escape hatch for "I want to render my own trigger element" — spread it onto
8
+ * any clickable element to wire open/close + aria-expanded.
9
+ */
10
+ export interface UseFloatingResult extends FloatingHandlers {
11
+ /** Mirrors the underlying instance's open state. Drives `aria-expanded`. */
12
+ isOpen: boolean;
13
+ /** Spread onto the trigger element to wire click + aria attrs. */
14
+ getTriggerProps: () => SlotInjectedProps & {
15
+ type: "button";
16
+ };
17
+ }
18
+ /**
19
+ * Props the generated component accepts on top of the underlying embed props.
20
+ *
21
+ * - `asChild`: render the single child element as the trigger (Radix-style).
22
+ * Useful when the consumer wants to use a design-system Button.
23
+ * - `children`: button label / contents.
24
+ * - `className`/`style`/`onClick`: forwarded to the rendered trigger.
25
+ */
26
+ export interface FloatingComponentProps {
27
+ asChild?: boolean;
28
+ children?: ReactNode;
29
+ className?: string;
30
+ style?: CSSProperties;
31
+ onClick?: (event: MouseEvent<HTMLElement>) => void;
32
+ ref?: RefObject<FloatingHandlers | null>;
33
+ }
34
+ export interface FloatingBindings<TProps> {
35
+ useEmbed: (props: TProps) => UseFloatingResult;
36
+ Embed: ComponentType<TProps & FloatingComponentProps>;
37
+ }
38
+ export interface CreateFloatingBindingsOptions<TProps, TInstance extends EmbedFloating> {
39
+ /**
40
+ * The underlying `@revvue/embed` factory. The wrapper is responsible for
41
+ * injecting any binding-specific defaults (e.g. `trigger: 'none'` for
42
+ * popover) so this factory stays generic.
43
+ */
44
+ factory: (props: TProps) => TInstance;
45
+ /**
46
+ * Returns a positionally-stable array of "identity" props. The hook re-runs
47
+ * its setup effect (and therefore unmounts + recreates the embed) only when
48
+ * one of these values changes between renders.
49
+ */
50
+ buildStableDeps: (props: TProps) => unknown[];
51
+ }
52
+ /**
53
+ * Builds a `{ useEmbed, Embed }` pair for a floating embed (drawer, dialog,
54
+ * popover). The hook owns mount/unmount + open-state subscription; the
55
+ * component is a thin wrapper that renders a default `<button>` trigger and
56
+ * spreads `getTriggerProps()` onto it.
57
+ */
58
+ export declare function createFloatingBindings<TProps, TInstance extends EmbedFloating>({ factory, buildStableDeps }: CreateFloatingBindingsOptions<TProps, TInstance>): FloatingBindings<TProps>;
59
+ export {};
60
+ //# sourceMappingURL=create-floating-bindings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-floating-bindings.d.ts","sourceRoot":"","sources":["../../../src/internal/create-floating-bindings.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,UAAU,EAEf,KAAK,SAAS,EACd,KAAK,SAAS,EAOf,MAAM,OAAO,CAAC;AACf,OAAO,EAAQ,KAAK,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAMtD,KAAK,gBAAgB,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC;AAE/F;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACzD,4EAA4E;IAC5E,MAAM,EAAE,OAAO,CAAC;IAChB,kEAAkE;IAClE,eAAe,EAAE,MAAM,iBAAiB,GAAG;QAAE,IAAI,EAAE,QAAQ,CAAA;KAAE,CAAC;CAC/D;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACnD,GAAG,CAAC,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;CAC1C;AAED,MAAM,WAAW,gBAAgB,CAAC,MAAM;IACtC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,iBAAiB,CAAC;IAC/C,KAAK,EAAE,aAAa,CAAC,MAAM,GAAG,sBAAsB,CAAC,CAAC;CACvD;AAMD,MAAM,WAAW,6BAA6B,CAAC,MAAM,EAAE,SAAS,SAAS,aAAa;IACpF;;;;OAIG;IACH,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IACtC;;;;OAIG;IACH,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,EAAE,CAAC;CAC/C;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,SAAS,aAAa,EAAE,EAC9E,OAAO,EACP,eAAe,EAChB,EAAE,6BAA6B,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAmG7E"}
@@ -0,0 +1,32 @@
1
+ import { EmbedWidget } from '@revvue/embed';
2
+ import { ComponentType, CSSProperties, RefObject } from 'react';
3
+ export type EmbedWidgetHandlers = Pick<EmbedWidget, "focus" | "refresh">;
4
+ export interface UseWidgetResult extends EmbedWidgetHandlers {
5
+ /**
6
+ * Attach to the DOM element you want the widget to mount inside.
7
+ * The hook reads the ref synchronously inside its mount effect; if the
8
+ * ref is empty at that point the embed is not created.
9
+ */
10
+ containerRef: RefObject<HTMLDivElement | null>;
11
+ }
12
+ export interface WidgetComponentProps {
13
+ className?: string;
14
+ style?: CSSProperties;
15
+ ref?: RefObject<EmbedWidgetHandlers | null>;
16
+ }
17
+ export interface WidgetBindings<TProps> {
18
+ useEmbed: (props: TProps) => UseWidgetResult;
19
+ Embed: ComponentType<TProps & WidgetComponentProps>;
20
+ }
21
+ export interface CreateWidgetBindingsOptions<TProps, TInstance extends EmbedWidget> {
22
+ factory: (props: TProps, element: HTMLElement) => TInstance;
23
+ buildStableDeps: (props: TProps) => unknown[];
24
+ }
25
+ /**
26
+ * Builds a `{ useEmbed, Embed }` pair for an inline widget. Unlike floating
27
+ * embeds, widgets need a host element — the hook returns a `containerRef` the
28
+ * consumer must attach to a DOM node, and the component does that for you by
29
+ * rendering a `<div>`.
30
+ */
31
+ export declare function createWidgetBindings<TProps, TInstance extends EmbedWidget>({ factory, buildStableDeps }: CreateWidgetBindingsOptions<TProps, TInstance>): WidgetBindings<TProps>;
32
+ //# sourceMappingURL=create-widget-bindings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-widget-bindings.d.ts","sourceRoot":"","sources":["../../../src/internal/create-widget-bindings.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAQ,KAAK,SAAS,EAAmD,MAAM,OAAO,CAAC;AAMtI,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC;AAEzE,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;IAC1D;;;;OAIG;IACH,YAAY,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,GAAG,CAAC,EAAE,SAAS,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,cAAc,CAAC,MAAM;IACpC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,eAAe,CAAC;IAC7C,KAAK,EAAE,aAAa,CAAC,MAAM,GAAG,oBAAoB,CAAC,CAAC;CACrD;AAMD,MAAM,WAAW,2BAA2B,CAAC,MAAM,EAAE,SAAS,SAAS,WAAW;IAChF,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,KAAK,SAAS,CAAC;IAC5D,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,EAAE,CAAC;CAC/C;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,SAAS,WAAW,EAAE,EAC1E,OAAO,EACP,eAAe,EAChB,EAAE,2BAA2B,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,CA4CzE"}
@@ -0,0 +1,4 @@
1
+ export * from './create-floating-bindings';
2
+ export * from './create-widget-bindings';
3
+ export * from './slot';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internal/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { CSSProperties, MouseEvent, ReactElement, ReactNode } from 'react';
2
+ /**
3
+ * Props the parent component wants to apply to the (single) child element.
4
+ *
5
+ * This is intentionally narrow — the slot only needs to merge the props the
6
+ * trigger components actually forward (event handler, className, style, aria,
7
+ * type). Widening it to `HTMLAttributes<HTMLElement>` is fine if more props
8
+ * are added later.
9
+ */
10
+ export interface SlotInjectedProps {
11
+ type?: "button";
12
+ onClick?: (event: MouseEvent<HTMLElement>) => void;
13
+ className?: string;
14
+ style?: CSSProperties;
15
+ "aria-expanded"?: boolean;
16
+ "aria-haspopup"?: "dialog" | "menu" | "true";
17
+ }
18
+ /**
19
+ * Radix-style `asChild` slot. Clones the single React element child and merges
20
+ * trigger-related props onto it. The child's own props win for non-handler
21
+ * fields (so a consumer's `className` is preserved alongside ours), and event
22
+ * handlers are composed (the child handler runs first, then the slot handler —
23
+ * so consumers can call `event.preventDefault()` to skip our `toggle` call).
24
+ *
25
+ * Throws synchronously if `children` is not a single React element so the
26
+ * misuse is obvious in development.
27
+ */
28
+ export declare function Slot({ children, ...slotProps }: {
29
+ children: ReactNode;
30
+ } & SlotInjectedProps): ReactElement;
31
+ //# sourceMappingURL=slot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slot.d.ts","sourceRoot":"","sources":["../../../src/internal/slot.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAgC,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7H;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;CAC9C;AASD;;;;;;;;;GASG;AACH,wBAAgB,IAAI,CAAC,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,iBAAiB,GAAG,YAAY,CAkC1G"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revvue/embed-react",
3
- "version": "0.0.0-beta.3",
3
+ "version": "0.0.0-beta.4",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -34,7 +34,7 @@
34
34
  }
35
35
  },
36
36
  "dependencies": {
37
- "@revvue/embed": "0.0.0-beta.3"
37
+ "@revvue/embed": "0.0.0-beta.4"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@testing-library/jest-dom": "^6.6.3",
@@ -1,3 +0,0 @@
1
- import { DialogProps } from './dialog';
2
- export declare function buildStableDeps(props: DialogProps): (string | number | undefined)[];
3
- //# sourceMappingURL=build-stable-deps.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-stable-deps.d.ts","sourceRoot":"","sources":["../../../../src/components/dialog/build-stable-deps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,mCAEjD"}
@@ -1,6 +0,0 @@
1
- import { Dialog as DialogInstance, createDialog } from '@revvue/embed';
2
- import { ForwardRefExoticComponent, RefAttributes } from 'react';
3
- export type DialogProps = Parameters<typeof createDialog>[0];
4
- export type DialogRef = Omit<DialogInstance, "unmount">;
5
- export declare const Dialog: ForwardRefExoticComponent<DialogProps & RefAttributes<DialogRef>>;
6
- //# sourceMappingURL=dialog.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/dialog/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,KAAK,yBAAyB,EAAc,KAAK,aAAa,EAA0C,MAAM,OAAO,CAAC;AAG/H,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7D,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;AAExD,eAAO,MAAM,MAAM,EAAE,yBAAyB,CAAC,WAAW,GAAG,aAAa,CAAC,SAAS,CAAC,CA4BpF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/dialog/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -1,3 +0,0 @@
1
- import { DrawerProps } from './drawer';
2
- export declare function buildStableDeps(props: DrawerProps): (string | number | boolean | undefined)[];
3
- //# sourceMappingURL=build-stable-deps.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-stable-deps.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/build-stable-deps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,6CAgBjD"}
@@ -1,6 +0,0 @@
1
- import { Drawer as DrawerInstance, createDrawer } from '@revvue/embed';
2
- import { ForwardRefExoticComponent, RefAttributes } from 'react';
3
- export type DrawerProps = Parameters<typeof createDrawer>[0];
4
- export type DrawerRef = Omit<DrawerInstance, "unmount">;
5
- export declare const Drawer: ForwardRefExoticComponent<DrawerProps & RefAttributes<DrawerRef>>;
6
- //# sourceMappingURL=drawer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/drawer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,KAAK,yBAAyB,EAAc,KAAK,aAAa,EAA0C,MAAM,OAAO,CAAC;AAG/H,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7D,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;AAExD,eAAO,MAAM,MAAM,EAAE,yBAAyB,CAAC,WAAW,GAAG,aAAa,CAAC,SAAS,CAAC,CA4BpF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC"}
@@ -1,3 +0,0 @@
1
- import { PopoverProps } from './popover';
2
- export declare function buildStableDeps(props: PopoverProps): (string | number | boolean | undefined)[];
3
- //# sourceMappingURL=build-stable-deps.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-stable-deps.d.ts","sourceRoot":"","sources":["../../../../src/components/popover/build-stable-deps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,wBAAgB,eAAe,CAAC,KAAK,EAAE,YAAY,6CAoBlD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/popover/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
@@ -1,29 +0,0 @@
1
- import { Popover as PopoverInstance, createPopover } from '@revvue/embed';
2
- import { ForwardRefExoticComponent, RefAttributes } from 'react';
3
- /**
4
- * All options accepted by the underlying `createPopover` factory.
5
- * Derived from the factory signature so it stays in sync automatically.
6
- */
7
- export type PopoverProps = Parameters<typeof createPopover>[0];
8
- /**
9
- * Imperative handle exposed via `ref` on the `<Popover>` component.
10
- */
11
- export type PopoverRef = Omit<PopoverInstance, "unmount">;
12
- /**
13
- * Renders an embedded Revvue form/chat as a floating popover button.
14
- *
15
- * The component manages no DOM of its own — it delegates entirely to the
16
- * `createPopover` factory, which appends the button and panel to `document.body`.
17
- * Use the forwarded ref to imperatively open, close, or toggle the popover.
18
- *
19
- * @example
20
- * ```tsx
21
- * const ref = useRef<PopoverRef>(null)
22
- *
23
- * <Popover ref={ref} tenant="acme" app="chat" type="popover" label="Chat with us" />
24
- *
25
- * <button onClick={() => ref.current?.open()}>Open popover</button>
26
- * ```
27
- */
28
- export declare const Popover: ForwardRefExoticComponent<PopoverProps & RefAttributes<PopoverRef>>;
29
- //# sourceMappingURL=popover.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../../src/components/popover/popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,KAAK,yBAAyB,EAAc,KAAK,aAAa,EAA0C,MAAM,OAAO,CAAC;AAG/H;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;AAE1D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,OAAO,EAAE,yBAAyB,CAAC,YAAY,GAAG,aAAa,CAAC,UAAU,CAAC,CA+BvF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-stable-deps.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/build-stable-deps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,mCAEjD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -1,11 +0,0 @@
1
- import { Widget as WidgetInstance, createWidget } from '@revvue/embed';
2
- import { CSSProperties, ForwardRefExoticComponent, RefAttributes } from 'react';
3
- export type WidgetProps = Parameters<typeof createWidget>[0] & {
4
- /** CSS class applied to the widget container div. */
5
- className?: string;
6
- /** Inline styles applied to the widget container div. */
7
- style?: CSSProperties;
8
- };
9
- export type WidgetRef = Omit<WidgetInstance, "unmount">;
10
- export declare const Widget: ForwardRefExoticComponent<WidgetProps & RefAttributes<WidgetRef>>;
11
- //# sourceMappingURL=widget.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"widget.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/widget.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,yBAAyB,EAAc,KAAK,aAAa,EAA0C,MAAM,OAAO,CAAC;AAGnJ,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG;IAC7D,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;AAExD,eAAO,MAAM,MAAM,EAAE,yBAAyB,CAAC,WAAW,GAAG,aAAa,CAAC,SAAS,CAAC,CA4BnF,CAAC"}
File without changes