@vishu1301/script-writing 1.4.2 → 1.4.3

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.cts CHANGED
@@ -234,7 +234,7 @@ interface UseShotBreakdownOptions {
234
234
  fetchOptions?: RequestInit;
235
235
  onAISummarize?: (scene: any) => void;
236
236
  onShotAdded?: (shot: Shot) => any;
237
- onShotsBulkAdded?: (shots: Shot[], summary?: string) => Promise<void>;
237
+ onShotsBulkAdded?: (shots: Shot[], scene_type: string) => Promise<void>;
238
238
  onShotRemoved?: (shotId: string) => any;
239
239
  onShotUpdated?: (shotId: string, detail: Shot) => any;
240
240
  onProductionInitialized?: (cameras: Camera[], type: string) => any;
package/dist/index.d.ts CHANGED
@@ -234,7 +234,7 @@ interface UseShotBreakdownOptions {
234
234
  fetchOptions?: RequestInit;
235
235
  onAISummarize?: (scene: any) => void;
236
236
  onShotAdded?: (shot: Shot) => any;
237
- onShotsBulkAdded?: (shots: Shot[], summary?: string) => Promise<void>;
237
+ onShotsBulkAdded?: (shots: Shot[], scene_type: string) => Promise<void>;
238
238
  onShotRemoved?: (shotId: string) => any;
239
239
  onShotUpdated?: (shotId: string, detail: Shot) => any;
240
240
  onProductionInitialized?: (cameras: Camera[], type: string) => any;
package/dist/index.js CHANGED
@@ -4295,7 +4295,7 @@ function ShotBreakdownView({
4295
4295
  /* @__PURE__ */ jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-full bg-slate-50 border border-slate-100 mb-3", children: /* @__PURE__ */ jsx(Video, { className: "h-4 w-4 text-slate-300" }) }),
4296
4296
  /* @__PURE__ */ jsx("p", { className: "text-xs font-semibold text-slate-700", children: "No shots created" }),
4297
4297
  /* @__PURE__ */ jsx("p", { className: "text-[11px] text-slate-500 mt-1 max-w-[160px] leading-relaxed", children: "Highlight text in the screenplay to add your first shot." })
4298
- ] }) : /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2.5 overflow-y-auto overflow-x-hidden pb-4 pr-2 custom-scrollbar", children: shots.map((shot) => {
4298
+ ] }) : /* @__PURE__ */ jsx("div", { className: "flex h-full max-h-[calc(100vh-200px)] flex-col gap-2.5 overflow-y-auto overflow-x-hidden pb-4 pr-2 custom-scrollbar", children: shots.map((shot) => {
4299
4299
  const isActive = toggledShotId === shot.id;
4300
4300
  return /* @__PURE__ */ jsxs(
4301
4301
  "div",
@@ -4304,13 +4304,13 @@ function ShotBreakdownView({
4304
4304
  var _a2;
4305
4305
  return setToggledShotId(isActive ? null : (_a2 = shot.id) != null ? _a2 : null);
4306
4306
  },
4307
- className: `group relative cursor-pointer rounded-xl border transition-all duration-300 overflow-hidden ${isActive ? "border-slate-900 bg-slate-50 shadow-[0_6px_20px_rgba(0,0,0,0.06)]" : "border-slate-200 bg-white hover:border-slate-300 hover:shadow-[0_4px_14px_rgba(0,0,0,0.05)]"}`,
4307
+ className: `group relative flex-shrink-0 cursor-pointer rounded-xl border transition-all duration-300 overflow-hidden ${isActive ? "border-slate-900 bg-slate-50 shadow-[0_6px_20px_rgba(0,0,0,0.06)]" : "border-slate-200 bg-white hover:border-slate-300 hover:shadow-[0_4px_14px_rgba(0,0,0,0.05)]"}`,
4308
4308
  children: [
4309
4309
  /* @__PURE__ */ jsx(
4310
4310
  "div",
4311
4311
  {
4312
4312
  className: `absolute left-0 top-0 h-full w-[3px] transition-all duration-300
4313
- ${isActive ? "bg-slate-900" : "bg-transparent group-hover:bg-slate-300"}`
4313
+ ${isActive ? "bg-slate-900" : "bg-transparent group-hover:bg-slate-300"}`
4314
4314
  }
4315
4315
  ),
4316
4316
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 px-4 py-3.5", children: [
@@ -4320,7 +4320,7 @@ function ShotBreakdownView({
4320
4320
  "span",
4321
4321
  {
4322
4322
  className: `text-[11px] font-semibold tracking-wide uppercase
4323
- ${isActive ? "text-slate-900" : "text-slate-500"}`,
4323
+ ${isActive ? "text-slate-900" : "text-slate-500"}`,
4324
4324
  children: [
4325
4325
  "Shot ",
4326
4326
  shot.shot_number
@@ -4332,7 +4332,7 @@ function ShotBreakdownView({
4332
4332
  /* @__PURE__ */ jsx(
4333
4333
  "span",
4334
4334
  {
4335
- className: `rounded-md px-2 py-0.5 text-[9px] font-bold uppercase tracking-wider ${isActive ? "bg-slate-900 text-white" : "bg-slate-100 text-slate-500 group-hover:bg-slate-200"}`,
4335
+ className: `rounded-md px-2 py-0.5 text-[8px] font-bold uppercase tracking-wider ${isActive ? "bg-slate-900 text-white" : "bg-slate-100 text-slate-500 group-hover:bg-slate-200"}`,
4336
4336
  children: shot.shot_type
4337
4337
  }
4338
4338
  )
@@ -4344,8 +4344,8 @@ function ShotBreakdownView({
4344
4344
  /* @__PURE__ */ jsx(
4345
4345
  "div",
4346
4346
  {
4347
- className: `grid transition-all duration-300 ease-in-out ${isActive ? "grid-rows-[2fr] mt-2" : "grid-rows-[0fr]"}`,
4348
- children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsxs("div", { className: "py-3 pb-4 border-t border-slate-200/70 flex gap-2", children: [
4347
+ className: `grid transition-all duration-300 ease-in-out ${isActive ? "grid-rows-[1fr] opacity-100 mt-2" : "grid-rows-[0fr] opacity-0"}`,
4348
+ children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsxs("div", { className: "py-3 pb-1 border-t border-slate-200/70 flex gap-2", children: [
4349
4349
  /* @__PURE__ */ jsxs(
4350
4350
  "button",
4351
4351
  {
@@ -4704,9 +4704,8 @@ function useShotBreakdownScene(options) {
4704
4704
  if (res && res.ok) {
4705
4705
  const data = await res.json();
4706
4706
  setIsSummarizing(false);
4707
- console.log(data);
4708
4707
  const newShots = [];
4709
- data.data.forEach((aiShot) => {
4708
+ data.data[0].forEach((aiShot) => {
4710
4709
  var _a2;
4711
4710
  const newShot = {
4712
4711
  id: aiShot.id || uuid(),
@@ -4744,7 +4743,7 @@ function useShotBreakdownScene(options) {
4744
4743
  if (newShots.length > 0) {
4745
4744
  setShots((prev) => [...prev, ...newShots]);
4746
4745
  if (options.onShotsBulkAdded) {
4747
- await options.onShotsBulkAdded(newShots);
4746
+ await options.onShotsBulkAdded(newShots, data.data[1]);
4748
4747
  }
4749
4748
  }
4750
4749
  } else {