@flamingo-stack/openframe-frontend-core 0.0.182 → 0.0.183-snapshot.20260514223203
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/{chunk-IWMK4MH4.cjs → chunk-3OVOM5WT.cjs} +281 -246
- package/dist/chunk-3OVOM5WT.cjs.map +1 -0
- package/dist/{chunk-CLZ3QQMJ.js → chunk-G7HSS5WZ.js} +105 -70
- package/dist/chunk-G7HSS5WZ.js.map +1 -0
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/features/video-source-selector.d.ts +3 -3
- package/dist/components/features/video-source-selector.d.ts.map +1 -1
- package/dist/components/features/video.d.ts.map +1 -1
- package/dist/components/index.cjs +2 -2
- package/dist/components/index.js +1 -1
- package/dist/components/media-carousel.d.ts.map +1 -1
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/ui/index.cjs +2 -2
- package/dist/components/ui/index.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/types/case-study.d.ts +2 -2
- package/dist/types/case-study.d.ts.map +1 -1
- package/dist/types/supabase.d.ts +6 -6
- package/dist/types/supabase.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/features/video-source-selector.tsx +11 -11
- package/src/components/features/video.tsx +134 -76
- package/src/components/media-carousel.tsx +2 -3
- package/src/styles/ods-colors.css +57 -0
- package/src/types/case-study.ts +2 -2
- package/src/types/supabase.ts +6 -6
- package/dist/chunk-CLZ3QQMJ.js.map +0 -1
- package/dist/chunk-IWMK4MH4.cjs.map +0 -1
|
@@ -107,6 +107,7 @@ import {
|
|
|
107
107
|
OpenaiLogoGreyIcon,
|
|
108
108
|
PenEditIcon,
|
|
109
109
|
PencilIcon,
|
|
110
|
+
PlayIcon,
|
|
110
111
|
PlusIcon,
|
|
111
112
|
PowershellLogoIcon,
|
|
112
113
|
PythonLogoIcon,
|
|
@@ -13139,7 +13140,7 @@ init_cn();
|
|
|
13139
13140
|
import { useState as useState30, useRef as useRef19, useEffect as useEffect23, memo as memo3, useCallback as useCallback16 } from "react";
|
|
13140
13141
|
|
|
13141
13142
|
// src/components/features/video.tsx
|
|
13142
|
-
import { useEffect as useEffect22, useRef as useRef18, useState as useState29 } from "react";
|
|
13143
|
+
import { useEffect as useEffect22, useMemo as useMemo12, useRef as useRef18, useState as useState29 } from "react";
|
|
13143
13144
|
import MuxPlayer from "@mux/mux-player-react";
|
|
13144
13145
|
import { jsx as jsx97, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
13145
13146
|
var YT_HOSTS = /* @__PURE__ */ new Set([
|
|
@@ -13245,7 +13246,7 @@ function FilePlayer({
|
|
|
13245
13246
|
playsInline: true,
|
|
13246
13247
|
muted,
|
|
13247
13248
|
preferCmcd: "header",
|
|
13248
|
-
accentColor: "var(--ods-accent)",
|
|
13249
|
+
accentColor: "var(--ods-accent, var(--color-accent-primary))",
|
|
13249
13250
|
className,
|
|
13250
13251
|
style: { width: "100%", height: "100%" },
|
|
13251
13252
|
children: captionsUrl ? /* @__PURE__ */ jsx97(
|
|
@@ -13272,6 +13273,10 @@ function YouTubeFacade({
|
|
|
13272
13273
|
if (!videoId) return null;
|
|
13273
13274
|
return /* @__PURE__ */ jsx97(YouTubeFacadeInner, { videoId, title, priority, className, minimalControls });
|
|
13274
13275
|
}
|
|
13276
|
+
var YT_NOCOOKIE_ORIGIN = "https://www.youtube-nocookie.com";
|
|
13277
|
+
var YT_STATE_ENDED = 0;
|
|
13278
|
+
var YT_STATE_PLAYING = 1;
|
|
13279
|
+
var YT_PLAYING_BLUR_DELAY_MS = 1e3;
|
|
13275
13280
|
function YouTubeFacadeInner({
|
|
13276
13281
|
videoId,
|
|
13277
13282
|
title,
|
|
@@ -13280,49 +13285,79 @@ function YouTubeFacadeInner({
|
|
|
13280
13285
|
minimalControls
|
|
13281
13286
|
}) {
|
|
13282
13287
|
const [activated, setActivated] = useState29(false);
|
|
13283
|
-
const
|
|
13284
|
-
const
|
|
13285
|
-
|
|
13286
|
-
|
|
13287
|
-
|
|
13288
|
-
|
|
13289
|
-
|
|
13290
|
-
|
|
13291
|
-
|
|
13292
|
-
|
|
13293
|
-
|
|
13294
|
-
|
|
13295
|
-
|
|
13296
|
-
|
|
13297
|
-
|
|
13298
|
-
const embedUrl = `https://www.youtube-nocookie.com/embed/${videoId}?${embedParams.toString()}`;
|
|
13299
|
-
const posterJpg = `https://i.ytimg.com/vi/${videoId}/mqdefault.jpg`;
|
|
13300
|
-
const posterWebp = `https://i.ytimg.com/vi_webp/${videoId}/mqdefault.webp`;
|
|
13301
|
-
useEffect22(() => {
|
|
13302
|
-
if (!activated) return;
|
|
13303
|
-
function handleOutsideClick(event) {
|
|
13304
|
-
const target = event.target;
|
|
13305
|
-
if (!target) return;
|
|
13306
|
-
if (wrapperRef.current?.contains(target)) return;
|
|
13307
|
-
setActivated(false);
|
|
13288
|
+
const iframeRef = useRef18(null);
|
|
13289
|
+
const { embedUrl, posterJpg, posterWebp } = useMemo12(() => {
|
|
13290
|
+
const params = new URLSearchParams({
|
|
13291
|
+
autoplay: "1",
|
|
13292
|
+
rel: "0",
|
|
13293
|
+
modestbranding: "1",
|
|
13294
|
+
playsinline: "1",
|
|
13295
|
+
enablejsapi: "1"
|
|
13296
|
+
});
|
|
13297
|
+
if (minimalControls) {
|
|
13298
|
+
params.set("controls", "0");
|
|
13299
|
+
params.set("fs", "0");
|
|
13300
|
+
params.set("iv_load_policy", "3");
|
|
13301
|
+
params.set("cc_load_policy", "0");
|
|
13302
|
+
params.set("disablekb", "1");
|
|
13308
13303
|
}
|
|
13309
|
-
|
|
13310
|
-
|
|
13311
|
-
|
|
13304
|
+
return {
|
|
13305
|
+
embedUrl: `${YT_NOCOOKIE_ORIGIN}/embed/${videoId}?${params.toString()}`,
|
|
13306
|
+
posterJpg: `https://i.ytimg.com/vi/${videoId}/mqdefault.jpg`,
|
|
13307
|
+
posterWebp: `https://i.ytimg.com/vi_webp/${videoId}/mqdefault.webp`
|
|
13308
|
+
};
|
|
13309
|
+
}, [videoId, minimalControls]);
|
|
13312
13310
|
useEffect22(() => {
|
|
13313
13311
|
if (!activated) return;
|
|
13314
|
-
|
|
13315
|
-
|
|
13312
|
+
const iframe = iframeRef.current;
|
|
13313
|
+
if (!iframe) return;
|
|
13314
|
+
function subscribe() {
|
|
13315
|
+
iframe?.contentWindow?.postMessage(
|
|
13316
|
+
'{"event":"listening"}',
|
|
13317
|
+
YT_NOCOOKIE_ORIGIN
|
|
13318
|
+
);
|
|
13316
13319
|
}
|
|
13317
|
-
|
|
13318
|
-
|
|
13320
|
+
iframe.addEventListener("load", subscribe);
|
|
13321
|
+
subscribe();
|
|
13322
|
+
let blurTimer = null;
|
|
13323
|
+
function handleMessage(event) {
|
|
13324
|
+
if (event.origin !== YT_NOCOOKIE_ORIGIN) return;
|
|
13325
|
+
if (typeof event.data !== "string") return;
|
|
13326
|
+
let payload = null;
|
|
13327
|
+
try {
|
|
13328
|
+
payload = JSON.parse(event.data);
|
|
13329
|
+
} catch {
|
|
13330
|
+
return;
|
|
13331
|
+
}
|
|
13332
|
+
if (!payload || payload.event !== "infoDelivery") return;
|
|
13333
|
+
const state = payload.info?.playerState;
|
|
13334
|
+
if (typeof state !== "number") return;
|
|
13335
|
+
if (state === YT_STATE_PLAYING) {
|
|
13336
|
+
if (blurTimer !== null) return;
|
|
13337
|
+
blurTimer = setTimeout(() => {
|
|
13338
|
+
blurTimer = null;
|
|
13339
|
+
iframeRef.current?.blur();
|
|
13340
|
+
}, YT_PLAYING_BLUR_DELAY_MS);
|
|
13341
|
+
return;
|
|
13342
|
+
}
|
|
13343
|
+
if (state === YT_STATE_ENDED) {
|
|
13344
|
+
setActivated(false);
|
|
13345
|
+
}
|
|
13346
|
+
}
|
|
13347
|
+
window.addEventListener("message", handleMessage);
|
|
13348
|
+
return () => {
|
|
13349
|
+
iframe.removeEventListener("load", subscribe);
|
|
13350
|
+
window.removeEventListener("message", handleMessage);
|
|
13351
|
+
if (blurTimer !== null) clearTimeout(blurTimer);
|
|
13352
|
+
};
|
|
13319
13353
|
}, [activated]);
|
|
13320
13354
|
const wrapperClass = `relative w-full ${className ?? ""}`;
|
|
13321
13355
|
const wrapperStyle = { paddingBottom: "56.25%" };
|
|
13322
13356
|
if (activated) {
|
|
13323
|
-
return /* @__PURE__ */ jsx97("div", {
|
|
13357
|
+
return /* @__PURE__ */ jsx97("div", { className: wrapperClass, style: wrapperStyle, children: /* @__PURE__ */ jsx97(
|
|
13324
13358
|
"iframe",
|
|
13325
13359
|
{
|
|
13360
|
+
ref: iframeRef,
|
|
13326
13361
|
src: embedUrl,
|
|
13327
13362
|
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",
|
|
13328
13363
|
allowFullScreen: true,
|
|
@@ -13331,7 +13366,7 @@ function YouTubeFacadeInner({
|
|
|
13331
13366
|
}
|
|
13332
13367
|
) });
|
|
13333
13368
|
}
|
|
13334
|
-
return /* @__PURE__ */ jsx97("div", {
|
|
13369
|
+
return /* @__PURE__ */ jsx97("div", { className: wrapperClass, style: wrapperStyle, children: /* @__PURE__ */ jsxs78(
|
|
13335
13370
|
"button",
|
|
13336
13371
|
{
|
|
13337
13372
|
type: "button",
|
|
@@ -13353,7 +13388,7 @@ function YouTubeFacadeInner({
|
|
|
13353
13388
|
}
|
|
13354
13389
|
)
|
|
13355
13390
|
] }),
|
|
13356
|
-
/* @__PURE__ */ jsx97("div", { className: "absolute inset-0 flex items-center justify-center bg-ods-bg-inverse bg-opacity-20 transition-opacity duration-200 group-hover:bg-opacity-30", children: /* @__PURE__ */ jsx97("span", { className: "flex items-center justify-center w-16 h-16 rounded-full bg-ods-accent text-ods-text-on-accent shadow-lg transition-transform duration-200 group-hover:scale-110", children: /* @__PURE__ */ jsx97(
|
|
13391
|
+
/* @__PURE__ */ jsx97("div", { className: "absolute inset-0 flex items-center justify-center bg-ods-bg-inverse bg-opacity-20 transition-opacity duration-200 group-hover:bg-opacity-30", children: /* @__PURE__ */ jsx97("span", { className: "flex items-center justify-center w-16 h-16 rounded-full bg-ods-accent text-ods-text-on-accent shadow-lg transition-transform duration-200 group-hover:scale-110", children: /* @__PURE__ */ jsx97(PlayIcon, { size: 24, color: "currentColor", className: "ml-1" }) }) })
|
|
13357
13392
|
]
|
|
13358
13393
|
}
|
|
13359
13394
|
) });
|
|
@@ -13500,7 +13535,7 @@ var MediaCarousel = memo3(function MediaCarousel2({
|
|
|
13500
13535
|
loading: "lazy"
|
|
13501
13536
|
}
|
|
13502
13537
|
),
|
|
13503
|
-
(item.type === "video" || item.type === "youtube") && /* @__PURE__ */ jsx98("div", { className: "absolute inset-0 flex items-center justify-center bg-black/30", children: /* @__PURE__ */ jsx98("div", { className: "bg-black/70 rounded-full p-1", children: /* @__PURE__ */ jsx98(
|
|
13538
|
+
(item.type === "video" || item.type === "youtube") && /* @__PURE__ */ jsx98("div", { className: "absolute inset-0 flex items-center justify-center bg-black/30", children: /* @__PURE__ */ jsx98("div", { className: "bg-black/70 rounded-full p-1", children: /* @__PURE__ */ jsx98(PlayIcon, { size: 12, color: "white" }) }) }),
|
|
13504
13539
|
isActive && /* @__PURE__ */ jsx98("div", { className: "absolute bottom-1 right-1 w-2 h-2 bg-[#FFC008] rounded-full" })
|
|
13505
13540
|
]
|
|
13506
13541
|
},
|
|
@@ -19728,7 +19763,7 @@ function TabContent({
|
|
|
19728
19763
|
|
|
19729
19764
|
// src/components/ui/tab-navigation.tsx
|
|
19730
19765
|
init_cn();
|
|
19731
|
-
import { useState as useState40, useEffect as useEffect31, useMemo as
|
|
19766
|
+
import { useState as useState40, useEffect as useEffect31, useMemo as useMemo13, useRef as useRef23, useCallback as useCallback20 } from "react";
|
|
19732
19767
|
import { useSearchParams as useSearchParams3, useRouter as useRouter5, usePathname as usePathname3 } from "next/navigation";
|
|
19733
19768
|
import { Fragment as Fragment22, jsx as jsx168, jsxs as jsxs137 } from "react/jsx-runtime";
|
|
19734
19769
|
function TabNavigation({
|
|
@@ -19749,7 +19784,7 @@ function TabNavigation({
|
|
|
19749
19784
|
const isUrlSyncEnabled = !!urlSync;
|
|
19750
19785
|
const paramName = typeof urlSync === "object" ? urlSync.paramName || "tab" : "tab";
|
|
19751
19786
|
const replaceState = typeof urlSync === "object" ? urlSync.replaceState !== false : true;
|
|
19752
|
-
const validTabIds =
|
|
19787
|
+
const validTabIds = useMemo13(() => new Set(tabs.map((t) => t.id)), [tabs]);
|
|
19753
19788
|
const getInitialTab = () => {
|
|
19754
19789
|
if (isUrlSyncEnabled) {
|
|
19755
19790
|
const fromUrl = searchParams?.get(paramName) || "";
|
|
@@ -20077,7 +20112,7 @@ function SortColumnItem({ column, currentDirection, onSort, onClear }) {
|
|
|
20077
20112
|
|
|
20078
20113
|
// src/components/ui/tag-key-value-filter.tsx
|
|
20079
20114
|
init_cn();
|
|
20080
|
-
import { useMemo as
|
|
20115
|
+
import { useMemo as useMemo14 } from "react";
|
|
20081
20116
|
import { jsx as jsx174, jsxs as jsxs141 } from "react/jsx-runtime";
|
|
20082
20117
|
function TagKeyValueFilter({
|
|
20083
20118
|
keys,
|
|
@@ -20086,7 +20121,7 @@ function TagKeyValueFilter({
|
|
|
20086
20121
|
keysTitle = "Tag Keys",
|
|
20087
20122
|
className
|
|
20088
20123
|
}) {
|
|
20089
|
-
const selectedMap =
|
|
20124
|
+
const selectedMap = useMemo14(() => {
|
|
20090
20125
|
const map = /* @__PURE__ */ new Map();
|
|
20091
20126
|
for (const tag of selectedTags) {
|
|
20092
20127
|
const colonIdx = tag.indexOf(":");
|
|
@@ -20098,7 +20133,7 @@ function TagKeyValueFilter({
|
|
|
20098
20133
|
}
|
|
20099
20134
|
return map;
|
|
20100
20135
|
}, [selectedTags]);
|
|
20101
|
-
const activeKeys =
|
|
20136
|
+
const activeKeys = useMemo14(() => {
|
|
20102
20137
|
return new Set(selectedMap.keys());
|
|
20103
20138
|
}, [selectedMap]);
|
|
20104
20139
|
const handleKeyToggle = (key, checked) => {
|
|
@@ -21870,7 +21905,7 @@ function OrganizationCard({
|
|
|
21870
21905
|
|
|
21871
21906
|
// src/components/ui/service-card.tsx
|
|
21872
21907
|
init_cn();
|
|
21873
|
-
import { useMemo as
|
|
21908
|
+
import { useMemo as useMemo16, useState as useState44 } from "react";
|
|
21874
21909
|
import { ExternalLink as ExternalLink3 } from "lucide-react";
|
|
21875
21910
|
|
|
21876
21911
|
// src/components/logs-list.tsx
|
|
@@ -22176,7 +22211,7 @@ function ServiceCard({ title, subtitle, icon, tag, rows, className }) {
|
|
|
22176
22211
|
function ServiceCardRowItem({ row }) {
|
|
22177
22212
|
const [revealed, setRevealed] = useState44(false);
|
|
22178
22213
|
const { copy, copied } = useCopyToClipboard();
|
|
22179
|
-
const actions =
|
|
22214
|
+
const actions = useMemo16(() => ({ copy: true, open: !!row.href, reveal: !!row.isSecret, ...row.actions }), [row]);
|
|
22180
22215
|
const displayValue = row.isSecret ? /* @__PURE__ */ jsx201(MaskedValue, { value: row.value, isRevealed: revealed }) : /* @__PURE__ */ jsx201("span", { children: row.value });
|
|
22181
22216
|
const handleCopy = () => copy(row.copyValue ?? row.value);
|
|
22182
22217
|
const openInNewTab = () => {
|
|
@@ -23471,7 +23506,7 @@ function TableTimestampCell({
|
|
|
23471
23506
|
// src/components/ui/query-report-table/query-report-table.tsx
|
|
23472
23507
|
init_cn();
|
|
23473
23508
|
init_button2();
|
|
23474
|
-
import { useMemo as
|
|
23509
|
+
import { useMemo as useMemo17 } from "react";
|
|
23475
23510
|
|
|
23476
23511
|
// src/components/ui/query-report-table/query-report-table-header.tsx
|
|
23477
23512
|
init_cn();
|
|
@@ -23709,7 +23744,7 @@ function QueryReportTable({
|
|
|
23709
23744
|
tableClassName
|
|
23710
23745
|
}) {
|
|
23711
23746
|
const isCompact = variant === "compact";
|
|
23712
|
-
const columns =
|
|
23747
|
+
const columns = useMemo17(
|
|
23713
23748
|
() => deriveColumns(data, columnOrder),
|
|
23714
23749
|
[data, columnOrder]
|
|
23715
23750
|
);
|
|
@@ -23845,7 +23880,7 @@ init_cn();
|
|
|
23845
23880
|
|
|
23846
23881
|
// src/components/ui/data-table/data-table-column-filter.tsx
|
|
23847
23882
|
init_cn();
|
|
23848
|
-
import { useCallback as useCallback23, useMemo as
|
|
23883
|
+
import { useCallback as useCallback23, useMemo as useMemo18 } from "react";
|
|
23849
23884
|
|
|
23850
23885
|
// src/components/ui/data-table/utils.ts
|
|
23851
23886
|
function getHideClasses2(hideAt) {
|
|
@@ -23889,7 +23924,7 @@ function DataTableColumnFilter({
|
|
|
23889
23924
|
}) {
|
|
23890
23925
|
const currentValue = column.getFilterValue();
|
|
23891
23926
|
const activeCount = currentValue?.length ?? 0;
|
|
23892
|
-
const sections =
|
|
23927
|
+
const sections = useMemo18(
|
|
23893
23928
|
() => [
|
|
23894
23929
|
{
|
|
23895
23930
|
id: column.id,
|
|
@@ -23901,7 +23936,7 @@ function DataTableColumnFilter({
|
|
|
23901
23936
|
],
|
|
23902
23937
|
[column.id, label, options]
|
|
23903
23938
|
);
|
|
23904
|
-
const currentFilters =
|
|
23939
|
+
const currentFilters = useMemo18(
|
|
23905
23940
|
() => ({ [column.id]: currentValue ?? EMPTY_ARRAY }),
|
|
23906
23941
|
[column.id, currentValue]
|
|
23907
23942
|
);
|
|
@@ -24454,7 +24489,7 @@ var DataTable = Object.assign(DataTableRoot, {
|
|
|
24454
24489
|
});
|
|
24455
24490
|
|
|
24456
24491
|
// src/components/ui/phone-input.tsx
|
|
24457
|
-
import { useCallback as useCallback25, useEffect as useEffect36, useMemo as
|
|
24492
|
+
import { useCallback as useCallback25, useEffect as useEffect36, useMemo as useMemo19, useRef as useRef30, useState as useState47 } from "react";
|
|
24458
24493
|
import { jsx as jsx230, jsxs as jsxs188 } from "react/jsx-runtime";
|
|
24459
24494
|
function PhoneInput({
|
|
24460
24495
|
value,
|
|
@@ -24466,8 +24501,8 @@ function PhoneInput({
|
|
|
24466
24501
|
placeholder = "Phone Number (optional)",
|
|
24467
24502
|
onKeyDown
|
|
24468
24503
|
}) {
|
|
24469
|
-
const { priority, others } =
|
|
24470
|
-
const selectedCountry =
|
|
24504
|
+
const { priority, others } = useMemo19(() => getCountryPhoneData(), []);
|
|
24505
|
+
const selectedCountry = useMemo19(
|
|
24471
24506
|
() => [...priority, ...others].find((c) => c.code === countryCode),
|
|
24472
24507
|
[countryCode, priority, others]
|
|
24473
24508
|
);
|
|
@@ -27223,7 +27258,7 @@ var ErrorBoundary = class extends Component {
|
|
|
27223
27258
|
|
|
27224
27259
|
// src/components/features/figma-prototype-viewer.tsx
|
|
27225
27260
|
init_cn();
|
|
27226
|
-
import { useState as useState59, useRef as useRef36, useEffect as useEffect44, useCallback as useCallback28, useMemo as
|
|
27261
|
+
import { useState as useState59, useRef as useRef36, useEffect as useEffect44, useCallback as useCallback28, useMemo as useMemo23 } from "react";
|
|
27227
27262
|
|
|
27228
27263
|
// src/components/features/section-selector.tsx
|
|
27229
27264
|
init_cn();
|
|
@@ -27613,15 +27648,15 @@ var FigmaPrototypeViewer = ({
|
|
|
27613
27648
|
const activeSection = externalActiveSection || internalActiveSection;
|
|
27614
27649
|
const [isNavigating, setIsNavigating] = useState59(false);
|
|
27615
27650
|
const [containerDimensions, setContainerDimensions] = useState59({ width: 1200, height: 800 });
|
|
27616
|
-
const viewMode =
|
|
27651
|
+
const viewMode = useMemo23(
|
|
27617
27652
|
() => getViewMode(screenWidth, isTouchDevice),
|
|
27618
27653
|
[screenWidth, isTouchDevice]
|
|
27619
27654
|
);
|
|
27620
|
-
const scaling =
|
|
27655
|
+
const scaling = useMemo23(
|
|
27621
27656
|
() => calculateScaling(viewMode, containerDimensions, config),
|
|
27622
27657
|
[viewMode, containerDimensions, config]
|
|
27623
27658
|
);
|
|
27624
|
-
const embedUrl =
|
|
27659
|
+
const embedUrl = useMemo23(() => {
|
|
27625
27660
|
try {
|
|
27626
27661
|
const startingNodeId = resolveStartingPoint(config, viewMode);
|
|
27627
27662
|
return generateEmbedUrl(config, viewMode, startingNodeId, clientId);
|
|
@@ -27630,7 +27665,7 @@ var FigmaPrototypeViewer = ({
|
|
|
27630
27665
|
return "";
|
|
27631
27666
|
}
|
|
27632
27667
|
}, [config, viewMode, clientId]);
|
|
27633
|
-
const unifiedState =
|
|
27668
|
+
const unifiedState = useMemo23(() => ({
|
|
27634
27669
|
viewMode,
|
|
27635
27670
|
iframeState,
|
|
27636
27671
|
screenWidth,
|
|
@@ -30242,7 +30277,7 @@ function groupByAspectRatio(items, getAspectRatio) {
|
|
|
30242
30277
|
}
|
|
30243
30278
|
|
|
30244
30279
|
// src/components/features/video-bites-display.tsx
|
|
30245
|
-
import { useMemo as
|
|
30280
|
+
import { useMemo as useMemo24 } from "react";
|
|
30246
30281
|
import { jsx as jsx272, jsxs as jsxs224 } from "react/jsx-runtime";
|
|
30247
30282
|
var RATIO_TO_CSS_ASPECT = {
|
|
30248
30283
|
portrait: "9 / 16",
|
|
@@ -30259,7 +30294,7 @@ function VideoBitesDisplay({
|
|
|
30259
30294
|
filterPublished = true,
|
|
30260
30295
|
showTitle = true
|
|
30261
30296
|
}) {
|
|
30262
|
-
const grouped =
|
|
30297
|
+
const grouped = useMemo24(() => {
|
|
30263
30298
|
const filtered = filterPublished ? bites.filter((b) => b.published) : bites;
|
|
30264
30299
|
const sorted = [...filtered].sort((a, b) => {
|
|
30265
30300
|
if (!a.created_at && !b.created_at) return 0;
|
|
@@ -30426,8 +30461,8 @@ function VideoSourceSelector({
|
|
|
30426
30461
|
onVideoSourceTypeChange,
|
|
30427
30462
|
youtubeUrl,
|
|
30428
30463
|
onYoutubeUrlChange,
|
|
30429
|
-
|
|
30430
|
-
|
|
30464
|
+
mainVideoUrl,
|
|
30465
|
+
onMainVideoUrlChange,
|
|
30431
30466
|
onUploadVideo,
|
|
30432
30467
|
showAIBadge = true,
|
|
30433
30468
|
isAIGenerated = false,
|
|
@@ -30465,7 +30500,7 @@ function VideoSourceSelector({
|
|
|
30465
30500
|
});
|
|
30466
30501
|
setUploadProgress(100);
|
|
30467
30502
|
setUploadMessage("Upload complete!");
|
|
30468
|
-
|
|
30503
|
+
onMainVideoUrlChange(url);
|
|
30469
30504
|
} catch (err) {
|
|
30470
30505
|
setUploadError(err instanceof Error ? err.message : "Failed to upload video");
|
|
30471
30506
|
} finally {
|
|
@@ -30477,10 +30512,10 @@ function VideoSourceSelector({
|
|
|
30477
30512
|
}
|
|
30478
30513
|
};
|
|
30479
30514
|
input.click();
|
|
30480
|
-
}, [onUploadVideo,
|
|
30515
|
+
}, [onUploadVideo, onMainVideoUrlChange]);
|
|
30481
30516
|
const handleDeleteVideo = useCallback30(() => {
|
|
30482
|
-
|
|
30483
|
-
}, [
|
|
30517
|
+
onMainVideoUrlChange("");
|
|
30518
|
+
}, [onMainVideoUrlChange]);
|
|
30484
30519
|
return /* @__PURE__ */ jsxs226("div", { className: `space-y-4 p-6 bg-ods-card border border-ods-border rounded-lg ${className}`, children: [
|
|
30485
30520
|
showTitle && /* @__PURE__ */ jsxs226("h3", { className: "font-['Azeret_Mono'] text-[18px] font-semibold uppercase text-ods-text-primary flex items-center gap-2", children: [
|
|
30486
30521
|
/* @__PURE__ */ jsx274(Video6, { className: "h-5 w-5" }),
|
|
@@ -30571,10 +30606,10 @@ function VideoSourceSelector({
|
|
|
30571
30606
|
/* @__PURE__ */ jsx274("p", { className: "text-xs text-ods-text-secondary", children: uploadMessage })
|
|
30572
30607
|
] }),
|
|
30573
30608
|
uploadError && /* @__PURE__ */ jsx274("p", { className: "text-sm text-ods-attention-red-error mb-3", children: uploadError }),
|
|
30574
|
-
|
|
30609
|
+
mainVideoUrl ? VideoPreviewComponent ? /* @__PURE__ */ jsx274(
|
|
30575
30610
|
VideoPreviewComponent,
|
|
30576
30611
|
{
|
|
30577
|
-
videoUrl:
|
|
30612
|
+
videoUrl: mainVideoUrl,
|
|
30578
30613
|
onDelete: handleDeleteVideo,
|
|
30579
30614
|
isAIGenerated
|
|
30580
30615
|
}
|
|
@@ -30584,7 +30619,7 @@ function VideoSourceSelector({
|
|
|
30584
30619
|
/* @__PURE__ */ jsx274(
|
|
30585
30620
|
"video",
|
|
30586
30621
|
{
|
|
30587
|
-
src:
|
|
30622
|
+
src: mainVideoUrl,
|
|
30588
30623
|
className: "w-full h-auto max-h-[300px] object-contain bg-black",
|
|
30589
30624
|
controls: true
|
|
30590
30625
|
}
|
|
@@ -33778,4 +33813,4 @@ export {
|
|
|
33778
33813
|
TMCG_SOCIAL_PLATFORMS,
|
|
33779
33814
|
assets
|
|
33780
33815
|
};
|
|
33781
|
-
//# sourceMappingURL=chunk-
|
|
33816
|
+
//# sourceMappingURL=chunk-G7HSS5WZ.js.map
|