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