@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.
Files changed (80) hide show
  1. package/README.md +49 -61
  2. package/{umd/Wun_Og5n2.js → element/B7EvJYrt2.js} +1 -1
  3. package/element/{2SYk3iBo.js → BCyTQnZ1.js} +1 -1
  4. package/element/{BxeYKf-v2.js → BG57iQJK2.js} +21 -21
  5. package/element/{x2Vs8ihf.js → BNj7xAbL.js} +1 -1
  6. package/element/{BqPEscWs2.js → BbOqM_N12.js} +1 -1
  7. package/element/{8nf23RYF2.js → BbWh89xA2.js} +1 -1
  8. package/{umd/DVO71jbn2.js → element/BhWrOCDI2.js} +1 -1
  9. package/{umd/CgE_bYp32.js → element/BmFX4pgV2.js} +1 -1
  10. package/element/{DPmrTFJt.js → Boh-45fW.js} +1 -1
  11. package/element/{CAGYFwGT2.js → CCm2-mcE2.js} +1 -1
  12. package/element/{CbpHG7X52.js → CkgIN-cn2.js} +1 -1
  13. package/element/{BmCwXyo_2.js → CnAKuO192.js} +1 -1
  14. package/element/{lVJD5cJY.js → Crix9_9X.js} +1 -1
  15. package/{umd/htkJ94ea2.js → element/CslFRHxJ2.js} +1 -1
  16. package/element/{BekfKWcG.js → CtYiLBXL.js} +1 -1
  17. package/element/{fwDYCLiL.js → CuRZaTn5.js} +1 -1
  18. package/element/{B5BVTFlf.js → CwE8D5S0.js} +1 -1
  19. package/element/{j7EIoFjZ.js → D5TvVWUK.js} +1 -1
  20. package/element/{DibuO0dP.js → DB68-h-C.js} +1 -1
  21. package/{umd/we0Hcb5C.js → element/DBS5eoAD.js} +1 -1
  22. package/{umd/CU_-C7Pt2.js → element/DD6up6cl2.js} +1 -1
  23. package/element/{O530RtWA.js → DGHG5MsV.js} +1 -1
  24. package/element/{wuONdFBI2.js → DP5TIAjd2.js} +1 -1
  25. package/element/{hJxQiXVJ2.js → DYU4JC0C2.js} +1 -1
  26. package/{umd/9VAO1NmP.js → element/DZ2f3-jO.js} +1 -1
  27. package/{umd/DYUfJm8F.js → element/DcL9Mr2r.js} +1 -1
  28. package/element/{Be-K0dao.js → DcLlwdC6.js} +1 -1
  29. package/element/{C0vZ8zxT.js → DmSY4t_i.js} +1 -1
  30. package/element/{qJYsRQFB.js → DnW7WNo1.js} +1 -1
  31. package/element/{BiO2AH5s2.js → DoAMw2hA2.js} +1 -1
  32. package/element/{C6SiAA6Z2.js → DuyDrUjK2.js} +1 -1
  33. package/{umd/CYQ06kUR.js → element/E5aJy_fH.js} +1 -1
  34. package/element/{CMQUiMWC2.js → Hfo3iOYG2.js} +1 -1
  35. package/{umd/WtQ5axEj.js → element/TV5seYRS.js} +2 -2
  36. package/{umd/B2KTsK_w.js → element/YJHG0sOk.js} +1 -1
  37. package/element/{C9U01_vP2.js → gieTP6MG2.js} +2 -2
  38. package/element/{BnWKlftk2.js → li7rgMA52.js} +1 -1
  39. package/{umd/DIYTs0k3.js → element/tZTSWgVI.js} +1 -1
  40. package/element/web.es.js +5 -5
  41. package/package.json +1 -1
  42. package/{element/Wun_Og5n2.js → umd/B7EvJYrt2.js} +1 -1
  43. package/umd/{2SYk3iBo.js → BCyTQnZ1.js} +1 -1
  44. package/umd/{BxeYKf-v2.js → BG57iQJK2.js} +21 -21
  45. package/umd/{x2Vs8ihf.js → BNj7xAbL.js} +1 -1
  46. package/umd/{BqPEscWs2.js → BbOqM_N12.js} +1 -1
  47. package/umd/{8nf23RYF2.js → BbWh89xA2.js} +1 -1
  48. package/{element/DVO71jbn2.js → umd/BhWrOCDI2.js} +1 -1
  49. package/{element/CgE_bYp32.js → umd/BmFX4pgV2.js} +1 -1
  50. package/umd/{DPmrTFJt.js → Boh-45fW.js} +1 -1
  51. package/umd/{CAGYFwGT2.js → CCm2-mcE2.js} +1 -1
  52. package/umd/{CbpHG7X52.js → CkgIN-cn2.js} +1 -1
  53. package/umd/{BmCwXyo_2.js → CnAKuO192.js} +1 -1
  54. package/umd/{lVJD5cJY.js → Crix9_9X.js} +1 -1
  55. package/{element/htkJ94ea2.js → umd/CslFRHxJ2.js} +1 -1
  56. package/umd/{BekfKWcG.js → CtYiLBXL.js} +1 -1
  57. package/umd/{fwDYCLiL.js → CuRZaTn5.js} +1 -1
  58. package/umd/{B5BVTFlf.js → CwE8D5S0.js} +1 -1
  59. package/umd/{j7EIoFjZ.js → D5TvVWUK.js} +1 -1
  60. package/umd/{DibuO0dP.js → DB68-h-C.js} +1 -1
  61. package/{element/we0Hcb5C.js → umd/DBS5eoAD.js} +1 -1
  62. package/{element/CU_-C7Pt2.js → umd/DD6up6cl2.js} +1 -1
  63. package/umd/{O530RtWA.js → DGHG5MsV.js} +1 -1
  64. package/umd/{wuONdFBI2.js → DP5TIAjd2.js} +1 -1
  65. package/umd/{hJxQiXVJ2.js → DYU4JC0C2.js} +1 -1
  66. package/{element/9VAO1NmP.js → umd/DZ2f3-jO.js} +1 -1
  67. package/{element/DYUfJm8F.js → umd/DcL9Mr2r.js} +1 -1
  68. package/umd/{Be-K0dao.js → DcLlwdC6.js} +1 -1
  69. package/umd/{C0vZ8zxT.js → DmSY4t_i.js} +1 -1
  70. package/umd/{qJYsRQFB.js → DnW7WNo1.js} +1 -1
  71. package/umd/{BiO2AH5s2.js → DoAMw2hA2.js} +1 -1
  72. package/umd/{C6SiAA6Z2.js → DuyDrUjK2.js} +1 -1
  73. package/{element/CYQ06kUR.js → umd/E5aJy_fH.js} +1 -1
  74. package/umd/{CMQUiMWC2.js → Hfo3iOYG2.js} +1 -1
  75. package/{element/WtQ5axEj.js → umd/TV5seYRS.js} +2 -2
  76. package/{element/B2KTsK_w.js → umd/YJHG0sOk.js} +1 -1
  77. package/umd/{C9U01_vP2.js → gieTP6MG2.js} +2 -2
  78. package/umd/{BnWKlftk2.js → li7rgMA52.js} +1 -1
  79. package/{element/DIYTs0k3.js → umd/tZTSWgVI.js} +1 -1
  80. package/umd/web.es.js +5 -5
package/README.md CHANGED
@@ -1,75 +1,65 @@
1
- ![Logo](https://qrati.com/images/qrati-connect-banner.jpg)
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
- Qrati Connect is a React component library designed to seamlessly integrate Qrati's interactive features into your web applications to enhance user engagement and interaction.
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
- # Features
12
+ ---
6
13
 
7
- - **Interactive Media Gallery :** Integrate Qrati's powerful interactive media gallery into your own site without a hassle.
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
- # Installation (React Component)
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
- Install `qrati-connect` using npm, yarn, pnpm or bun:
18
+ ---
16
19
 
17
- ```bash
18
- npm install @qratilabs/qrati-connect
19
- # or
20
- yarn add @qratilabs/qrati-connect
21
- # or
22
- pnpm add @qratilabs/qrati-connect
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
- Sample react page -
27
+ ---
28
28
 
29
- ```javascript
30
- import QratiConnect from '@qratilabs/qrati-connect/react';
31
- import '@qratilabs/qrati-connect/react/styles.css';
29
+ ## Highlights — What’s inside ✨
32
30
 
33
- const Page = () => {
34
- return (
35
- <QratiConnect
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
- export default Page;
42
- ```
35
+ ---
43
36
 
44
- **Note**: Add 'use client' directive if you are using any React frameworks which supports Server Side Rendering (SSR) like Next.js.
37
+ ## Quick Install & Integration
45
38
 
46
- # Available props
39
+ ### Install
47
40
 
48
- - **router :** Custom router configuration for internal navigation ('memory or 'hash').
49
- - **organizationId :** Unique identifier for your organization inside Qrati.
50
- - **fontClassName :** Classes to control custom font for the component.
51
- - **textClassName :** Classes to apply any additional styling to texts inside the component.
52
- - **emptyStateImage :** Link or path to image which will be shown for any empty state in the component.
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
- # Qrati Connect Element (Web Component)
47
+ ### React (Client Component)
61
48
 
62
- Qrati Connect is also available as a Web Component (Custom Element) that you can use directly in your HTML without React. This is useful for non-React applications or when you want to embed Qrati Connect in static HTML pages.
49
+ ```tsx
50
+ 'use client';
51
+ import { QratiConnect } from '@qratilabs/qrati-connect';
63
52
 
64
- ## Installation via CDN (jsDelivr)
53
+ export default function Page() {
54
+ return <QratiConnect organizationId='your-org-id' router='memory' />;
55
+ }
56
+ ```
65
57
 
66
- Add the following script and stylesheet tags to your HTML:
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
- <!-- Import the styles -->
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
- Once imported, you can use the custom element tag `<qrati-connect>` in your HTML:
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
- Note: When using the Web Component version, props are passed as HTML attributes with kebab-case naming (e.g., `organization-id` instead of `organizationId`).
95
+ \* Required
106
96
 
107
- 3. Tailwindv3 -> Tailwindv4
97
+ ---
108
98
 
109
- bg-primary, bg-secondary -> bg-background
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
- 4. IconifyReact -> Iconify Tailwindv4
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"./WtQ5axEj.js";import{t}from"./2SYk3iBo.js";import{n as o,o as i,r as s,t as n}from"./CMQUiMWC2.js";function a({color:r="#ff4800",className:t="mx-auto size-9",...o}){/* @__PURE__ */
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"./WtQ5axEj.js";import{r as a}from"./BekfKWcG.js";function i({className:r}){/* @__PURE__ */
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"})}),