@qratilabs/qrati-connect 2.23.0-beta.2 → 2.23.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.
- package/README.md +49 -61
- package/{umd/Wun_Og5n2.js → element/B7EvJYrt2.js} +1 -1
- package/element/{2SYk3iBo.js → BCyTQnZ1.js} +1 -1
- package/element/{BxeYKf-v2.js → BG57iQJK2.js} +21 -21
- package/element/{x2Vs8ihf.js → BNj7xAbL.js} +1 -1
- package/element/{BqPEscWs2.js → BbOqM_N12.js} +1 -1
- package/element/{8nf23RYF2.js → BbWh89xA2.js} +1 -1
- package/{umd/DVO71jbn2.js → element/BhWrOCDI2.js} +1 -1
- package/{umd/CgE_bYp32.js → element/BmFX4pgV2.js} +1 -1
- package/element/{DPmrTFJt.js → Boh-45fW.js} +1 -1
- package/element/{CAGYFwGT2.js → CCm2-mcE2.js} +1 -1
- package/element/{CbpHG7X52.js → CkgIN-cn2.js} +1 -1
- package/element/{BmCwXyo_2.js → CnAKuO192.js} +1 -1
- package/element/{lVJD5cJY.js → Crix9_9X.js} +1 -1
- package/{umd/htkJ94ea2.js → element/CslFRHxJ2.js} +1 -1
- package/element/{BekfKWcG.js → CtYiLBXL.js} +1 -1
- package/element/{fwDYCLiL.js → CuRZaTn5.js} +1 -1
- package/element/{B5BVTFlf.js → CwE8D5S0.js} +1 -1
- package/element/{j7EIoFjZ.js → D5TvVWUK.js} +1 -1
- package/element/{DibuO0dP.js → DB68-h-C.js} +1 -1
- package/{umd/we0Hcb5C.js → element/DBS5eoAD.js} +1 -1
- package/{umd/CU_-C7Pt2.js → element/DD6up6cl2.js} +1 -1
- package/element/{O530RtWA.js → DGHG5MsV.js} +1 -1
- package/element/{wuONdFBI2.js → DP5TIAjd2.js} +1 -1
- package/element/{hJxQiXVJ2.js → DYU4JC0C2.js} +1 -1
- package/{umd/9VAO1NmP.js → element/DZ2f3-jO.js} +1 -1
- package/{umd/DYUfJm8F.js → element/DcL9Mr2r.js} +1 -1
- package/element/{Be-K0dao.js → DcLlwdC6.js} +1 -1
- package/element/{C0vZ8zxT.js → DmSY4t_i.js} +1 -1
- package/element/{qJYsRQFB.js → DnW7WNo1.js} +1 -1
- package/element/{BiO2AH5s2.js → DoAMw2hA2.js} +1 -1
- package/element/{C6SiAA6Z2.js → DuyDrUjK2.js} +1 -1
- package/{umd/CYQ06kUR.js → element/E5aJy_fH.js} +1 -1
- package/element/{CMQUiMWC2.js → Hfo3iOYG2.js} +1 -1
- package/{umd/WtQ5axEj.js → element/TV5seYRS.js} +2 -2
- package/{umd/B2KTsK_w.js → element/YJHG0sOk.js} +1 -1
- package/element/{C9U01_vP2.js → gieTP6MG2.js} +2 -2
- package/element/{BnWKlftk2.js → li7rgMA52.js} +1 -1
- package/{umd/DIYTs0k3.js → element/tZTSWgVI.js} +1 -1
- package/element/web.es.js +5 -5
- package/package.json +1 -1
- package/{element/Wun_Og5n2.js → umd/B7EvJYrt2.js} +1 -1
- package/umd/{2SYk3iBo.js → BCyTQnZ1.js} +1 -1
- package/umd/{BxeYKf-v2.js → BG57iQJK2.js} +21 -21
- package/umd/{x2Vs8ihf.js → BNj7xAbL.js} +1 -1
- package/umd/{BqPEscWs2.js → BbOqM_N12.js} +1 -1
- package/umd/{8nf23RYF2.js → BbWh89xA2.js} +1 -1
- package/{element/DVO71jbn2.js → umd/BhWrOCDI2.js} +1 -1
- package/{element/CgE_bYp32.js → umd/BmFX4pgV2.js} +1 -1
- package/umd/{DPmrTFJt.js → Boh-45fW.js} +1 -1
- package/umd/{CAGYFwGT2.js → CCm2-mcE2.js} +1 -1
- package/umd/{CbpHG7X52.js → CkgIN-cn2.js} +1 -1
- package/umd/{BmCwXyo_2.js → CnAKuO192.js} +1 -1
- package/umd/{lVJD5cJY.js → Crix9_9X.js} +1 -1
- package/{element/htkJ94ea2.js → umd/CslFRHxJ2.js} +1 -1
- package/umd/{BekfKWcG.js → CtYiLBXL.js} +1 -1
- package/umd/{fwDYCLiL.js → CuRZaTn5.js} +1 -1
- package/umd/{B5BVTFlf.js → CwE8D5S0.js} +1 -1
- package/umd/{j7EIoFjZ.js → D5TvVWUK.js} +1 -1
- package/umd/{DibuO0dP.js → DB68-h-C.js} +1 -1
- package/{element/we0Hcb5C.js → umd/DBS5eoAD.js} +1 -1
- package/{element/CU_-C7Pt2.js → umd/DD6up6cl2.js} +1 -1
- package/umd/{O530RtWA.js → DGHG5MsV.js} +1 -1
- package/umd/{wuONdFBI2.js → DP5TIAjd2.js} +1 -1
- package/umd/{hJxQiXVJ2.js → DYU4JC0C2.js} +1 -1
- package/{element/9VAO1NmP.js → umd/DZ2f3-jO.js} +1 -1
- package/{element/DYUfJm8F.js → umd/DcL9Mr2r.js} +1 -1
- package/umd/{Be-K0dao.js → DcLlwdC6.js} +1 -1
- package/umd/{C0vZ8zxT.js → DmSY4t_i.js} +1 -1
- package/umd/{qJYsRQFB.js → DnW7WNo1.js} +1 -1
- package/umd/{BiO2AH5s2.js → DoAMw2hA2.js} +1 -1
- package/umd/{C6SiAA6Z2.js → DuyDrUjK2.js} +1 -1
- package/{element/CYQ06kUR.js → umd/E5aJy_fH.js} +1 -1
- package/umd/{CMQUiMWC2.js → Hfo3iOYG2.js} +1 -1
- package/{element/WtQ5axEj.js → umd/TV5seYRS.js} +2 -2
- package/{element/B2KTsK_w.js → umd/YJHG0sOk.js} +1 -1
- package/umd/{C9U01_vP2.js → gieTP6MG2.js} +2 -2
- package/umd/{BnWKlftk2.js → li7rgMA52.js} +1 -1
- package/{element/DIYTs0k3.js → umd/tZTSWgVI.js} +1 -1
- package/umd/web.es.js +5 -5
package/README.md
CHANGED
|
@@ -1,75 +1,65 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://qrati.com/images/qrati-connect-banner.jpg" alt="Qrati Connect Banner" style="max-width:100%;height:auto;" />
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://www.npmjs.com/package/@qratilabs/qrati-connect"><img src="https://img.shields.io/npm/v/@qratilabs/qrati-connect.svg" alt="npm version"></a>
|
|
7
|
+
<a href="https://www.npmjs.com/package/@qratilabs/qrati-connect"><img src="https://img.shields.io/npm/dm/@qratilabs/qrati-connect.svg" alt="npm downloads"></a>
|
|
8
|
+
<a href="https://github.com/qrati-labs/qrati-connect-ts/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@qratilabs/qrati-connect.svg" alt="license"></a>
|
|
9
|
+
<img src="https://img.shields.io/badge/TypeScript-Ready-blue.svg" alt="TypeScript">
|
|
10
|
+
</p>
|
|
4
11
|
|
|
5
|
-
|
|
12
|
+
---
|
|
6
13
|
|
|
7
|
-
|
|
8
|
-
- **Media Upload :** Users can directly upload content from your host site.
|
|
9
|
-
- **Reaction :** Engage your users with a completely customizable set of emojis.
|
|
10
|
-
- **Curation :** Want to host a photo contest? Our curation feature can be a one stop solution for that.
|
|
11
|
-
- **Leaderboard :** Gamify your contest with a precise and fun leaderboard.
|
|
14
|
+
# Qrati Connect — Embeddable Media & Engagement SDK 🚀
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
**Qrati Connect** is a compact, production-grade SDK for embedding photo galleries, uploads, curation, and engagement into any web app. Built with strict TypeScript, Preact compatibility, and careful bundling to deliver a fast, accessible, and themeable integration.
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
---
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
# or
|
|
24
|
-
bun install @qratilabs/qrati-connect
|
|
25
|
-
```
|
|
20
|
+
## Why Qrati Connect? 💡
|
|
21
|
+
|
|
22
|
+
- **Plug & Play**: Use the Web Component anywhere, or import the React wrapper for rapid integration.
|
|
23
|
+
- **Strict TypeScript**: Full typings for safer integration and better DX.
|
|
24
|
+
- **Performance-first**: Small initial bundle, strategic lazy-loading for heavy features (HEIC conversion, upload tooling).
|
|
25
|
+
- **Accessible & Themeable**: ARIA-friendly; visual theme is centrally configured via the Qrati Organization Settings page and applied to the component (exposed via CSS variables and className hooks).
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
---
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
import QratiConnect from '@qratilabs/qrati-connect/react';
|
|
31
|
-
import '@qratilabs/qrati-connect/react/styles.css';
|
|
29
|
+
## Highlights — What’s inside ✨
|
|
32
30
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
organizationId=<org_id>
|
|
37
|
-
/>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
31
|
+
- Interactive media gallery with lightbox, blurhash placeholders and infinite scroll
|
|
32
|
+
- Smart uploads: compression, chunked progress, HEIC → JPEG conversion (on-demand)
|
|
33
|
+
- Reactions, curation workflow, and leaderboards for engagement
|
|
40
34
|
|
|
41
|
-
|
|
42
|
-
```
|
|
35
|
+
---
|
|
43
36
|
|
|
44
|
-
|
|
37
|
+
## Quick Install & Integration
|
|
45
38
|
|
|
46
|
-
|
|
39
|
+
### Install
|
|
47
40
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
- **curateLabel :** Label to show in place of 'Curate' in header for contest type events.
|
|
54
|
-
- **leaderboardLabel :** Label to show in place of 'Leaders' in header for contest type events.
|
|
55
|
-
- **uid :** User id for your application user (applicable for custom auth only).
|
|
56
|
-
- **fname :** First name for your application user (applicable for custom auth only).
|
|
57
|
-
- **lname :** Last name for your application user (applicable for custom auth only).
|
|
58
|
-
- **loginUrl :** The page url inside your web app where we should redirect when authentication is required for user intended action (applicable for custom auth only).
|
|
41
|
+
```bash
|
|
42
|
+
pnpm add @qratilabs/qrati-connect
|
|
43
|
+
# or
|
|
44
|
+
npm install @qratilabs/qrati-connect
|
|
45
|
+
```
|
|
59
46
|
|
|
60
|
-
|
|
47
|
+
### React (Client Component)
|
|
61
48
|
|
|
62
|
-
|
|
49
|
+
```tsx
|
|
50
|
+
'use client';
|
|
51
|
+
import { QratiConnect } from '@qratilabs/qrati-connect';
|
|
63
52
|
|
|
64
|
-
|
|
53
|
+
export default function Page() {
|
|
54
|
+
return <QratiConnect organizationId='your-org-id' router='memory' />;
|
|
55
|
+
}
|
|
56
|
+
```
|
|
65
57
|
|
|
66
|
-
|
|
58
|
+
### Web Component (Framework Agnostic)
|
|
67
59
|
|
|
68
60
|
```html
|
|
69
|
-
<!-- Import the Web Component -->
|
|
70
61
|
<script type="module" src="https://cdn.jsdelivr.net/npm/@qratilabs/qrati-connect/element/web.es.js"></script>
|
|
71
|
-
|
|
72
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@qratilabs/qrati-connect/element/styles.css" />
|
|
62
|
+
<qrati-connect organization-id="your-org-id" router="hash"></qrati-connect>
|
|
73
63
|
```
|
|
74
64
|
|
|
75
65
|
### Embed (Single Script — No Code)
|
|
@@ -90,7 +80,7 @@ selector for the mount container).
|
|
|
90
80
|
|
|
91
81
|
---
|
|
92
82
|
|
|
93
|
-
|
|
83
|
+
## Props & Attributes
|
|
94
84
|
|
|
95
85
|
| Prop / Attribute | Type | Default | Description |
|
|
96
86
|
| ------------------- | ------------------------ | ---------- | -------------------------------------- |
|
|
@@ -102,17 +92,15 @@ Once imported, you can use the custom element tag `<qrati-connect>` in your HTML
|
|
|
102
92
|
| `theme` | `'light' \| 'dark'` | `'light'` | Color scheme |
|
|
103
93
|
| `onError` | `(error: Error) => void` | — | Error callback for handling SDK errors |
|
|
104
94
|
|
|
105
|
-
|
|
95
|
+
\* Required
|
|
106
96
|
|
|
107
|
-
|
|
97
|
+
---
|
|
108
98
|
|
|
109
|
-
|
|
110
|
-
text-primary -> text-foreground
|
|
111
|
-
text-secondary -> text-muted-foreground
|
|
112
|
-
bg-brand, text-brand -> bg-primary, text-primary
|
|
113
|
-
qc-text-lg, qc-bg-red-500 -> qc:text-lg, qc:bg-red-500
|
|
99
|
+
## Events & Callbacks
|
|
114
100
|
|
|
115
|
-
|
|
101
|
+
| Callback | Payload | Description |
|
|
102
|
+
| --------- | ------- | ------------------------------------- |
|
|
103
|
+
| `onError` | `Error` | Fires when an error occurs in the SDK |
|
|
116
104
|
|
|
117
105
|
---
|
|
118
106
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./qbHuxVSe.js";import{i as r}from"./
|
|
1
|
+
import{t as e}from"./qbHuxVSe.js";import{i as r}from"./TV5seYRS.js";import{t}from"./BCyTQnZ1.js";import{n as o,o as i,r as s,t as n}from"./Hfo3iOYG2.js";function a({color:r="#ff4800",className:t="mx-auto size-9",...o}){/* @__PURE__ */
|
|
2
2
|
return e("svg",{className:t,viewBox:"0 0 20 20",role:"img","aria-hidden":"true",style:{color:r},...o,children:[
|
|
3
3
|
/* @__PURE__ */e("defs",{children:/* @__PURE__ */e("linearGradient",{id:"RadialGradient8932",children:[/* @__PURE__ */e("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"1"}),/* @__PURE__ */e("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0.25"})]})}),
|
|
4
4
|
/* @__PURE__ */e("style",{children:"@keyframes spin8932 { to { transform: rotate(360deg); } }\n .circle8932 { transform-origin: 50% 50%; stroke: url(#RadialGradient8932); fill: none; animation: spin8932 .5s infinite linear; }"}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{E as r,t as e}from"./qbHuxVSe.js";import{i as t}from"./
|
|
1
|
+
import{E as r,t as e}from"./qbHuxVSe.js";import{i as t}from"./TV5seYRS.js";import{r as a}from"./CtYiLBXL.js";function i({className:r}){/* @__PURE__ */
|
|
2
2
|
return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:r,"aria-hidden":"true",focusable:"false",children:[
|
|
3
3
|
/* @__PURE__ */e("circle",{cx:"18",cy:"12",r:"0",fill:"currentColor",children:/* @__PURE__ */e("animate",{attributeName:"r",begin:".67",calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})}),
|
|
4
4
|
/* @__PURE__ */e("circle",{cx:"12",cy:"12",r:"0",fill:"currentColor",children:/* @__PURE__ */e("animate",{attributeName:"r",begin:".33",calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})}),
|