@brainfish-ai/components 0.9.0 → 0.9.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/components/ui/switch.d.ts +2 -2
- package/dist/esm/chunks/{ChatSearch.DCIOe8iM.js → ChatSearch.C05QyX0s.js} +2 -2
- package/dist/esm/chunks/{ChatSearch.DCIOe8iM.js.map → ChatSearch.C05QyX0s.js.map} +1 -1
- package/dist/esm/chunks/{FormattedMessage.aTdTW_T0.js → FormattedMessage.DkFftNx6.js} +13 -27
- package/dist/esm/chunks/{FormattedMessage.aTdTW_T0.js.map → FormattedMessage.DkFftNx6.js.map} +1 -1
- package/dist/esm/chunks/{filters.C1glI--f.js → filters.Dx9TXuJ4.js} +3 -4
- package/dist/esm/chunks/{filters.C1glI--f.js.map → filters.Dx9TXuJ4.js.map} +1 -1
- package/dist/esm/components/chat-search.js +1 -1
- package/dist/esm/components/filter.js +1 -1
- package/dist/esm/components/markdown.js +1 -1
- package/dist/esm/components/ui/switch.js +2 -2
- package/dist/esm/components/ui/switch.js.map +1 -1
- package/dist/esm/index.css +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/stats.html +1 -1
- package/package.json +1 -1
|
@@ -39120,36 +39120,22 @@ Vimeo.isMatch = (href) => {
|
|
|
39120
39120
|
return regex.test(href);
|
|
39121
39121
|
};
|
|
39122
39122
|
|
|
39123
|
+
const WISTIA_REGEXES = [
|
|
39124
|
+
/^(https?:\/\/)?[a-zA-Z0-9-_~]+\.wistia\.com\/medias\/([a-zA-Z0-9-_~]+)\/?(\?.*)?$/i,
|
|
39125
|
+
/^(https?:\/\/)?[a-zA-Z0-9-_~]+\.wistia\.com\/embed\/iframe\/([a-zA-Z0-9-_~]+)\/?(\?.*)?$/i,
|
|
39126
|
+
/^(https?:\/\/)?[a-zA-Z0-9-_~]+\.wistia\.net\/embed\/iframe\/([a-zA-Z0-9-_~]+)\/?(\?.*)?$/i
|
|
39127
|
+
];
|
|
39123
39128
|
function Wistia(props) {
|
|
39124
|
-
const
|
|
39125
|
-
const urlRegexes = [
|
|
39126
|
-
/^https?:\/\/([a-zA-Z0-9-_~]+)\.wistia\.com\/medias\/([a-zA-Z0-9-_~]+)\/?$/,
|
|
39127
|
-
/^https?:\/\/fast\.wistia\.com\/embed\/iframe\/([a-zA-Z0-9-_~]+)\/?$/,
|
|
39128
|
-
/^fast\.wistia\.com\/embed\/iframe\/([a-zA-Z0-9-_~]+)\/?$/,
|
|
39129
|
-
/^([a-zA-Z0-9-_~]+)\.wistia\.com\/medias\/([a-zA-Z0-9-_~]+)\/?$/
|
|
39130
|
-
];
|
|
39131
|
-
for (const regex of urlRegexes) {
|
|
39132
|
-
const match = href.match(regex);
|
|
39133
|
-
if (match) return match;
|
|
39134
|
-
}
|
|
39135
|
-
return null;
|
|
39136
|
-
};
|
|
39137
|
-
const matches = extractMatches(props.attrs.href);
|
|
39129
|
+
const matches = WISTIA_REGEXES.find((regex) => regex.test(props.attrs.href))?.exec(props.attrs.href);
|
|
39138
39130
|
if (!matches) return null;
|
|
39139
|
-
const
|
|
39140
|
-
|
|
39141
|
-
const
|
|
39131
|
+
const videoId = matches[2];
|
|
39132
|
+
if (!videoId) return null;
|
|
39133
|
+
const url = new URL(props.attrs.href.startsWith("http") ? props.attrs.href : `https://${props.attrs.href}`);
|
|
39134
|
+
const isCustomDomain = !url.hostname.startsWith("fast.wistia.");
|
|
39135
|
+
const embedUrl = isCustomDomain ? `https://${url.hostname}/embed/iframe/${videoId}?seo=true&videoFoam=false` : `https://${url.hostname}/embed/iframe/${videoId}`;
|
|
39142
39136
|
return /* @__PURE__ */ React.createElement(Frame, { ...props, src: embedUrl, border: true, title: `Wistia Embed (${videoId})` });
|
|
39143
39137
|
}
|
|
39144
|
-
Wistia.isMatch = (href) =>
|
|
39145
|
-
const urlRegexes = [
|
|
39146
|
-
/^https?:\/\/([a-zA-Z0-9-_~]+)\.wistia\.com\/medias\/([a-zA-Z0-9-_~]+)(\/)?(\?.*)?$/i,
|
|
39147
|
-
/^https?:\/\/fast\.wistia\.com\/embed\/iframe\/([a-zA-Z0-9-_~]+)(\/)?(\?.*)?$/i,
|
|
39148
|
-
/^fast\.wistia\.com\/embed\/iframe\/([a-zA-Z0-9-_~]+)(\/)?(\?.*)?$/i,
|
|
39149
|
-
/^([a-zA-Z0-9-_~]+)\.wistia\.com\/medias\/([a-zA-Z0-9-_~]+)(\/)?(\?.*)?$/i
|
|
39150
|
-
];
|
|
39151
|
-
return urlRegexes.some((regex) => regex.test(href));
|
|
39152
|
-
};
|
|
39138
|
+
Wistia.isMatch = (href) => WISTIA_REGEXES.some((regex) => regex.test(href));
|
|
39153
39139
|
|
|
39154
39140
|
const YOUTUBE_URL_REGEX = /^(?:https?:\/\/)?(?:www\.)?(?:youtube(?:-nocookie)?\.com\/(?:watch\?v=|embed\/|v\/|shorts\/)|youtu\.be\/)([a-zA-Z0-9_-]{11})(?:\/|[?&].*)?$/i;
|
|
39155
39141
|
const extractTimestamp = (href) => {
|
|
@@ -39490,4 +39476,4 @@ const FormattedMessage = memo(({ message, isStreaming, redirectRules = [] }) =>
|
|
|
39490
39476
|
FormattedMessage.displayName = "FormattedMessage";
|
|
39491
39477
|
|
|
39492
39478
|
export { CodeBlock as C, FormattedMessage as F, MemoizedReactMarkdown as M, ZoomableImage as Z, MermaidDiagram as a, getDefaultExportFromCjs as g };
|
|
39493
|
-
//# sourceMappingURL=FormattedMessage.
|
|
39479
|
+
//# sourceMappingURL=FormattedMessage.DkFftNx6.js.map
|