@revvue/embed 0.0.0-beta.1 → 0.0.0-beta.3

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 (37) hide show
  1. package/package.json +15 -15
  2. package/dist/types/config/env.d.ts +0 -6
  3. package/dist/types/config/env.d.ts.map +0 -1
  4. package/dist/types/core/app-options.d.ts +0 -17
  5. package/dist/types/core/app-options.d.ts.map +0 -1
  6. package/dist/types/core/common.d.ts +0 -8
  7. package/dist/types/core/common.d.ts.map +0 -1
  8. package/dist/types/core/embed-apps.d.ts +0 -2
  9. package/dist/types/core/embed-apps.d.ts.map +0 -1
  10. package/dist/types/core/embed-types.d.ts +0 -2
  11. package/dist/types/core/embed-types.d.ts.map +0 -1
  12. package/dist/types/dynamic-app/fetch-dynamic-app.d.ts +0 -4
  13. package/dist/types/dynamic-app/fetch-dynamic-app.d.ts.map +0 -1
  14. package/dist/types/factories/create-dialog/create-dialog.d.ts +0 -3
  15. package/dist/types/factories/create-dialog/create-dialog.d.ts.map +0 -1
  16. package/dist/types/factories/create-dialog/index.d.ts +0 -2
  17. package/dist/types/factories/create-dialog/index.d.ts.map +0 -1
  18. package/dist/types/factories/create-drawer/create-drawer.d.ts +0 -3
  19. package/dist/types/factories/create-drawer/create-drawer.d.ts.map +0 -1
  20. package/dist/types/factories/create-drawer/index.d.ts +0 -2
  21. package/dist/types/factories/create-drawer/index.d.ts.map +0 -1
  22. package/dist/types/factories/create-popup/create-popup.d.ts +0 -3
  23. package/dist/types/factories/create-popup/create-popup.d.ts.map +0 -1
  24. package/dist/types/factories/create-popup/index.d.ts +0 -2
  25. package/dist/types/factories/create-popup/index.d.ts.map +0 -1
  26. package/dist/types/factories/create-widget/create-widget.d.ts +0 -3
  27. package/dist/types/factories/create-widget/create-widget.d.ts.map +0 -1
  28. package/dist/types/factories/create-widget/index.d.ts +0 -2
  29. package/dist/types/factories/create-widget/index.d.ts.map +0 -1
  30. package/dist/types/factories/index.d.ts +0 -5
  31. package/dist/types/factories/index.d.ts.map +0 -1
  32. package/dist/types/package.d.ts +0 -2
  33. package/dist/types/package.d.ts.map +0 -1
  34. package/dist/types/utils/brand-types.d.ts +0 -4
  35. package/dist/types/utils/brand-types.d.ts.map +0 -1
  36. package/dist/types/utils/create-env.d.ts +0 -12
  37. package/dist/types/utils/create-env.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revvue/embed",
3
- "version": "0.0.0-beta.1",
3
+ "version": "0.0.0-beta.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -21,19 +21,7 @@
21
21
  },
22
22
  "./browser": "./dist/browser/embed.js"
23
23
  },
24
- "scripts": {
25
- "build": "pnpm build:browser && pnpm build:package",
26
- "build:browser": "vite build --config vite.config.browser.ts && CSS_OUT_DIR=dist/browser vite build --config vite.config.css.ts",
27
- "build:package": "vite build --config vite.config.package.ts && CSS_OUT_DIR=dist/package vite build --config vite.config.css.ts",
28
- "dev": "pnpm dev:js & pnpm dev:css",
29
- "dev:js": "vite build --config vite.config.browser.ts --watch",
30
- "dev:css": "CSS_OUT_DIR=dist/browser vite build --config vite.config.css.ts --watch",
31
- "test": "vitest run",
32
- "test:watch": "vitest",
33
- "test:coverage": "vitest run --coverage"
34
- },
35
24
  "devDependencies": {
36
- "@repo/typescript-config": "workspace:*",
37
25
  "@testing-library/dom": "^10.4.0",
38
26
  "@testing-library/jest-dom": "^6.6.3",
39
27
  "@vitest/coverage-v8": "^4.1.5",
@@ -43,6 +31,18 @@
43
31
  "postcss": "^8.5.0",
44
32
  "vite": "^8.0.10",
45
33
  "vite-plugin-dts": "^4.5.4",
46
- "vitest": "^4.1.5"
34
+ "vitest": "^4.1.5",
35
+ "@repo/typescript-config": "0.0.0"
36
+ },
37
+ "scripts": {
38
+ "build": "pnpm build:browser && pnpm build:package",
39
+ "build:browser": "vite build --config vite.config.browser.ts && CSS_OUT_DIR=dist/browser vite build --config vite.config.css.ts",
40
+ "build:package": "vite build --config vite.config.package.ts && CSS_OUT_DIR=dist/package vite build --config vite.config.css.ts",
41
+ "dev": "pnpm dev:js & pnpm dev:css",
42
+ "dev:js": "vite build --config vite.config.browser.ts --watch",
43
+ "dev:css": "CSS_OUT_DIR=dist/browser vite build --config vite.config.css.ts --watch",
44
+ "test": "vitest run",
45
+ "test:watch": "vitest",
46
+ "test:coverage": "vitest run --coverage"
47
47
  }
48
- }
48
+ }
@@ -1,6 +0,0 @@
1
- export declare const env: {
2
- CHAT_URL: string;
3
- FORM_URL: string;
4
- DEBUG: boolean;
5
- };
6
- //# sourceMappingURL=env.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../src/config/env.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG;;;;CAiBf,CAAC"}
@@ -1,17 +0,0 @@
1
- import { TenantId } from "./common";
2
- import { EmbedApp } from "./embed-apps";
3
- import { EmbedType } from "./embed-types";
4
- export interface BaseAppOptions {
5
- tenant: TenantId;
6
- type: EmbedType;
7
- app: EmbedApp;
8
- }
9
- export interface ChatAppOptions extends BaseAppOptions {
10
- app: "chat";
11
- }
12
- export interface FormAppOptions extends BaseAppOptions {
13
- app: "form";
14
- formId: string;
15
- }
16
- export type AppOptions = ChatAppOptions | FormAppOptions;
17
- //# sourceMappingURL=app-options.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-options.d.ts","sourceRoot":"","sources":["../../../src/core/app-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,QAAQ,CAAC;IACjB,IAAI,EAAE,SAAS,CAAC;IAChB,GAAG,EAAE,QAAQ,CAAC;CACf;AAED,MAAM,WAAW,cAAe,SAAQ,cAAc;IACpD,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,cAAe,SAAQ,cAAc;IACpD,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,cAAc,CAAC"}
@@ -1,8 +0,0 @@
1
- import { Brand } from "../utils/brand-types";
2
- export type TenantId = Brand<string, "TenantId">;
3
- export type FormId = Brand<string, "FormId">;
4
- export type DynamicAppId = Brand<string, "DynamicAppId">;
5
- export declare const tenantId: (id: string) => TenantId;
6
- export declare const formId: (id: string) => FormId;
7
- export declare const dynamicAppId: (id: string) => DynamicAppId;
8
- //# sourceMappingURL=common.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/core/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AACjD,MAAM,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAC7C,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;AAEzD,eAAO,MAAM,QAAQ,GAAI,IAAI,MAAM,KAAG,QAA0B,CAAC;AACjE,eAAO,MAAM,MAAM,GAAI,IAAI,MAAM,KAAG,MAAsB,CAAC;AAC3D,eAAO,MAAM,YAAY,GAAI,IAAI,MAAM,KAAG,YAAkC,CAAC"}
@@ -1,2 +0,0 @@
1
- export type EmbedApp = "chat" | "form";
2
- //# sourceMappingURL=embed-apps.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"embed-apps.d.ts","sourceRoot":"","sources":["../../../src/core/embed-apps.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC"}
@@ -1,2 +0,0 @@
1
- export type EmbedType = "widget" | "popup" | "drawer" | "dialog";
2
- //# sourceMappingURL=embed-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"embed-types.d.ts","sourceRoot":"","sources":["../../../src/core/embed-types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC"}
@@ -1,4 +0,0 @@
1
- import { AppOptions } from "../core/app-options";
2
- import { DynamicAppId } from "../core/common";
3
- export declare function fetchDynamicApp(id: DynamicAppId): Promise<AppOptions>;
4
- //# sourceMappingURL=fetch-dynamic-app.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetch-dynamic-app.d.ts","sourceRoot":"","sources":["../../../src/dynamic-app/fetch-dynamic-app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,wBAAsB,eAAe,CAAC,EAAE,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CAE3E"}
@@ -1,3 +0,0 @@
1
- import { AppOptions } from "../../core/app-options";
2
- export declare function createDialog(options: AppOptions, element: HTMLElement): void;
3
- //# sourceMappingURL=create-dialog.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-dialog.d.ts","sourceRoot":"","sources":["../../../../src/factories/create-dialog/create-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,wBAAgB,YAAY,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,QAErE"}
@@ -1,2 +0,0 @@
1
- export * from "./create-dialog";
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/factories/create-dialog/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -1,3 +0,0 @@
1
- import { AppOptions } from "../../core/app-options";
2
- export declare function createDrawer(options: AppOptions, element: HTMLElement): void;
3
- //# sourceMappingURL=create-drawer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-drawer.d.ts","sourceRoot":"","sources":["../../../../src/factories/create-drawer/create-drawer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,wBAAgB,YAAY,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,QAErE"}
@@ -1,2 +0,0 @@
1
- export * from "./create-drawer";
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/factories/create-drawer/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -1,3 +0,0 @@
1
- import { AppOptions } from "../../core/app-options";
2
- export declare function createPopup(options: AppOptions, element: HTMLElement): void;
3
- //# sourceMappingURL=create-popup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-popup.d.ts","sourceRoot":"","sources":["../../../../src/factories/create-popup/create-popup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,wBAAgB,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,QAEpE"}
@@ -1,2 +0,0 @@
1
- export * from "./create-popup";
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/factories/create-popup/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -1,3 +0,0 @@
1
- import { AppOptions } from "../../core/app-options";
2
- export declare function createWidget(options: AppOptions, element: HTMLElement): void;
3
- //# sourceMappingURL=create-widget.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-widget.d.ts","sourceRoot":"","sources":["../../../../src/factories/create-widget/create-widget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,wBAAgB,YAAY,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,QAErE"}
@@ -1,2 +0,0 @@
1
- export * from "./create-widget";
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/factories/create-widget/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -1,5 +0,0 @@
1
- export * from "./create-widget";
2
- export * from "./create-popup";
3
- export * from "./create-drawer";
4
- export * from "./create-dialog";
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/factories/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from "./factories";
2
- //# sourceMappingURL=package.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/package.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -1,4 +0,0 @@
1
- export type Brand<T, B extends string> = T & {
2
- __brand: B;
3
- };
4
- //# sourceMappingURL=brand-types.d.ts.map
@@ -1 +0,0 @@
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,12 +0,0 @@
1
- type EnvField<T> = {
2
- default?: T;
3
- required?: boolean;
4
- parse?: (value: string) => T;
5
- };
6
- type EnvSchema = Record<string, EnvField<unknown>>;
7
- type InferEnv<S extends EnvSchema> = {
8
- [K in keyof S]: S[K] extends EnvField<infer T> ? T : never;
9
- };
10
- export declare function createEnv<S extends EnvSchema>(schema: S, source?: Record<string, string | undefined>): InferEnv<S>;
11
- export {};
12
- //# sourceMappingURL=create-env.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-env.d.ts","sourceRoot":"","sources":["../../../src/utils/create-env.ts"],"names":[],"mappings":"AAAA,KAAK,QAAQ,CAAC,CAAC,IAAI;IACjB,OAAO,CAAC,EAAE,CAAC,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,CAAC,CAAC;CAC9B,CAAC;AAEF,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AAEnD,KAAK,QAAQ,CAAC,CAAC,SAAS,SAAS,IAAI;KAClC,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK;CAC3D,CAAC;AAEF,wBAAgB,SAAS,CAAC,CAAC,SAAS,SAAS,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CAkBtH"}