@fynd-design-engineering/fynd-one-v2 2.2.0 → 2.2.2
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/analytics/debug.js +1 -0
- package/dist/analytics/debug.js.map +7 -0
- package/dist/analytics/form-success.js +1 -0
- package/dist/analytics/form-success.js.map +7 -0
- package/dist/analytics/main.js +1 -0
- package/dist/analytics/main.js.map +7 -0
- package/dist/form/download-file.js +1 -33
- package/dist/global/style.css +1 -634
- package/dist/home/index.js +1 -18
- package/dist/navigation/announcement/index.js +1 -5170
- package/dist/navigation/context-menu/index.js +1 -32
- package/dist/navigation/desktop/index.js +1 -4613
- package/dist/navigation/mobile/index.js +1 -288
- package/dist/navigation/scroll/index.js +1 -55
- package/dist/navigation/style.css +1 -102
- package/dist/posthog/index.js +48 -20
- package/dist/posthog/index.js.map +2 -2
- package/dist/test/sample.js +1 -16
- package/dist/tracking/fill-form-fields.js +1 -97
- package/dist/tracking/page-categories.js +1 -21
- package/dist/tracking/user-journey.js +1 -253
- package/dist/tracking/utm-links.js +1 -195
- package/dist/utils/sample.js +1 -18
- package/dist/validations/localhost.js +1 -222
- package/package.json +1 -1
|
@@ -1,222 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
(() => {
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __esm = (fn, res) => function __init() {
|
|
10
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
11
|
-
};
|
|
12
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
13
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
14
|
-
};
|
|
15
|
-
var __copyProps = (to, from, except, desc) => {
|
|
16
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
-
for (let key of __getOwnPropNames(from))
|
|
18
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
19
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
20
|
-
}
|
|
21
|
-
return to;
|
|
22
|
-
};
|
|
23
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
24
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
25
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
26
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
27
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
28
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
29
|
-
mod
|
|
30
|
-
));
|
|
31
|
-
|
|
32
|
-
// bin/live-reload.js
|
|
33
|
-
var init_live_reload = __esm({
|
|
34
|
-
"bin/live-reload.js"() {
|
|
35
|
-
"use strict";
|
|
36
|
-
if (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") {
|
|
37
|
-
new EventSource(`${"http://localhost:3000"}/esbuild`).addEventListener(
|
|
38
|
-
"change",
|
|
39
|
-
() => location.reload()
|
|
40
|
-
);
|
|
41
|
-
} else {
|
|
42
|
-
console.log("Live reload disabled: not running on localhost");
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
// node_modules/.pnpm/@fynd-design-engineering+web-utils@1.0.1/node_modules/@fynd-design-engineering/web-utils/dist/window/get-path-segments.js
|
|
48
|
-
var require_get_path_segments = __commonJS({
|
|
49
|
-
"node_modules/.pnpm/@fynd-design-engineering+web-utils@1.0.1/node_modules/@fynd-design-engineering/web-utils/dist/window/get-path-segments.js"(exports) {
|
|
50
|
-
"use strict";
|
|
51
|
-
init_live_reload();
|
|
52
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
-
exports.getPathSegments = getPathSegments;
|
|
54
|
-
function getPathSegments() {
|
|
55
|
-
const pathSegments = window.location.pathname.replace(/^\//, "").split("/");
|
|
56
|
-
return pathSegments.filter((segment) => segment !== "");
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
// node_modules/.pnpm/@fynd-design-engineering+web-utils@1.0.1/node_modules/@fynd-design-engineering/web-utils/dist/validations/localhost.js
|
|
62
|
-
var require_localhost = __commonJS({
|
|
63
|
-
"node_modules/.pnpm/@fynd-design-engineering+web-utils@1.0.1/node_modules/@fynd-design-engineering/web-utils/dist/validations/localhost.js"(exports) {
|
|
64
|
-
"use strict";
|
|
65
|
-
init_live_reload();
|
|
66
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
-
exports.checkForLocalhostUrls = checkForLocalhostUrls2;
|
|
68
|
-
exports.enableAutomaticLocalhostCheck = enableAutomaticLocalhostCheck;
|
|
69
|
-
function checkForLocalhostUrls2(options = {}) {
|
|
70
|
-
const { checkLinks = true, checkImages = true, checkScripts = true, checkTextContent = true } = options;
|
|
71
|
-
const localhostPatterns = [
|
|
72
|
-
/localhost/gi,
|
|
73
|
-
/127\.0\.0\.1/g,
|
|
74
|
-
/0\.0\.0\.0/g,
|
|
75
|
-
/\b(?:https?:\/\/)?(?:www\.)?localhost(?::\d+)?(?:\/[^\s]*)?/gi,
|
|
76
|
-
/\b(?:https?:\/\/)?127\.0\.0\.1(?::\d+)?(?:\/[^\s]*)?/g,
|
|
77
|
-
/\b(?:https?:\/\/)?0\.0\.0\.0(?::\d+)?(?:\/[^\s]*)?/g
|
|
78
|
-
];
|
|
79
|
-
const warnings = [];
|
|
80
|
-
const foundUrls = /* @__PURE__ */ new Set();
|
|
81
|
-
if (checkLinks) {
|
|
82
|
-
const links = document.querySelectorAll("a[href], link[href]");
|
|
83
|
-
links.forEach((element) => {
|
|
84
|
-
const href = element.getAttribute("href");
|
|
85
|
-
if (href && localhostPatterns.some((pattern) => pattern.test(href))) {
|
|
86
|
-
foundUrls.add(href);
|
|
87
|
-
warnings.push(`Found localhost URL in ${element.tagName.toLowerCase()} href: ${href}`);
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
if (checkImages) {
|
|
92
|
-
const images = document.querySelectorAll("img[src]");
|
|
93
|
-
images.forEach((element) => {
|
|
94
|
-
const src = element.getAttribute("src");
|
|
95
|
-
if (src && localhostPatterns.some((pattern) => pattern.test(src))) {
|
|
96
|
-
foundUrls.add(src);
|
|
97
|
-
warnings.push(`Found localhost URL in img src: ${src}`);
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
if (checkScripts) {
|
|
102
|
-
const scripts = document.querySelectorAll("script[src]");
|
|
103
|
-
scripts.forEach((element) => {
|
|
104
|
-
const src = element.getAttribute("src");
|
|
105
|
-
if (src && localhostPatterns.some((pattern) => pattern.test(src))) {
|
|
106
|
-
foundUrls.add(src);
|
|
107
|
-
warnings.push(`Found localhost URL in script src: ${src}`);
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
if (checkTextContent) {
|
|
112
|
-
const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT, null);
|
|
113
|
-
let node;
|
|
114
|
-
while (node = walker.nextNode()) {
|
|
115
|
-
const textContent = node.textContent || "";
|
|
116
|
-
localhostPatterns.forEach((pattern) => {
|
|
117
|
-
const matches = textContent.match(pattern);
|
|
118
|
-
if (matches) {
|
|
119
|
-
matches.forEach((match) => {
|
|
120
|
-
foundUrls.add(match);
|
|
121
|
-
warnings.push(`Found localhost URL in text content: ${match}`);
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
if (warnings.length > 0) {
|
|
128
|
-
console.group("\u{1F6A8} LOCALHOST URLs DETECTED - PRODUCTION WARNING");
|
|
129
|
-
console.warn("\u26A0\uFE0F CRITICAL: Localhost URLs found in production environment!");
|
|
130
|
-
console.warn(`\u{1F4CA} Total issues found: ${warnings.length}`);
|
|
131
|
-
console.warn(`\u{1F517} Unique URLs: ${foundUrls.size}`);
|
|
132
|
-
console.log("");
|
|
133
|
-
warnings.forEach((warning, index) => {
|
|
134
|
-
console.warn(`${index + 1}. ${warning}`);
|
|
135
|
-
});
|
|
136
|
-
console.log("");
|
|
137
|
-
console.warn("\u{1F527} Please replace all localhost URLs with production URLs before deployment.");
|
|
138
|
-
console.warn("\u{1F4DA} This can cause broken links, missing resources, and poor user experience.");
|
|
139
|
-
console.groupEnd();
|
|
140
|
-
if (false) {
|
|
141
|
-
throw new Error(`Production build contains ${foundUrls.size} localhost URLs. Please fix before deployment.`);
|
|
142
|
-
}
|
|
143
|
-
} else {
|
|
144
|
-
console.log("\u2705 No localhost URLs detected in the document.");
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
function enableAutomaticLocalhostCheck() {
|
|
148
|
-
if (document.readyState === "loading") {
|
|
149
|
-
document.addEventListener("DOMContentLoaded", () => checkForLocalhostUrls2());
|
|
150
|
-
} else {
|
|
151
|
-
checkForLocalhostUrls2();
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
// node_modules/.pnpm/@fynd-design-engineering+web-utils@1.0.1/node_modules/@fynd-design-engineering/web-utils/dist/index.js
|
|
158
|
-
var require_dist = __commonJS({
|
|
159
|
-
"node_modules/.pnpm/@fynd-design-engineering+web-utils@1.0.1/node_modules/@fynd-design-engineering/web-utils/dist/index.js"(exports) {
|
|
160
|
-
"use strict";
|
|
161
|
-
init_live_reload();
|
|
162
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
163
|
-
if (k2 === void 0) k2 = k;
|
|
164
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
165
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
166
|
-
desc = { enumerable: true, get: function() {
|
|
167
|
-
return m[k];
|
|
168
|
-
} };
|
|
169
|
-
}
|
|
170
|
-
Object.defineProperty(o, k2, desc);
|
|
171
|
-
} : function(o, m, k, k2) {
|
|
172
|
-
if (k2 === void 0) k2 = k;
|
|
173
|
-
o[k2] = m[k];
|
|
174
|
-
});
|
|
175
|
-
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
|
176
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
177
|
-
} : function(o, v) {
|
|
178
|
-
o["default"] = v;
|
|
179
|
-
});
|
|
180
|
-
var __importStar = exports && exports.__importStar || /* @__PURE__ */ function() {
|
|
181
|
-
var ownKeys = function(o) {
|
|
182
|
-
ownKeys = Object.getOwnPropertyNames || function(o2) {
|
|
183
|
-
var ar = [];
|
|
184
|
-
for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k;
|
|
185
|
-
return ar;
|
|
186
|
-
};
|
|
187
|
-
return ownKeys(o);
|
|
188
|
-
};
|
|
189
|
-
return function(mod) {
|
|
190
|
-
if (mod && mod.__esModule) return mod;
|
|
191
|
-
var result = {};
|
|
192
|
-
if (mod != null) {
|
|
193
|
-
for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
194
|
-
}
|
|
195
|
-
__setModuleDefault(result, mod);
|
|
196
|
-
return result;
|
|
197
|
-
};
|
|
198
|
-
}();
|
|
199
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
200
|
-
exports.navigation = exports.validations = exports.enableAutomaticLocalhostCheck = exports.checkForLocalhostUrls = exports.getPathSegments = void 0;
|
|
201
|
-
var get_path_segments_1 = require_get_path_segments();
|
|
202
|
-
Object.defineProperty(exports, "getPathSegments", { enumerable: true, get: function() {
|
|
203
|
-
return get_path_segments_1.getPathSegments;
|
|
204
|
-
} });
|
|
205
|
-
var localhost_1 = require_localhost();
|
|
206
|
-
Object.defineProperty(exports, "checkForLocalhostUrls", { enumerable: true, get: function() {
|
|
207
|
-
return localhost_1.checkForLocalhostUrls;
|
|
208
|
-
} });
|
|
209
|
-
Object.defineProperty(exports, "enableAutomaticLocalhostCheck", { enumerable: true, get: function() {
|
|
210
|
-
return localhost_1.enableAutomaticLocalhostCheck;
|
|
211
|
-
} });
|
|
212
|
-
exports.validations = __importStar(require_localhost());
|
|
213
|
-
exports.navigation = __importStar(require_get_path_segments());
|
|
214
|
-
}
|
|
215
|
-
});
|
|
216
|
-
|
|
217
|
-
// src/validations/localhost.ts
|
|
218
|
-
init_live_reload();
|
|
219
|
-
var import_web_utils = __toESM(require_dist(), 1);
|
|
220
|
-
(0, import_web_utils.checkForLocalhostUrls)();
|
|
221
|
-
})();
|
|
222
|
-
//# sourceMappingURL=localhost.js.map
|
|
1
|
+
"use strict";(()=>{var S=Object.create;var v=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var A=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var g=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var j=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of E(e))!R.call(t,o)&&o!==n&&v(t,o,{get:()=>e[o],enumerable:!(r=C(e,o))||r.enumerable});return t};var k=(t,e,n)=>(n=t!=null?S(A(t)):{},j(e||!t||!t.__esModule?v(n,"default",{value:t,enumerable:!0}):n,t));var m=g(p=>{"use strict";Object.defineProperty(p,"__esModule",{value:!0});p.getPathSegments=F;function F(){return window.location.pathname.replace(/^\//,"").split("/").filter(e=>e!=="")}});var L=g(f=>{"use strict";Object.defineProperty(f,"__esModule",{value:!0});f.checkForLocalhostUrls=b;f.enableAutomaticLocalhostCheck=T;function b(t={}){let{checkLinks:e=!0,checkImages:n=!0,checkScripts:r=!0,checkTextContent:o=!0}=t,d=[/localhost/gi,/127\.0\.0\.1/g,/0\.0\.0\.0/g,/\b(?:https?:\/\/)?(?:www\.)?localhost(?::\d+)?(?:\/[^\s]*)?/gi,/\b(?:https?:\/\/)?127\.0\.0\.1(?::\d+)?(?:\/[^\s]*)?/g,/\b(?:https?:\/\/)?0\.0\.0\.0(?::\d+)?(?:\/[^\s]*)?/g],i=[],u=new Set;if(e&&document.querySelectorAll("a[href], link[href]").forEach(a=>{let s=a.getAttribute("href");s&&d.some(l=>l.test(s))&&(u.add(s),i.push(`Found localhost URL in ${a.tagName.toLowerCase()} href: ${s}`))}),n&&document.querySelectorAll("img[src]").forEach(a=>{let s=a.getAttribute("src");s&&d.some(l=>l.test(s))&&(u.add(s),i.push(`Found localhost URL in img src: ${s}`))}),r&&document.querySelectorAll("script[src]").forEach(a=>{let s=a.getAttribute("src");s&&d.some(l=>l.test(s))&&(u.add(s),i.push(`Found localhost URL in script src: ${s}`))}),o){let h=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT,null),a;for(;a=h.nextNode();){let s=a.textContent||"";d.forEach(l=>{let _=s.match(l);_&&_.forEach(w=>{u.add(w),i.push(`Found localhost URL in text content: ${w}`)})})}}if(i.length>0)throw console.group("\u{1F6A8} LOCALHOST URLs DETECTED - PRODUCTION WARNING"),console.warn("\u26A0\uFE0F CRITICAL: Localhost URLs found in production environment!"),console.warn(`\u{1F4CA} Total issues found: ${i.length}`),console.warn(`\u{1F517} Unique URLs: ${u.size}`),console.log(""),i.forEach((h,a)=>{console.warn(`${a+1}. ${h}`)}),console.log(""),console.warn("\u{1F527} Please replace all localhost URLs with production URLs before deployment."),console.warn("\u{1F4DA} This can cause broken links, missing resources, and poor user experience."),console.groupEnd(),new Error(`Production build contains ${u.size} localhost URLs. Please fix before deployment.`);console.log("\u2705 No localhost URLs detected in the document.")}function T(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>b()):b()}});var y=g(c=>{"use strict";var N=c&&c.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),$=c&&c.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),O=c&&c.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),o=0;o<r.length;o++)r[o]!=="default"&&N(n,e,r[o]);return $(n,e),n}}();Object.defineProperty(c,"__esModule",{value:!0});c.navigation=c.validations=c.enableAutomaticLocalhostCheck=c.checkForLocalhostUrls=c.getPathSegments=void 0;var q=m();Object.defineProperty(c,"getPathSegments",{enumerable:!0,get:function(){return q.getPathSegments}});var P=L();Object.defineProperty(c,"checkForLocalhostUrls",{enumerable:!0,get:function(){return P.checkForLocalhostUrls}});Object.defineProperty(c,"enableAutomaticLocalhostCheck",{enumerable:!0,get:function(){return P.enableAutomaticLocalhostCheck}});c.validations=O(L());c.navigation=O(m())});var U=k(y(),1);(0,U.checkForLocalhostUrls)();})();
|
package/package.json
CHANGED