@qwanyx/carousel 0.1.8 → 0.1.9
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/index.d.mts +503 -4
- package/dist/index.d.ts +503 -4
- package/dist/index.js +95 -95
- package/dist/index.mjs +95 -95
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2010,15 +2010,15 @@ function LayerItemRow({
|
|
|
2010
2010
|
"div",
|
|
2011
2011
|
{
|
|
2012
2012
|
className: `
|
|
2013
|
-
flex items-center h-8 px-2 cursor-pointer select-none
|
|
2014
|
-
${isSelected ? "bg-
|
|
2013
|
+
flex items-center h-8 px-2 cursor-pointer select-none group
|
|
2014
|
+
${isSelected ? "bg-[#4a6fa5]/40" : "hover:bg-[#3a3a3a]"}
|
|
2015
2015
|
${!layer.visible ? "opacity-50" : ""}
|
|
2016
2016
|
`,
|
|
2017
2017
|
style: { paddingLeft: `${depth * 16 + 8}px` },
|
|
2018
2018
|
onClick: (e) => onSelect(layer.id, e.shiftKey || e.ctrlKey || e.metaKey),
|
|
2019
2019
|
onDoubleClick: handleDoubleClick,
|
|
2020
2020
|
children: [
|
|
2021
|
-
/* @__PURE__ */ jsx4("span", { className: "material-icons text-neutral-
|
|
2021
|
+
/* @__PURE__ */ jsx4("span", { className: "material-icons text-neutral-500 mr-2", style: { fontSize: 16 }, children: getObjectIcon() }),
|
|
2022
2022
|
isEditing ? /* @__PURE__ */ jsx4(
|
|
2023
2023
|
"input",
|
|
2024
2024
|
{
|
|
@@ -2028,10 +2028,10 @@ function LayerItemRow({
|
|
|
2028
2028
|
onChange: (e) => setEditName(e.target.value),
|
|
2029
2029
|
onBlur: handleNameSubmit,
|
|
2030
2030
|
onKeyDown: handleKeyDown,
|
|
2031
|
-
className: "flex-1 px-1 text-sm bg-
|
|
2031
|
+
className: "flex-1 px-1 text-sm bg-[#1a1a1a] text-neutral-200 border border-blue-500 rounded outline-none",
|
|
2032
2032
|
onClick: (e) => e.stopPropagation()
|
|
2033
2033
|
}
|
|
2034
|
-
) : /* @__PURE__ */ jsx4("span", { className: "flex-1 text-sm text-neutral-
|
|
2034
|
+
) : /* @__PURE__ */ jsx4("span", { className: "flex-1 text-sm text-neutral-300 truncate", children: layer.name }),
|
|
2035
2035
|
/* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity", children: [
|
|
2036
2036
|
/* @__PURE__ */ jsx4(
|
|
2037
2037
|
"button",
|
|
@@ -2040,9 +2040,9 @@ function LayerItemRow({
|
|
|
2040
2040
|
e.stopPropagation();
|
|
2041
2041
|
onToggleVisibility(layer.id);
|
|
2042
2042
|
},
|
|
2043
|
-
className: "p-0.5 hover:bg-
|
|
2043
|
+
className: "p-0.5 hover:bg-[#4a4a4a] rounded",
|
|
2044
2044
|
title: layer.visible ? "Hide" : "Show",
|
|
2045
|
-
children: /* @__PURE__ */ jsx4("span", { className: "material-icons text-neutral-
|
|
2045
|
+
children: /* @__PURE__ */ jsx4("span", { className: "material-icons text-neutral-500", style: { fontSize: 14 }, children: layer.visible ? "visibility" : "visibility_off" })
|
|
2046
2046
|
}
|
|
2047
2047
|
),
|
|
2048
2048
|
/* @__PURE__ */ jsx4(
|
|
@@ -2052,9 +2052,9 @@ function LayerItemRow({
|
|
|
2052
2052
|
e.stopPropagation();
|
|
2053
2053
|
onToggleLock(layer.id);
|
|
2054
2054
|
},
|
|
2055
|
-
className: "p-0.5 hover:bg-
|
|
2055
|
+
className: "p-0.5 hover:bg-[#4a4a4a] rounded",
|
|
2056
2056
|
title: layer.locked ? "Unlock" : "Lock",
|
|
2057
|
-
children: /* @__PURE__ */ jsx4("span", { className: "material-icons text-neutral-
|
|
2057
|
+
children: /* @__PURE__ */ jsx4("span", { className: "material-icons text-neutral-500", style: { fontSize: 14 }, children: layer.locked ? "lock" : "lock_open" })
|
|
2058
2058
|
}
|
|
2059
2059
|
),
|
|
2060
2060
|
/* @__PURE__ */ jsx4(
|
|
@@ -2064,9 +2064,9 @@ function LayerItemRow({
|
|
|
2064
2064
|
e.stopPropagation();
|
|
2065
2065
|
onDelete(layer.id);
|
|
2066
2066
|
},
|
|
2067
|
-
className: "p-0.5 hover:bg-red-
|
|
2067
|
+
className: "p-0.5 hover:bg-red-900/50 rounded",
|
|
2068
2068
|
title: "Delete",
|
|
2069
|
-
children: /* @__PURE__ */ jsx4("span", { className: "material-icons text-neutral-
|
|
2069
|
+
children: /* @__PURE__ */ jsx4("span", { className: "material-icons text-neutral-500 hover:text-red-400", style: { fontSize: 14 }, children: "delete" })
|
|
2070
2070
|
}
|
|
2071
2071
|
)
|
|
2072
2072
|
] })
|
|
@@ -2127,7 +2127,7 @@ function LayerFolderRow({
|
|
|
2127
2127
|
{
|
|
2128
2128
|
className: `
|
|
2129
2129
|
flex items-center h-8 px-2 cursor-pointer select-none
|
|
2130
|
-
${isSelected ? "bg-
|
|
2130
|
+
${isSelected ? "bg-[#4a6fa5]/40" : "hover:bg-[#3a3a3a]"}
|
|
2131
2131
|
${!folder.visible ? "opacity-50" : ""}
|
|
2132
2132
|
`,
|
|
2133
2133
|
style: { paddingLeft: `${depth * 16 + 8}px` },
|
|
@@ -2141,11 +2141,11 @@ function LayerFolderRow({
|
|
|
2141
2141
|
e.stopPropagation();
|
|
2142
2142
|
onToggleCollapsed(folder.id);
|
|
2143
2143
|
},
|
|
2144
|
-
className: "p-0.5 hover:bg-
|
|
2144
|
+
className: "p-0.5 hover:bg-[#4a4a4a] rounded mr-1",
|
|
2145
2145
|
children: /* @__PURE__ */ jsx5(
|
|
2146
2146
|
"span",
|
|
2147
2147
|
{
|
|
2148
|
-
className: "material-icons text-neutral-
|
|
2148
|
+
className: "material-icons text-neutral-500 transition-transform",
|
|
2149
2149
|
style: {
|
|
2150
2150
|
fontSize: 14,
|
|
2151
2151
|
transform: folder.collapsed ? "rotate(-90deg)" : "rotate(0deg)"
|
|
@@ -2165,11 +2165,11 @@ function LayerFolderRow({
|
|
|
2165
2165
|
onChange: (e) => setEditName(e.target.value),
|
|
2166
2166
|
onBlur: handleNameSubmit,
|
|
2167
2167
|
onKeyDown: handleKeyDown,
|
|
2168
|
-
className: "flex-1 px-1 text-sm bg-
|
|
2168
|
+
className: "flex-1 px-1 text-sm bg-[#1a1a1a] text-neutral-200 border border-blue-500 rounded outline-none",
|
|
2169
2169
|
onClick: (e) => e.stopPropagation()
|
|
2170
2170
|
}
|
|
2171
|
-
) : /* @__PURE__ */ jsx5("span", { className: "flex-1 text-sm font-medium text-neutral-
|
|
2172
|
-
/* @__PURE__ */ jsxs5("span", { className: "text-xs text-neutral-
|
|
2171
|
+
) : /* @__PURE__ */ jsx5("span", { className: "flex-1 text-sm font-medium text-neutral-200 truncate", children: folder.name }),
|
|
2172
|
+
/* @__PURE__ */ jsxs5("span", { className: "text-xs text-neutral-500 mr-2", children: [
|
|
2173
2173
|
"(",
|
|
2174
2174
|
folder.children.length,
|
|
2175
2175
|
")"
|
|
@@ -2182,9 +2182,9 @@ function LayerFolderRow({
|
|
|
2182
2182
|
e.stopPropagation();
|
|
2183
2183
|
onToggleVisibility(folder.id);
|
|
2184
2184
|
},
|
|
2185
|
-
className: "p-0.5 hover:bg-
|
|
2185
|
+
className: "p-0.5 hover:bg-[#4a4a4a] rounded",
|
|
2186
2186
|
title: folder.visible ? "Hide" : "Show",
|
|
2187
|
-
children: /* @__PURE__ */ jsx5("span", { className: "material-icons text-neutral-
|
|
2187
|
+
children: /* @__PURE__ */ jsx5("span", { className: "material-icons text-neutral-500", style: { fontSize: 14 }, children: folder.visible ? "visibility" : "visibility_off" })
|
|
2188
2188
|
}
|
|
2189
2189
|
),
|
|
2190
2190
|
/* @__PURE__ */ jsx5(
|
|
@@ -2194,9 +2194,9 @@ function LayerFolderRow({
|
|
|
2194
2194
|
e.stopPropagation();
|
|
2195
2195
|
onToggleLock(folder.id);
|
|
2196
2196
|
},
|
|
2197
|
-
className: "p-0.5 hover:bg-
|
|
2197
|
+
className: "p-0.5 hover:bg-[#4a4a4a] rounded",
|
|
2198
2198
|
title: folder.locked ? "Unlock" : "Lock",
|
|
2199
|
-
children: /* @__PURE__ */ jsx5("span", { className: "material-icons text-neutral-
|
|
2199
|
+
children: /* @__PURE__ */ jsx5("span", { className: "material-icons text-neutral-500", style: { fontSize: 14 }, children: folder.locked ? "lock" : "lock_open" })
|
|
2200
2200
|
}
|
|
2201
2201
|
),
|
|
2202
2202
|
/* @__PURE__ */ jsx5(
|
|
@@ -2206,9 +2206,9 @@ function LayerFolderRow({
|
|
|
2206
2206
|
e.stopPropagation();
|
|
2207
2207
|
onDelete(folder.id);
|
|
2208
2208
|
},
|
|
2209
|
-
className: "p-0.5 hover:bg-red-
|
|
2209
|
+
className: "p-0.5 hover:bg-red-900/50 rounded",
|
|
2210
2210
|
title: "Delete folder",
|
|
2211
|
-
children: /* @__PURE__ */ jsx5("span", { className: "material-icons text-neutral-
|
|
2211
|
+
children: /* @__PURE__ */ jsx5("span", { className: "material-icons text-neutral-500 hover:text-red-400", style: { fontSize: 14 }, children: "delete" })
|
|
2212
2212
|
}
|
|
2213
2213
|
)
|
|
2214
2214
|
] })
|
|
@@ -2268,17 +2268,17 @@ function LayerPanel({
|
|
|
2268
2268
|
layer.id
|
|
2269
2269
|
);
|
|
2270
2270
|
};
|
|
2271
|
-
return /* @__PURE__ */ jsxs6("div", { className: "flex flex-col h-full bg-
|
|
2272
|
-
/* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-between px-3 py-2 border-b border-
|
|
2273
|
-
/* @__PURE__ */ jsx6("h3", { className: "text-sm font-semibold text-neutral-
|
|
2271
|
+
return /* @__PURE__ */ jsxs6("div", { className: "flex flex-col h-full bg-[#232323] border-r border-[#3a3a3a]", children: [
|
|
2272
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-between px-3 py-2 border-b border-[#3a3a3a]", children: [
|
|
2273
|
+
/* @__PURE__ */ jsx6("h3", { className: "text-sm font-semibold text-neutral-300", children: "Layers" }),
|
|
2274
2274
|
/* @__PURE__ */ jsxs6("div", { className: "relative", children: [
|
|
2275
2275
|
/* @__PURE__ */ jsx6(
|
|
2276
2276
|
"button",
|
|
2277
2277
|
{
|
|
2278
2278
|
onClick: () => setShowAddMenu(!showAddMenu),
|
|
2279
|
-
className: "p-1 hover:bg-
|
|
2279
|
+
className: "p-1 hover:bg-[#3a3a3a] rounded",
|
|
2280
2280
|
title: "Add layer",
|
|
2281
|
-
children: /* @__PURE__ */ jsx6("span", { className: "material-icons text-neutral-
|
|
2281
|
+
children: /* @__PURE__ */ jsx6("span", { className: "material-icons text-neutral-400", style: { fontSize: 18 }, children: "add" })
|
|
2282
2282
|
}
|
|
2283
2283
|
),
|
|
2284
2284
|
showAddMenu && /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
@@ -2289,7 +2289,7 @@ function LayerPanel({
|
|
|
2289
2289
|
onClick: () => setShowAddMenu(false)
|
|
2290
2290
|
}
|
|
2291
2291
|
),
|
|
2292
|
-
/* @__PURE__ */ jsxs6("div", { className: "absolute right-0 top-full mt-1 bg-
|
|
2292
|
+
/* @__PURE__ */ jsxs6("div", { className: "absolute right-0 top-full mt-1 bg-[#2a2a2a] rounded-lg shadow-lg border border-[#3a3a3a] py-1 z-20 min-w-[140px]", children: [
|
|
2293
2293
|
/* @__PURE__ */ jsxs6(
|
|
2294
2294
|
"button",
|
|
2295
2295
|
{
|
|
@@ -2297,14 +2297,14 @@ function LayerPanel({
|
|
|
2297
2297
|
onAddFolder();
|
|
2298
2298
|
setShowAddMenu(false);
|
|
2299
2299
|
},
|
|
2300
|
-
className: "w-full px-3 py-1.5 text-left text-sm hover:bg-
|
|
2300
|
+
className: "w-full px-3 py-1.5 text-left text-sm text-neutral-300 hover:bg-[#3a3a3a] flex items-center gap-2",
|
|
2301
2301
|
children: [
|
|
2302
2302
|
/* @__PURE__ */ jsx6("span", { className: "material-icons text-amber-500", style: { fontSize: 16 }, children: "create_new_folder" }),
|
|
2303
2303
|
"New Folder"
|
|
2304
2304
|
]
|
|
2305
2305
|
}
|
|
2306
2306
|
),
|
|
2307
|
-
/* @__PURE__ */ jsx6("div", { className: "h-px bg-
|
|
2307
|
+
/* @__PURE__ */ jsx6("div", { className: "h-px bg-[#3a3a3a] my-1" }),
|
|
2308
2308
|
/* @__PURE__ */ jsxs6(
|
|
2309
2309
|
"button",
|
|
2310
2310
|
{
|
|
@@ -2312,9 +2312,9 @@ function LayerPanel({
|
|
|
2312
2312
|
onAddItem("image");
|
|
2313
2313
|
setShowAddMenu(false);
|
|
2314
2314
|
},
|
|
2315
|
-
className: "w-full px-3 py-1.5 text-left text-sm hover:bg-
|
|
2315
|
+
className: "w-full px-3 py-1.5 text-left text-sm text-neutral-300 hover:bg-[#3a3a3a] flex items-center gap-2",
|
|
2316
2316
|
children: [
|
|
2317
|
-
/* @__PURE__ */ jsx6("span", { className: "material-icons text-blue-
|
|
2317
|
+
/* @__PURE__ */ jsx6("span", { className: "material-icons text-blue-400", style: { fontSize: 16 }, children: "image" }),
|
|
2318
2318
|
"Image"
|
|
2319
2319
|
]
|
|
2320
2320
|
}
|
|
@@ -2326,9 +2326,9 @@ function LayerPanel({
|
|
|
2326
2326
|
onAddItem("text");
|
|
2327
2327
|
setShowAddMenu(false);
|
|
2328
2328
|
},
|
|
2329
|
-
className: "w-full px-3 py-1.5 text-left text-sm hover:bg-
|
|
2329
|
+
className: "w-full px-3 py-1.5 text-left text-sm text-neutral-300 hover:bg-[#3a3a3a] flex items-center gap-2",
|
|
2330
2330
|
children: [
|
|
2331
|
-
/* @__PURE__ */ jsx6("span", { className: "material-icons text-green-
|
|
2331
|
+
/* @__PURE__ */ jsx6("span", { className: "material-icons text-green-400", style: { fontSize: 16 }, children: "text_fields" }),
|
|
2332
2332
|
"Text"
|
|
2333
2333
|
]
|
|
2334
2334
|
}
|
|
@@ -2340,9 +2340,9 @@ function LayerPanel({
|
|
|
2340
2340
|
onAddItem("shape");
|
|
2341
2341
|
setShowAddMenu(false);
|
|
2342
2342
|
},
|
|
2343
|
-
className: "w-full px-3 py-1.5 text-left text-sm hover:bg-
|
|
2343
|
+
className: "w-full px-3 py-1.5 text-left text-sm text-neutral-300 hover:bg-[#3a3a3a] flex items-center gap-2",
|
|
2344
2344
|
children: [
|
|
2345
|
-
/* @__PURE__ */ jsx6("span", { className: "material-icons text-purple-
|
|
2345
|
+
/* @__PURE__ */ jsx6("span", { className: "material-icons text-purple-400", style: { fontSize: 16 }, children: "category" }),
|
|
2346
2346
|
"Shape"
|
|
2347
2347
|
]
|
|
2348
2348
|
}
|
|
@@ -2351,12 +2351,12 @@ function LayerPanel({
|
|
|
2351
2351
|
] })
|
|
2352
2352
|
] })
|
|
2353
2353
|
] }),
|
|
2354
|
-
/* @__PURE__ */ jsx6("div", { className: "flex-1 overflow-y-auto", children: layers.length === 0 ? /* @__PURE__ */ jsxs6("div", { className: "flex flex-col items-center justify-center h-full text-neutral-
|
|
2354
|
+
/* @__PURE__ */ jsx6("div", { className: "flex-1 overflow-y-auto", children: layers.length === 0 ? /* @__PURE__ */ jsxs6("div", { className: "flex flex-col items-center justify-center h-full text-neutral-500 text-sm", children: [
|
|
2355
2355
|
/* @__PURE__ */ jsx6("span", { className: "material-icons mb-2", style: { fontSize: 32 }, children: "layers" }),
|
|
2356
2356
|
/* @__PURE__ */ jsx6("p", { children: "No layers yet" }),
|
|
2357
2357
|
/* @__PURE__ */ jsx6("p", { className: "text-xs mt-1", children: "Click + to add a layer" })
|
|
2358
2358
|
] }) : /* @__PURE__ */ jsx6("div", { className: "py-1", children: layers.map((layer) => renderLayer(layer, 0)) }) }),
|
|
2359
|
-
selectedIds.length > 0 && /* @__PURE__ */ jsx6("div", { className: "px-3 py-2 border-t border-
|
|
2359
|
+
selectedIds.length > 0 && /* @__PURE__ */ jsx6("div", { className: "px-3 py-2 border-t border-[#3a3a3a] bg-[#1a1a1a]", children: /* @__PURE__ */ jsxs6("p", { className: "text-xs text-neutral-400", children: [
|
|
2360
2360
|
selectedIds.length,
|
|
2361
2361
|
" layer",
|
|
2362
2362
|
selectedIds.length > 1 ? "s" : "",
|
|
@@ -2415,7 +2415,7 @@ function TimelineRuler({
|
|
|
2415
2415
|
"div",
|
|
2416
2416
|
{
|
|
2417
2417
|
ref: rulerRef,
|
|
2418
|
-
className: "relative h-6 bg-
|
|
2418
|
+
className: "relative h-6 bg-[#1a1a1a] border-b border-[#3a3a3a] cursor-pointer select-none",
|
|
2419
2419
|
style: { width: totalWidth },
|
|
2420
2420
|
onClick: handleClick,
|
|
2421
2421
|
children: ticks.map(({ time, isMajor }) => {
|
|
@@ -2429,14 +2429,14 @@ function TimelineRuler({
|
|
|
2429
2429
|
/* @__PURE__ */ jsx7(
|
|
2430
2430
|
"div",
|
|
2431
2431
|
{
|
|
2432
|
-
className: `w-px ${isMajor ? "h-4 bg-neutral-
|
|
2432
|
+
className: `w-px ${isMajor ? "h-4 bg-neutral-500" : "h-2 bg-neutral-600"}`,
|
|
2433
2433
|
style: { marginTop: isMajor ? 0 : 8 }
|
|
2434
2434
|
}
|
|
2435
2435
|
),
|
|
2436
2436
|
isMajor && /* @__PURE__ */ jsx7(
|
|
2437
2437
|
"span",
|
|
2438
2438
|
{
|
|
2439
|
-
className: "absolute text-[10px] text-neutral-
|
|
2439
|
+
className: "absolute text-[10px] text-neutral-400 whitespace-nowrap",
|
|
2440
2440
|
style: {
|
|
2441
2441
|
top: 12,
|
|
2442
2442
|
left: 2
|
|
@@ -2608,8 +2608,8 @@ function KeyframeTrack({
|
|
|
2608
2608
|
{
|
|
2609
2609
|
ref: trackRef,
|
|
2610
2610
|
className: `
|
|
2611
|
-
relative h-7 border-b border-
|
|
2612
|
-
${isLayerSelected ? "bg-
|
|
2611
|
+
relative h-7 border-b border-[#2a2a2a]
|
|
2612
|
+
${isLayerSelected ? "bg-[#4a6fa5]/20" : "hover:bg-[#2a2a2a]"}
|
|
2613
2613
|
${!layer.visible ? "opacity-50" : ""}
|
|
2614
2614
|
`,
|
|
2615
2615
|
style: {
|
|
@@ -2623,7 +2623,7 @@ function KeyframeTrack({
|
|
|
2623
2623
|
{
|
|
2624
2624
|
className: `
|
|
2625
2625
|
absolute top-1 bottom-1 left-0 right-0 rounded
|
|
2626
|
-
${isFolder ? "bg-amber-
|
|
2626
|
+
${isFolder ? "bg-amber-900/30" : "bg-[#2a2a2a]"}
|
|
2627
2627
|
`,
|
|
2628
2628
|
style: { marginLeft: depth * 16 }
|
|
2629
2629
|
}
|
|
@@ -2831,14 +2831,14 @@ function Timeline({
|
|
|
2831
2831
|
const audioHeight = 48;
|
|
2832
2832
|
const totalHeight = 24 + // Ruler
|
|
2833
2833
|
flatLayers.length * layerHeight + (composition.audioTracks?.length ?? 0) * audioHeight;
|
|
2834
|
-
return /* @__PURE__ */ jsxs11("div", { className: "flex flex-col h-full bg-
|
|
2835
|
-
/* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2 px-3 py-2 border-b border-
|
|
2834
|
+
return /* @__PURE__ */ jsxs11("div", { className: "flex flex-col h-full bg-[#1a1a1a] border-t border-[#3a3a3a]", children: [
|
|
2835
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2 px-3 py-2 border-b border-[#3a3a3a] bg-[#232323]", children: [
|
|
2836
2836
|
/* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-1", children: [
|
|
2837
2837
|
/* @__PURE__ */ jsx12(
|
|
2838
2838
|
"button",
|
|
2839
2839
|
{
|
|
2840
2840
|
onClick: onStop,
|
|
2841
|
-
className: "p-1.5 hover:bg-neutral-
|
|
2841
|
+
className: "p-1.5 hover:bg-[#3a3a3a] rounded text-neutral-400 hover:text-white",
|
|
2842
2842
|
title: "Stop (go to start)",
|
|
2843
2843
|
children: /* @__PURE__ */ jsx12("span", { className: "material-icons", style: { fontSize: 18 }, children: "stop" })
|
|
2844
2844
|
}
|
|
@@ -2847,13 +2847,13 @@ function Timeline({
|
|
|
2847
2847
|
"button",
|
|
2848
2848
|
{
|
|
2849
2849
|
onClick: isPlaying ? onPause : onPlay,
|
|
2850
|
-
className: "p-1.5 hover:bg-neutral-
|
|
2850
|
+
className: "p-1.5 hover:bg-[#3a3a3a] rounded text-neutral-400 hover:text-white",
|
|
2851
2851
|
title: isPlaying ? "Pause" : "Play",
|
|
2852
2852
|
children: /* @__PURE__ */ jsx12("span", { className: "material-icons", style: { fontSize: 18 }, children: isPlaying ? "pause" : "play_arrow" })
|
|
2853
2853
|
}
|
|
2854
2854
|
)
|
|
2855
2855
|
] }),
|
|
2856
|
-
/* @__PURE__ */ jsxs11("div", { className: "px-2 py-1 bg-
|
|
2856
|
+
/* @__PURE__ */ jsxs11("div", { className: "px-2 py-1 bg-[#0a0a0a] text-blue-400 font-mono text-sm rounded border border-[#3a3a3a]", children: [
|
|
2857
2857
|
formatTimecode(currentTime),
|
|
2858
2858
|
" / ",
|
|
2859
2859
|
formatTimecode(composition.duration)
|
|
@@ -2864,7 +2864,7 @@ function Timeline({
|
|
|
2864
2864
|
"button",
|
|
2865
2865
|
{
|
|
2866
2866
|
onClick: () => onZoomChange(Math.max(10, zoom * 0.8)),
|
|
2867
|
-
className: "p-1 hover:bg-neutral-
|
|
2867
|
+
className: "p-1 hover:bg-[#3a3a3a] rounded text-neutral-400 hover:text-white",
|
|
2868
2868
|
title: "Zoom out",
|
|
2869
2869
|
children: /* @__PURE__ */ jsx12("span", { className: "material-icons", style: { fontSize: 16 }, children: "remove" })
|
|
2870
2870
|
}
|
|
@@ -2877,7 +2877,7 @@ function Timeline({
|
|
|
2877
2877
|
"button",
|
|
2878
2878
|
{
|
|
2879
2879
|
onClick: () => onZoomChange(Math.min(500, zoom * 1.25)),
|
|
2880
|
-
className: "p-1 hover:bg-neutral-
|
|
2880
|
+
className: "p-1 hover:bg-[#3a3a3a] rounded text-neutral-400 hover:text-white",
|
|
2881
2881
|
title: "Zoom in",
|
|
2882
2882
|
children: /* @__PURE__ */ jsx12("span", { className: "material-icons", style: { fontSize: 16 }, children: "add" })
|
|
2883
2883
|
}
|
|
@@ -2888,29 +2888,29 @@ function Timeline({
|
|
|
2888
2888
|
{
|
|
2889
2889
|
onClick: () => {
|
|
2890
2890
|
},
|
|
2891
|
-
className: `p-1.5 rounded ${snapToGrid ? "bg-blue-
|
|
2891
|
+
className: `p-1.5 rounded ${snapToGrid ? "bg-blue-900/50 text-blue-400" : "hover:bg-[#3a3a3a] text-neutral-400"}`,
|
|
2892
2892
|
title: "Snap to grid",
|
|
2893
2893
|
children: /* @__PURE__ */ jsx12("span", { className: "material-icons", style: { fontSize: 16 }, children: "grid_on" })
|
|
2894
2894
|
}
|
|
2895
2895
|
)
|
|
2896
2896
|
] }),
|
|
2897
2897
|
/* @__PURE__ */ jsxs11("div", { className: "flex flex-1 overflow-hidden", children: [
|
|
2898
|
-
/* @__PURE__ */ jsxs11("div", { className: "w-[150px] flex-shrink-0 border-r border-
|
|
2899
|
-
/* @__PURE__ */ jsx12("div", { className: "h-6 bg-
|
|
2898
|
+
/* @__PURE__ */ jsxs11("div", { className: "w-[150px] flex-shrink-0 border-r border-[#3a3a3a] overflow-y-auto bg-[#232323]", children: [
|
|
2899
|
+
/* @__PURE__ */ jsx12("div", { className: "h-6 bg-[#1a1a1a] border-b border-[#3a3a3a] px-2 flex items-center", children: /* @__PURE__ */ jsx12("span", { className: "text-xs text-neutral-500", children: "Layers" }) }),
|
|
2900
2900
|
flatLayers.map((layer) => {
|
|
2901
2901
|
const depth = getLayerDepth(layer, composition.layers);
|
|
2902
2902
|
return /* @__PURE__ */ jsxs11(
|
|
2903
2903
|
"div",
|
|
2904
2904
|
{
|
|
2905
2905
|
className: `
|
|
2906
|
-
h-7 border-b border-
|
|
2907
|
-
${selectedLayerIds.includes(layer.id) ? "bg-
|
|
2906
|
+
h-7 border-b border-[#2a2a2a] px-2 flex items-center
|
|
2907
|
+
${selectedLayerIds.includes(layer.id) ? "bg-[#4a6fa5]/30" : ""}
|
|
2908
2908
|
${!layer.visible ? "opacity-50" : ""}
|
|
2909
2909
|
`,
|
|
2910
2910
|
style: { paddingLeft: depth * 12 + 8 },
|
|
2911
2911
|
children: [
|
|
2912
|
-
/* @__PURE__ */ jsx12("span", { className: "material-icons text-neutral-
|
|
2913
|
-
/* @__PURE__ */ jsx12("span", { className: "text-xs text-neutral-
|
|
2912
|
+
/* @__PURE__ */ jsx12("span", { className: "material-icons text-neutral-500 mr-1", style: { fontSize: 12 }, children: layer.type === "folder" ? "folder" : "lens" }),
|
|
2913
|
+
/* @__PURE__ */ jsx12("span", { className: "text-xs text-neutral-300 truncate", children: layer.name })
|
|
2914
2914
|
]
|
|
2915
2915
|
},
|
|
2916
2916
|
layer.id
|
|
@@ -2919,10 +2919,10 @@ function Timeline({
|
|
|
2919
2919
|
composition.audioTracks?.map((track) => /* @__PURE__ */ jsxs11(
|
|
2920
2920
|
"div",
|
|
2921
2921
|
{
|
|
2922
|
-
className: "h-12 border-b border-
|
|
2922
|
+
className: "h-12 border-b border-[#2a2a2a] px-2 flex items-center",
|
|
2923
2923
|
children: [
|
|
2924
|
-
/* @__PURE__ */ jsx12("span", { className: "material-icons text-blue-
|
|
2925
|
-
/* @__PURE__ */ jsx12("span", { className: "text-xs text-neutral-
|
|
2924
|
+
/* @__PURE__ */ jsx12("span", { className: "material-icons text-blue-400 mr-1", style: { fontSize: 12 }, children: "audiotrack" }),
|
|
2925
|
+
/* @__PURE__ */ jsx12("span", { className: "text-xs text-neutral-300 truncate", children: track.name })
|
|
2926
2926
|
]
|
|
2927
2927
|
},
|
|
2928
2928
|
track.id
|
|
@@ -2932,7 +2932,7 @@ function Timeline({
|
|
|
2932
2932
|
"div",
|
|
2933
2933
|
{
|
|
2934
2934
|
ref: containerRef,
|
|
2935
|
-
className: "flex-1 overflow-auto relative",
|
|
2935
|
+
className: "flex-1 overflow-auto relative bg-[#1e1e1e]",
|
|
2936
2936
|
onScroll: handleScroll,
|
|
2937
2937
|
onWheel: handleWheel,
|
|
2938
2938
|
children: /* @__PURE__ */ jsxs11("div", { style: { width: totalWidth, minHeight: totalHeight }, children: [
|
|
@@ -3479,16 +3479,16 @@ function PropertiesPanel({
|
|
|
3479
3479
|
onAddKeyframe
|
|
3480
3480
|
}) {
|
|
3481
3481
|
if (selectedLayers.length === 0) {
|
|
3482
|
-
return /* @__PURE__ */ jsxs13("div", { className: "w-[250px] flex-shrink-0 bg-
|
|
3483
|
-
/* @__PURE__ */ jsx15("div", { className: "px-3 py-2 border-b border-
|
|
3484
|
-
/* @__PURE__ */ jsx15("div", { className: "flex-1 flex items-center justify-center text-neutral-
|
|
3482
|
+
return /* @__PURE__ */ jsxs13("div", { className: "w-[250px] flex-shrink-0 bg-[#232323] border-l border-[#3a3a3a] flex flex-col", children: [
|
|
3483
|
+
/* @__PURE__ */ jsx15("div", { className: "px-3 py-2 border-b border-[#3a3a3a]", children: /* @__PURE__ */ jsx15("h3", { className: "text-sm font-semibold text-neutral-300", children: "Properties" }) }),
|
|
3484
|
+
/* @__PURE__ */ jsx15("div", { className: "flex-1 flex items-center justify-center text-neutral-500 text-sm p-4 text-center", children: "Select a layer to edit its properties" })
|
|
3485
3485
|
] });
|
|
3486
3486
|
}
|
|
3487
3487
|
if (selectedLayers.length > 1) {
|
|
3488
|
-
return /* @__PURE__ */ jsxs13("div", { className: "w-[250px] flex-shrink-0 bg-
|
|
3489
|
-
/* @__PURE__ */ jsxs13("div", { className: "px-3 py-2 border-b border-
|
|
3490
|
-
/* @__PURE__ */ jsx15("h3", { className: "text-sm font-semibold text-neutral-
|
|
3491
|
-
/* @__PURE__ */ jsxs13("p", { className: "text-xs text-neutral-
|
|
3488
|
+
return /* @__PURE__ */ jsxs13("div", { className: "w-[250px] flex-shrink-0 bg-[#232323] border-l border-[#3a3a3a] flex flex-col", children: [
|
|
3489
|
+
/* @__PURE__ */ jsxs13("div", { className: "px-3 py-2 border-b border-[#3a3a3a]", children: [
|
|
3490
|
+
/* @__PURE__ */ jsx15("h3", { className: "text-sm font-semibold text-neutral-300", children: "Properties" }),
|
|
3491
|
+
/* @__PURE__ */ jsxs13("p", { className: "text-xs text-neutral-500", children: [
|
|
3492
3492
|
selectedLayers.length,
|
|
3493
3493
|
" layers selected"
|
|
3494
3494
|
] })
|
|
@@ -3497,10 +3497,10 @@ function PropertiesPanel({
|
|
|
3497
3497
|
] });
|
|
3498
3498
|
}
|
|
3499
3499
|
const layer = selectedLayers[0];
|
|
3500
|
-
return /* @__PURE__ */ jsxs13("div", { className: "w-[250px] flex-shrink-0 bg-
|
|
3501
|
-
/* @__PURE__ */ jsxs13("div", { className: "px-3 py-2 border-b border-
|
|
3502
|
-
/* @__PURE__ */ jsx15("h3", { className: "text-sm font-semibold text-neutral-
|
|
3503
|
-
/* @__PURE__ */ jsx15("p", { className: "text-xs text-neutral-
|
|
3500
|
+
return /* @__PURE__ */ jsxs13("div", { className: "w-[250px] flex-shrink-0 bg-[#232323] border-l border-[#3a3a3a] flex flex-col", children: [
|
|
3501
|
+
/* @__PURE__ */ jsxs13("div", { className: "px-3 py-2 border-b border-[#3a3a3a]", children: [
|
|
3502
|
+
/* @__PURE__ */ jsx15("h3", { className: "text-sm font-semibold text-neutral-300", children: "Properties" }),
|
|
3503
|
+
/* @__PURE__ */ jsx15("p", { className: "text-xs text-neutral-500 truncate", children: layer.name })
|
|
3504
3504
|
] }),
|
|
3505
3505
|
/* @__PURE__ */ jsxs13("div", { className: "flex-1 overflow-y-auto", children: [
|
|
3506
3506
|
/* @__PURE__ */ jsxs13(PropertySection, { title: "Layer", children: [
|
|
@@ -3510,7 +3510,7 @@ function PropertiesPanel({
|
|
|
3510
3510
|
type: "text",
|
|
3511
3511
|
value: layer.name,
|
|
3512
3512
|
onChange: (e) => onUpdateLayer(layer.id, { name: e.target.value }),
|
|
3513
|
-
className: "w-full px-2 py-1 text-sm
|
|
3513
|
+
className: "w-full px-2 py-1 text-sm bg-[#1a1a1a] text-neutral-200 border border-[#3a3a3a] rounded focus:outline-none focus:border-blue-500"
|
|
3514
3514
|
}
|
|
3515
3515
|
) }),
|
|
3516
3516
|
/* @__PURE__ */ jsx15(PropertyRow, { label: "Visible", children: /* @__PURE__ */ jsx15(
|
|
@@ -3519,7 +3519,7 @@ function PropertiesPanel({
|
|
|
3519
3519
|
type: "checkbox",
|
|
3520
3520
|
checked: layer.visible,
|
|
3521
3521
|
onChange: (e) => onUpdateLayer(layer.id, { visible: e.target.checked }),
|
|
3522
|
-
className: "w-4 h-4"
|
|
3522
|
+
className: "w-4 h-4 accent-blue-500"
|
|
3523
3523
|
}
|
|
3524
3524
|
) }),
|
|
3525
3525
|
/* @__PURE__ */ jsx15(PropertyRow, { label: "Locked", children: /* @__PURE__ */ jsx15(
|
|
@@ -3528,7 +3528,7 @@ function PropertiesPanel({
|
|
|
3528
3528
|
type: "checkbox",
|
|
3529
3529
|
checked: layer.locked,
|
|
3530
3530
|
onChange: (e) => onUpdateLayer(layer.id, { locked: e.target.checked }),
|
|
3531
|
-
className: "w-4 h-4"
|
|
3531
|
+
className: "w-4 h-4 accent-blue-500"
|
|
3532
3532
|
}
|
|
3533
3533
|
) }),
|
|
3534
3534
|
/* @__PURE__ */ jsx15(PropertyRow, { label: "Opacity", keyframeable: true, onAddKeyframe: () => onAddKeyframe(layer.id, "opacity"), children: /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-2", children: [
|
|
@@ -3541,10 +3541,10 @@ function PropertiesPanel({
|
|
|
3541
3541
|
step: 0.01,
|
|
3542
3542
|
value: layer.opacity,
|
|
3543
3543
|
onChange: (e) => onUpdateLayer(layer.id, { opacity: parseFloat(e.target.value) }),
|
|
3544
|
-
className: "flex-1"
|
|
3544
|
+
className: "flex-1 accent-blue-500"
|
|
3545
3545
|
}
|
|
3546
3546
|
),
|
|
3547
|
-
/* @__PURE__ */ jsxs13("span", { className: "text-xs text-neutral-
|
|
3547
|
+
/* @__PURE__ */ jsxs13("span", { className: "text-xs text-neutral-400 w-10 text-right", children: [
|
|
3548
3548
|
Math.round(layer.opacity * 100),
|
|
3549
3549
|
"%"
|
|
3550
3550
|
] })
|
|
@@ -3554,7 +3554,7 @@ function PropertiesPanel({
|
|
|
3554
3554
|
{
|
|
3555
3555
|
value: layer.blendMode || "normal",
|
|
3556
3556
|
onChange: (e) => onUpdateLayer(layer.id, { blendMode: e.target.value }),
|
|
3557
|
-
className: "w-full px-2 py-1 text-sm
|
|
3557
|
+
className: "w-full px-2 py-1 text-sm bg-[#1a1a1a] text-neutral-200 border border-[#3a3a3a] rounded focus:outline-none focus:border-blue-500",
|
|
3558
3558
|
children: [
|
|
3559
3559
|
/* @__PURE__ */ jsx15("option", { value: "normal", children: "Normal" }),
|
|
3560
3560
|
/* @__PURE__ */ jsx15("option", { value: "multiply", children: "Multiply" }),
|
|
@@ -3582,10 +3582,10 @@ function PropertiesPanel({
|
|
|
3582
3582
|
layer.keyframes && layer.keyframes.length > 0 && /* @__PURE__ */ jsx15("div", { className: "mt-2 space-y-1", children: layer.keyframes.map((kf) => /* @__PURE__ */ jsxs13(
|
|
3583
3583
|
"div",
|
|
3584
3584
|
{
|
|
3585
|
-
className: "text-xs px-2 py-1 bg-
|
|
3585
|
+
className: "text-xs px-2 py-1 bg-[#1a1a1a] rounded flex justify-between text-neutral-300",
|
|
3586
3586
|
children: [
|
|
3587
3587
|
/* @__PURE__ */ jsx15("span", { children: formatTimecode(kf.time) }),
|
|
3588
|
-
/* @__PURE__ */ jsx15("span", { className: "text-neutral-
|
|
3588
|
+
/* @__PURE__ */ jsx15("span", { className: "text-neutral-500", children: Object.keys(kf.properties).join(", ") })
|
|
3589
3589
|
]
|
|
3590
3590
|
},
|
|
3591
3591
|
kf.id
|
|
@@ -3596,15 +3596,15 @@ function PropertiesPanel({
|
|
|
3596
3596
|
}
|
|
3597
3597
|
function PropertySection({ title, children }) {
|
|
3598
3598
|
const [isOpen, setIsOpen] = React13.useState(true);
|
|
3599
|
-
return /* @__PURE__ */ jsxs13("div", { className: "border-b border-
|
|
3599
|
+
return /* @__PURE__ */ jsxs13("div", { className: "border-b border-[#3a3a3a]", children: [
|
|
3600
3600
|
/* @__PURE__ */ jsxs13(
|
|
3601
3601
|
"button",
|
|
3602
3602
|
{
|
|
3603
3603
|
onClick: () => setIsOpen(!isOpen),
|
|
3604
|
-
className: "w-full px-3 py-2 flex items-center justify-between hover:bg-
|
|
3604
|
+
className: "w-full px-3 py-2 flex items-center justify-between hover:bg-[#2a2a2a]",
|
|
3605
3605
|
children: [
|
|
3606
|
-
/* @__PURE__ */ jsx15("span", { className: "text-xs font-semibold text-neutral-
|
|
3607
|
-
/* @__PURE__ */ jsx15("span", { className: "material-icons text-neutral-
|
|
3606
|
+
/* @__PURE__ */ jsx15("span", { className: "text-xs font-semibold text-neutral-400 uppercase", children: title }),
|
|
3607
|
+
/* @__PURE__ */ jsx15("span", { className: "material-icons text-neutral-500", style: { fontSize: 16 }, children: isOpen ? "expand_less" : "expand_more" })
|
|
3608
3608
|
]
|
|
3609
3609
|
}
|
|
3610
3610
|
),
|
|
@@ -3623,7 +3623,7 @@ function PropertyRow({
|
|
|
3623
3623
|
"button",
|
|
3624
3624
|
{
|
|
3625
3625
|
onClick: onAddKeyframe,
|
|
3626
|
-
className: "p-0.5 hover:bg-amber-
|
|
3626
|
+
className: "p-0.5 hover:bg-amber-900/50 rounded",
|
|
3627
3627
|
title: "Add keyframe",
|
|
3628
3628
|
children: /* @__PURE__ */ jsx15("span", { className: "material-icons text-amber-500", style: { fontSize: 12 }, children: "diamond" })
|
|
3629
3629
|
}
|
|
@@ -3648,7 +3648,7 @@ function ObjectProperties({
|
|
|
3648
3648
|
type: "text",
|
|
3649
3649
|
value: object.src,
|
|
3650
3650
|
onChange: (e) => onUpdate({ object: { ...object, src: e.target.value } }),
|
|
3651
|
-
className: "w-full px-2 py-1 text-sm
|
|
3651
|
+
className: "w-full px-2 py-1 text-sm bg-[#1a1a1a] text-neutral-200 border border-[#3a3a3a] rounded focus:outline-none focus:border-blue-500",
|
|
3652
3652
|
placeholder: "Image URL"
|
|
3653
3653
|
}
|
|
3654
3654
|
) }),
|
|
@@ -3659,7 +3659,7 @@ function ObjectProperties({
|
|
|
3659
3659
|
onChange: (e) => onUpdate({
|
|
3660
3660
|
object: { ...object, objectFit: e.target.value }
|
|
3661
3661
|
}),
|
|
3662
|
-
className: "w-full px-2 py-1 text-sm
|
|
3662
|
+
className: "w-full px-2 py-1 text-sm bg-[#1a1a1a] text-neutral-200 border border-[#3a3a3a] rounded",
|
|
3663
3663
|
children: [
|
|
3664
3664
|
/* @__PURE__ */ jsx15("option", { value: "contain", children: "Contain" }),
|
|
3665
3665
|
/* @__PURE__ */ jsx15("option", { value: "cover", children: "Cover" }),
|
|
@@ -3677,7 +3677,7 @@ function ObjectProperties({
|
|
|
3677
3677
|
value: object.content,
|
|
3678
3678
|
onChange: (e) => onUpdate({ object: { ...object, content: e.target.value } }),
|
|
3679
3679
|
rows: 3,
|
|
3680
|
-
className: "w-full px-2 py-1 text-sm
|
|
3680
|
+
className: "w-full px-2 py-1 text-sm bg-[#1a1a1a] text-neutral-200 border border-[#3a3a3a] rounded focus:outline-none focus:border-blue-500 resize-none"
|
|
3681
3681
|
}
|
|
3682
3682
|
) }),
|
|
3683
3683
|
/* @__PURE__ */ jsx15(PropertyRow, { label: "Size", children: /* @__PURE__ */ jsx15(
|
|
@@ -3686,7 +3686,7 @@ function ObjectProperties({
|
|
|
3686
3686
|
type: "number",
|
|
3687
3687
|
value: object.fontSize || 16,
|
|
3688
3688
|
onChange: (e) => onUpdate({ object: { ...object, fontSize: parseInt(e.target.value) || 16 } }),
|
|
3689
|
-
className: "w-full px-2 py-1 text-sm
|
|
3689
|
+
className: "w-full px-2 py-1 text-sm bg-[#1a1a1a] text-neutral-200 border border-[#3a3a3a] rounded"
|
|
3690
3690
|
}
|
|
3691
3691
|
) }),
|
|
3692
3692
|
/* @__PURE__ */ jsx15(PropertyRow, { label: "Color", children: /* @__PURE__ */ jsx15(
|
|
@@ -3695,7 +3695,7 @@ function ObjectProperties({
|
|
|
3695
3695
|
type: "color",
|
|
3696
3696
|
value: object.color || "#000000",
|
|
3697
3697
|
onChange: (e) => onUpdate({ object: { ...object, color: e.target.value } }),
|
|
3698
|
-
className: "w-8 h-6 cursor-pointer"
|
|
3698
|
+
className: "w-8 h-6 cursor-pointer bg-transparent"
|
|
3699
3699
|
}
|
|
3700
3700
|
) }),
|
|
3701
3701
|
/* @__PURE__ */ jsx15(PropertyRow, { label: "Align", children: /* @__PURE__ */ jsxs13(
|
|
@@ -3705,7 +3705,7 @@ function ObjectProperties({
|
|
|
3705
3705
|
onChange: (e) => onUpdate({
|
|
3706
3706
|
object: { ...object, textAlign: e.target.value }
|
|
3707
3707
|
}),
|
|
3708
|
-
className: "w-full px-2 py-1 text-sm
|
|
3708
|
+
className: "w-full px-2 py-1 text-sm bg-[#1a1a1a] text-neutral-200 border border-[#3a3a3a] rounded",
|
|
3709
3709
|
children: [
|
|
3710
3710
|
/* @__PURE__ */ jsx15("option", { value: "left", children: "Left" }),
|
|
3711
3711
|
/* @__PURE__ */ jsx15("option", { value: "center", children: "Center" }),
|
|
@@ -3722,7 +3722,7 @@ function ObjectProperties({
|
|
|
3722
3722
|
type: "color",
|
|
3723
3723
|
value: object.fill || "#cccccc",
|
|
3724
3724
|
onChange: (e) => onUpdate({ object: { ...object, fill: e.target.value } }),
|
|
3725
|
-
className: "w-8 h-6 cursor-pointer"
|
|
3725
|
+
className: "w-8 h-6 cursor-pointer bg-transparent"
|
|
3726
3726
|
}
|
|
3727
3727
|
) }),
|
|
3728
3728
|
/* @__PURE__ */ jsx15(PropertyRow, { label: "Stroke", children: /* @__PURE__ */ jsx15(
|
|
@@ -3731,7 +3731,7 @@ function ObjectProperties({
|
|
|
3731
3731
|
type: "color",
|
|
3732
3732
|
value: object.stroke || "#000000",
|
|
3733
3733
|
onChange: (e) => onUpdate({ object: { ...object, stroke: e.target.value } }),
|
|
3734
|
-
className: "w-8 h-6 cursor-pointer"
|
|
3734
|
+
className: "w-8 h-6 cursor-pointer bg-transparent"
|
|
3735
3735
|
}
|
|
3736
3736
|
) })
|
|
3737
3737
|
] });
|