@sirendesign/markup 1.0.28 → 1.0.32
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/components/Icons.d.ts +1 -0
- package/dist/index.esm.js +13 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/dist/markup-widget.esm.js +216 -216
- package/dist/markup-widget.esm.js.map +1 -1
- package/dist/markup-widget.js +212 -212
- package/dist/markup-widget.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +6 -3
package/dist/index.js
CHANGED
|
@@ -39808,6 +39808,10 @@ const deleteFeedback = async (feedbackId) => {
|
|
|
39808
39808
|
};
|
|
39809
39809
|
const subscribeFeedback = (projectId, callback) => {
|
|
39810
39810
|
const db = getFirebaseDb();
|
|
39811
|
+
if (!db) {
|
|
39812
|
+
console.warn('Firestore is not available. subscribeFeedback will be a no-op.');
|
|
39813
|
+
return () => { };
|
|
39814
|
+
}
|
|
39811
39815
|
const q = query(collection(db, COLLECTION_NAME), where('projectId', '==', projectId), orderBy('createdAt', 'desc'));
|
|
39812
39816
|
return onSnapshot(q, (snapshot) => {
|
|
39813
39817
|
console.log('Firestore snapshot received:', snapshot.size, 'documents');
|
|
@@ -39836,8 +39840,8 @@ const subscribeFeedback = (projectId, callback) => {
|
|
|
39836
39840
|
timestamp: new Date().toISOString(),
|
|
39837
39841
|
deviceType: 'desktop',
|
|
39838
39842
|
},
|
|
39839
|
-
createdAt: ((_c = (_b = (_a = data.createdAt) === null || _a === void 0 ? void 0 : _a.toDate) === null || _b === void 0 ? void 0 : _b.call(_a)) === null || _c === void 0 ? void 0 : _c.toISOString()) || new Date().toISOString(),
|
|
39840
|
-
updatedAt: ((_f = (_e = (_d = data.updatedAt) === null || _d === void 0 ? void 0 : _d.toDate) === null || _e === void 0 ? void 0 : _e.call(_d)) === null || _f === void 0 ? void 0 : _f.toISOString()) || ((_j = (_h = (_g = data.createdAt) === null || _g === void 0 ? void 0 : _g.toDate) === null || _h === void 0 ? void 0 : _h.call(_g)) === null || _j === void 0 ? void 0 : _j.toISOString()) || new Date().toISOString(),
|
|
39843
|
+
createdAt: ((_c = (_b = (_a = data.createdAt) === null || _a === void 0 ? void 0 : _a.toDate) === null || _b === void 0 ? void 0 : _b.call(_a)) === null || _c === void 0 ? void 0 : _c.toISOString()) || data.createdAt || new Date().toISOString(),
|
|
39844
|
+
updatedAt: ((_f = (_e = (_d = data.updatedAt) === null || _d === void 0 ? void 0 : _d.toDate) === null || _e === void 0 ? void 0 : _e.call(_d)) === null || _f === void 0 ? void 0 : _f.toISOString()) || ((_j = (_h = (_g = data.createdAt) === null || _g === void 0 ? void 0 : _g.toDate) === null || _h === void 0 ? void 0 : _h.call(_g)) === null || _j === void 0 ? void 0 : _j.toISOString()) || data.createdAt || new Date().toISOString(),
|
|
39841
39845
|
createdBy: data.createdBy || {
|
|
39842
39846
|
id: data.userId,
|
|
39843
39847
|
name: 'User',
|
|
@@ -40417,8 +40421,13 @@ const FeedbackPins = ({ onPinClick }) => {
|
|
|
40417
40421
|
hover:scale-110
|
|
40418
40422
|
`, children: jsxRuntime.jsx(MessageIcon, { className: "w-4 h-4 text-white" }) }), jsxRuntime.jsxs("div", { className: "\n absolute bottom-full left-1/2 -translate-x-1/2 mb-2\n opacity-0 group-hover:opacity-100\n pointer-events-none\n transition-opacity duration-200\n bg-gray-900 text-white text-xs rounded-lg py-2 px-3\n whitespace-nowrap shadow-xl\n max-w-[200px]\n ", children: [jsxRuntime.jsx("div", { className: "font-semibold truncate", children: feedback.title || 'Feedback' }), jsxRuntime.jsx("div", { className: "text-gray-300 text-[10px] mt-0.5", children: "Click to view" }), jsxRuntime.jsx("div", { className: "\n absolute top-full left-1/2 -translate-x-1/2\n w-0 h-0\n border-l-4 border-l-transparent\n border-r-4 border-r-transparent\n border-t-4 border-t-gray-900\n " })] })] }) }, feedback.id));
|
|
40419
40423
|
}
|
|
40420
|
-
|
|
40424
|
+
catch (e) {
|
|
40425
|
+
// If anything goes wrong measuring/positioning, skip this pin
|
|
40426
|
+
return null;
|
|
40427
|
+
}
|
|
40421
40428
|
}
|
|
40429
|
+
// If we didn't render a pin above, return null so map callback returns consistently
|
|
40430
|
+
return null;
|
|
40422
40431
|
}) }));
|
|
40423
40432
|
};
|
|
40424
40433
|
|
|
@@ -40702,6 +40711,7 @@ const MarkupWidget = ({ config: userConfig, }) => {
|
|
|
40702
40711
|
body.style.background = '';
|
|
40703
40712
|
};
|
|
40704
40713
|
}
|
|
40714
|
+
return undefined;
|
|
40705
40715
|
}, [viewportMode]);
|
|
40706
40716
|
React.useEffect(() => {
|
|
40707
40717
|
if (userConfig) {
|