@revvue/embed 0.0.0-beta.3 → 0.0.0-beta.5
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/dist/browser/css/dialog.css +1 -1
- package/dist/browser/css/drawer.css +1 -1
- package/dist/browser/css/popover.css +1 -1
- package/dist/browser/embed.js +2 -2
- package/dist/package/css/dialog.css +1 -1
- package/dist/package/css/drawer.css +1 -1
- package/dist/package/css/popover.css +1 -1
- package/dist/package/package.cjs +278 -105
- package/dist/package/package.mjs +278 -106
- package/dist/package/types/core/app-options.d.ts +3 -2
- package/dist/package/types/core/app-options.d.ts.map +1 -1
- package/dist/package/types/core/button-options.d.ts +13 -0
- package/dist/package/types/core/button-options.d.ts.map +1 -1
- package/dist/package/types/core/common.d.ts +2 -0
- package/dist/package/types/core/common.d.ts.map +1 -1
- package/dist/package/types/core/create-iframe.d.ts +3 -1
- package/dist/package/types/core/create-iframe.d.ts.map +1 -1
- package/dist/package/types/core/embed-types.d.ts +12 -0
- package/dist/package/types/core/embed-types.d.ts.map +1 -1
- package/dist/package/types/core/iframe-messages.d.ts +6 -0
- package/dist/package/types/core/iframe-messages.d.ts.map +1 -0
- package/dist/package/types/factories/create-dialog/create-dialog.d.ts +2 -1
- package/dist/package/types/factories/create-dialog/create-dialog.d.ts.map +1 -1
- package/dist/package/types/factories/create-drawer/create-drawer.d.ts +2 -2
- package/dist/package/types/factories/create-drawer/create-drawer.d.ts.map +1 -1
- package/dist/package/types/factories/create-popover/create-popover.d.ts +2 -1
- package/dist/package/types/factories/create-popover/create-popover.d.ts.map +1 -1
- package/dist/package/types/factories/create-widget/create-widget.d.ts +2 -1
- package/dist/package/types/factories/create-widget/create-widget.d.ts.map +1 -1
- package/dist/package/types/package.d.ts +1 -0
- package/dist/package/types/package.d.ts.map +1 -1
- package/dist/package/types/utils/brand-types.d.ts +7 -0
- package/dist/package/types/utils/brand-types.d.ts.map +1 -1
- package/dist/package/types/utils/built-button/built-button.d.ts.map +1 -1
- package/dist/package/types/utils/create-closing-guard.d.ts +6 -0
- package/dist/package/types/utils/create-closing-guard.d.ts.map +1 -0
- package/dist/package/types/utils/icons.d.ts +3 -0
- package/dist/package/types/utils/icons.d.ts.map +1 -0
- package/dist/package/types/utils/open-state-store/index.d.ts +2 -0
- package/dist/package/types/utils/open-state-store/index.d.ts.map +1 -0
- package/dist/package/types/utils/open-state-store/open-state-store.d.ts +18 -0
- package/dist/package/types/utils/open-state-store/open-state-store.d.ts.map +1 -0
- package/dist/package/types/utils/open-state-store/open-state-store.spec.d.ts +2 -0
- package/dist/package/types/utils/open-state-store/open-state-store.spec.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iframe-messages.d.ts","sourceRoot":"","sources":["../../../../src/core/iframe-messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;CAGlB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EmbedOptions } from '../../core/app-options';
|
|
2
2
|
import { EmbedFloating } from '../../core/embed-types';
|
|
3
|
+
import { Public } from '../../utils/brand-types';
|
|
3
4
|
export type Dialog = EmbedFloating;
|
|
4
|
-
export declare function createDialog(options: EmbedOptions
|
|
5
|
+
export declare function createDialog(options: Public<EmbedOptions>, element?: HTMLElement): Dialog;
|
|
5
6
|
//# sourceMappingURL=create-dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-dialog.d.ts","sourceRoot":"","sources":["../../../../../src/factories/create-dialog/create-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"create-dialog.d.ts","sourceRoot":"","sources":["../../../../../src/factories/create-dialog/create-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAOtD,MAAM,MAAM,MAAM,GAAG,aAAa,CAAC;AAoBnC,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,MAAM,CA8EzF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EmbedOptions } from '../../core/app-options';
|
|
2
|
-
import { ButtonOptions } from '../../core/button-options';
|
|
3
2
|
import { EmbedFloating } from '../../core/embed-types';
|
|
3
|
+
import { Public } from '../../utils/brand-types';
|
|
4
4
|
export type Drawer = EmbedFloating;
|
|
5
|
-
export declare function createDrawer(options: EmbedOptions
|
|
5
|
+
export declare function createDrawer(options: Public<EmbedOptions>, element?: HTMLElement): Drawer;
|
|
6
6
|
//# sourceMappingURL=create-drawer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-drawer.d.ts","sourceRoot":"","sources":["../../../../../src/factories/create-drawer/create-drawer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"create-drawer.d.ts","sourceRoot":"","sources":["../../../../../src/factories/create-drawer/create-drawer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAOtD,MAAM,MAAM,MAAM,GAAG,aAAa,CAAC;AAoBnC,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,MAAM,CA8EzF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EmbedOptions } from '../../core/app-options';
|
|
2
2
|
import { ButtonOptions } from '../../core/button-options';
|
|
3
3
|
import { EmbedFloating } from '../../core/embed-types';
|
|
4
|
+
import { Public } from '../../utils/brand-types';
|
|
4
5
|
export type Popover = EmbedFloating;
|
|
5
|
-
export declare function createPopover(options: EmbedOptions & ButtonOptions, element?: HTMLElement): Popover;
|
|
6
|
+
export declare function createPopover(options: Public<EmbedOptions> & ButtonOptions, element?: HTMLElement): Popover;
|
|
6
7
|
//# sourceMappingURL=create-popover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-popover.d.ts","sourceRoot":"","sources":["../../../../../src/factories/create-popover/create-popover.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"create-popover.d.ts","sourceRoot":"","sources":["../../../../../src/factories/create-popover/create-popover.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAQtD,MAAM,MAAM,OAAO,GAAG,aAAa,CAAC;AAoBpC,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,YAAY,CAAC,GAAG,aAAa,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CA0G3G"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EmbedOptions } from '../../core/app-options';
|
|
2
2
|
import { EmbedWidget } from '../../core/embed-types';
|
|
3
|
+
import { Public } from '../../utils/brand-types';
|
|
3
4
|
export type Widget = EmbedWidget;
|
|
4
|
-
export declare function createWidget(options: EmbedOptions
|
|
5
|
+
export declare function createWidget(options: Public<EmbedOptions>, element?: HTMLElement): Widget;
|
|
5
6
|
//# sourceMappingURL=create-widget.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-widget.d.ts","sourceRoot":"","sources":["../../../../../src/factories/create-widget/create-widget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"create-widget.d.ts","sourceRoot":"","sources":["../../../../../src/factories/create-widget/create-widget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAItD,MAAM,MAAM,MAAM,GAAG,WAAW,CAAC;AAIjC,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,MAAM,CA2BzF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../../src/package.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../../src/package.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
export type Brand<T, B extends string> = T & {
|
|
2
2
|
__brand: B;
|
|
3
3
|
};
|
|
4
|
+
type Unbranded<T> = {
|
|
5
|
+
[K in keyof T]: T[K] extends string & {
|
|
6
|
+
__brand: unknown;
|
|
7
|
+
} ? string : T[K];
|
|
8
|
+
};
|
|
9
|
+
export type Public<T> = T extends unknown ? Unbranded<T> : never;
|
|
10
|
+
export {};
|
|
4
11
|
//# sourceMappingURL=brand-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand-types.d.ts","sourceRoot":"","sources":["../../../../src/utils/brand-types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,IAAI,CAAC,GAAG;IAAE,OAAO,EAAE,CAAC,CAAA;CAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"brand-types.d.ts","sourceRoot":"","sources":["../../../../src/utils/brand-types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,IAAI,CAAC,GAAG;IAAE,OAAO,EAAE,CAAC,CAAA;CAAE,CAAC;AAM5D,KAAK,SAAS,CAAC,CAAC,IAAI;KACjB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;CAC3E,CAAC;AAKF,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"built-button.d.ts","sourceRoot":"","sources":["../../../../../src/utils/built-button/built-button.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"built-button.d.ts","sourceRoot":"","sources":["../../../../../src/utils/built-button/built-button.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAe/D,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,iBAAiB,CAAC;IACtB,+EAA+E;IAC/E,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,aAAa,GAAG,mBAAmB,CA0C9E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-closing-guard.d.ts","sourceRoot":"","sources":["../../../../src/utils/create-closing-guard.ts"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB;;6BAOA,WAAW,UAAU,MAAM,IAAI,KAAG,IAAI;;EAuBvE"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const chatIcon = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-message-square-icon lucide-message-square\"><path d=\"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z\"/></svg>";
|
|
2
|
+
export declare const closeIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-x-icon lucide-x\"><path d=\"M18 6 6 18\"/><path d=\"m6 6 12 12\"/></svg>";
|
|
3
|
+
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../../src/utils/icons.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,uZACsW,CAAC;AAE5X,eAAO,MAAM,SAAS,0SAAkR,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/utils/open-state-store/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EmbedStateListener } from '../../core/embed-types';
|
|
2
|
+
/**
|
|
3
|
+
* Tiny pub/sub for floating embeds' open state.
|
|
4
|
+
*
|
|
5
|
+
* Provides the minimum surface needed by both vanilla consumers (who can
|
|
6
|
+
* imperatively check `getState()`) and React consumers (who pair `getState`
|
|
7
|
+
* with `subscribe` for `useSyncExternalStore`).
|
|
8
|
+
*
|
|
9
|
+
* All listeners are invoked synchronously on `setState` *only* when the value
|
|
10
|
+
* actually changes — repeated `setState(true)` calls do nothing.
|
|
11
|
+
*/
|
|
12
|
+
export interface OpenStateStore {
|
|
13
|
+
getState: () => boolean;
|
|
14
|
+
setState: (next: boolean) => void;
|
|
15
|
+
subscribe: (listener: EmbedStateListener) => () => void;
|
|
16
|
+
}
|
|
17
|
+
export declare function createOpenStateStore(initial?: boolean): OpenStateStore;
|
|
18
|
+
//# sourceMappingURL=open-state-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-state-store.d.ts","sourceRoot":"","sources":["../../../../../src/utils/open-state-store/open-state-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE;;;;;;;;;GASG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAClC,SAAS,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,MAAM,IAAI,CAAC;CACzD;AAED,wBAAgB,oBAAoB,CAAC,OAAO,UAAQ,GAAG,cAAc,CAkBpE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-state-store.spec.d.ts","sourceRoot":"","sources":["../../../../../src/utils/open-state-store/open-state-store.spec.ts"],"names":[],"mappings":""}
|