@placetopay/lightbox-sdk 0.2.0 → 0.2.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.
@@ -1,4 +1,4 @@
1
- import { ClientStyles } from '@/types';
1
+ import { ClientStyles } from '../types';
2
2
  export declare const LightboxApp: {
3
3
  emit: (type: string, data: unknown) => void;
4
4
  sendStyles: (styles: ClientStyles) => void;
@@ -1,4 +1,4 @@
1
- import { LightboxAppEvents } from '@/constants';
1
+ import { LightboxAppEvents } from '../constants';
2
2
  export var LightboxApp = {
3
3
  emit: function (type, data) {
4
4
  globalThis.parent.postMessage({ event: LightboxAppEvents.EMIT, type: type, data: data }, '*');
@@ -1,3 +1,3 @@
1
- import { ClientCallbacks, ClientStyles } from '@/types';
1
+ import { ClientCallbacks, ClientStyles } from '../types';
2
2
  export declare const mountListeners: (callbacks: ClientCallbacks, styles: ClientStyles) => void;
3
3
  export declare const mountIFrameElement: (url: string, styles: ClientStyles) => void;
@@ -9,8 +9,8 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { Config } from '@/config';
13
- import { Styles, ElementIds, Dimensions, LightboxAppEvents } from '@/constants';
12
+ import { Config } from '../config';
13
+ import { Styles, ElementIds, Dimensions, LightboxAppEvents } from '../constants';
14
14
  export var mountListeners = function (callbacks, styles) {
15
15
  if (!callbacks)
16
16
  return;
@@ -1,4 +1,4 @@
1
- import { InitOptions, LightboxInstance } from '@/types';
1
+ import { InitOptions, LightboxInstance } from '../types';
2
2
  export declare const LightboxClient: {
3
3
  init: (url: string, options?: InitOptions) => LightboxInstance;
4
4
  };
@@ -1,4 +1,4 @@
1
- import { redirectBasedOnDriver } from '@/helpers';
1
+ import { redirectBasedOnDriver } from '../helpers';
2
2
  import { mountIFrameElement, mountListeners } from './assemblers';
3
3
  export var LightboxClient = {
4
4
  init: function (url, options) {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,2 +1,3 @@
1
1
  export { LightboxApp } from './LightboxApp';
2
2
  export { LightboxClient } from './LightboxClient';
3
+ export * from './types';
@@ -1,2 +1,3 @@
1
1
  export { LightboxApp } from './LightboxApp';
2
2
  export { LightboxClient } from './LightboxClient';
3
+ export * from './types';
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,14 +1,13 @@
1
1
  {
2
2
  "name": "@placetopay/lightbox-sdk",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Small javascript library to encapsulate websites in a lightbox with configurable styles and behaviors",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "files": [
8
- "/dist/lib"
8
+ "/dist"
9
9
  ],
10
10
  "scripts": {
11
- "dev": "vite",
12
11
  "prebuild": "npm run clean-build",
13
12
  "build": "tsc",
14
13
  "postbuild": "copyfiles -u 1 src/**/*.css dist/",
@@ -39,19 +38,12 @@
39
38
  },
40
39
  "homepage": "https://bitbucket.org/placetopay/lightbox-sdk#readme",
41
40
  "devDependencies": {
42
- "@types/node": "^18.7.23",
43
- "@types/react": "^18.0.21",
44
- "@types/react-dom": "^18.0.6",
45
41
  "@typescript-eslint/eslint-plugin": "^5.38.1",
46
42
  "@typescript-eslint/parser": "^5.38.1",
47
- "@vitejs/plugin-react": "^2.1.0",
48
43
  "copyfiles": "^2.4.1",
49
44
  "eslint": "^8.24.0",
50
45
  "prettier": "^2.7.1",
51
- "react": "^18.2.0",
52
- "react-dom": "^18.2.0",
53
46
  "rimraf": "^3.0.2",
54
- "typescript": "^4.8.3",
55
- "vite": "^3.1.4"
47
+ "typescript": "^4.8.3"
56
48
  }
57
49
  }
package/README.md DELETED
@@ -1,19 +0,0 @@
1
- # Lightbox-sdk
2
- Small javascript library to encapsulate websites in a lightbox with configurable styles and behaviors.
3
-
4
- The library consists of 2 parts:
5
-
6
- - LightboxClient
7
- - LightboxApp
8
-
9
- If you have a site A, and within it you want to display a site B using Lightbox-sdk:
10
-
11
- On site A the LightboxClient will be used (site that will display a lightbox)
12
-
13
- - It will define which site will be displayed in the lightbox
14
- - It will define the style of the lightbox
15
- - It will define the callbacks for each lightbox event
16
-
17
- On site B LightboxApp will be used (site that will be shown in a lightbox)
18
-
19
- - Define the event emission logic