@vishu1301/script-writing 1.5.8 → 1.5.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.js CHANGED
@@ -1,11 +1,11 @@
1
- import { useState, useRef, useEffect, useMemo, useCallback } from 'react';
1
+ import React4, { useState, useRef, useEffect, useMemo, useCallback } from 'react';
2
2
  import { Users, Box, Shirt, Car, Armchair, UserPlus, MapPin, Map as Map$1, CornerDownRight, MessageSquareText, Parentheses, User, AlignLeft, Type, Loader2, Upload, Lock, Unlock, Save, FileDown, RefreshCcw, Cog, Languages, Check, Keyboard, ArrowRight, ChevronRight, Sparkles, Tags, ChevronDown, X, Video, Settings2, Eye, Pencil, BookOpen, Search, Zap, Info, Frame, BookText, AsteriskIcon, Target, Activity, MonitorPlay, Crosshair, Clock, Camera, Aperture, SlidersHorizontal, Sun, Wand2, Volume2, Layers } from 'lucide-react';
3
3
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
4
  import * as pdfjs from 'pdfjs-dist';
5
5
  import jsPDF from 'jspdf';
6
6
  import html2canvas from 'html2canvas-pro';
7
- import * as Yup from 'yup';
8
7
  import { Formik, Form, ErrorMessage, Field, useFormikContext } from 'formik';
8
+ import * as Yup from 'yup';
9
9
 
10
10
  var __defProp = Object.defineProperty;
11
11
  var __defProps = Object.defineProperties;
@@ -3298,6 +3298,368 @@ var SummarizeButton = ({
3298
3298
  );
3299
3299
  };
3300
3300
  var summarize_button_default = SummarizeButton;
3301
+
3302
+ // data/crowd-data.ts
3303
+ var crowdAgeOption = [
3304
+ { name: "Adult" },
3305
+ { name: "Old" },
3306
+ { name: "Teenage" },
3307
+ { name: "Kid" }
3308
+ ];
3309
+ var crowdTypeOption = [{ name: "Male" }, { name: "Female" }];
3310
+ var FormikSelect = ({
3311
+ label,
3312
+ name,
3313
+ selectedOption,
3314
+ optionData,
3315
+ value,
3316
+ disable,
3317
+ divClasses,
3318
+ valueProperty = "name",
3319
+ labelProperty = "name",
3320
+ label2propery,
3321
+ brackets,
3322
+ className,
3323
+ enableRedAsterick = false,
3324
+ disableOptionProperty = "disable",
3325
+ disabledOptionText = "",
3326
+ onChange
3327
+ }) => {
3328
+ return /* @__PURE__ */ jsxs("div", { className: `w-full ${divClasses}`, children: [
3329
+ label && /* @__PURE__ */ jsxs(
3330
+ "label",
3331
+ {
3332
+ className: `mb-1.5 text-sm font-medium text-slate-700 capitalize flex`,
3333
+ children: [
3334
+ label,
3335
+ enableRedAsterick && /* @__PURE__ */ jsx(AsteriskIcon, { className: "size-3 text-red-500" })
3336
+ ]
3337
+ }
3338
+ ),
3339
+ /* @__PURE__ */ jsxs(
3340
+ Field,
3341
+ {
3342
+ name,
3343
+ as: "select",
3344
+ value,
3345
+ disabled: disable,
3346
+ onChange,
3347
+ className: `${className} rounded-[2.5rem] block w-full px-3 py-2.5 text-slate-700 placeholder-slate-400 placeholder:capitalize bg-white border border-slate-300/80 focus:border-blumine-500 focus:ring-2 focus:ring-blumine-500/50 focus:outline-none transition-all`,
3348
+ children: [
3349
+ /* @__PURE__ */ jsx("option", { selected: true, value: "", disabled: true, className: "capitalize", children: selectedOption }),
3350
+ optionData == null ? void 0 : optionData.map((option, index) => /* @__PURE__ */ jsxs(
3351
+ "option",
3352
+ {
3353
+ value: option[valueProperty],
3354
+ disabled: option[disableOptionProperty],
3355
+ children: [
3356
+ option[labelProperty],
3357
+ label2propery ? brackets ? ` (${option[label2propery]})` : option[label2propery] : "",
3358
+ " ",
3359
+ option[disableOptionProperty] && `(${disabledOptionText})`
3360
+ ]
3361
+ },
3362
+ index
3363
+ ))
3364
+ ]
3365
+ }
3366
+ ),
3367
+ /* @__PURE__ */ jsx(
3368
+ ErrorMessage,
3369
+ {
3370
+ name,
3371
+ className: "text-red-500 text-sm mt-1",
3372
+ component: "div"
3373
+ }
3374
+ )
3375
+ ] });
3376
+ };
3377
+ var FormikInput = (_a) => {
3378
+ var _b = _a, {
3379
+ label,
3380
+ name,
3381
+ type,
3382
+ placeholder,
3383
+ className,
3384
+ labelClassName,
3385
+ readOnly,
3386
+ divClasses,
3387
+ length,
3388
+ disable,
3389
+ min = 0,
3390
+ max,
3391
+ convertToText = false,
3392
+ enableRedAsterick = false,
3393
+ case_sensitivity = "normal"
3394
+ } = _b, props = __objRest(_b, [
3395
+ "label",
3396
+ "name",
3397
+ "type",
3398
+ "placeholder",
3399
+ "className",
3400
+ "labelClassName",
3401
+ "readOnly",
3402
+ "divClasses",
3403
+ "length",
3404
+ "disable",
3405
+ "min",
3406
+ "max",
3407
+ "convertToText",
3408
+ "enableRedAsterick",
3409
+ "case_sensitivity"
3410
+ ]);
3411
+ const { setFieldValue } = useFormikContext();
3412
+ const handleCaseChange = (e) => {
3413
+ let value = e.target.value;
3414
+ if (type === "number" && min !== void 0) {
3415
+ if (value !== "" && Number(value) < min) return;
3416
+ }
3417
+ switch (case_sensitivity) {
3418
+ case "lowercase":
3419
+ value = value.toLowerCase();
3420
+ break;
3421
+ case "uppercase":
3422
+ value = value.toUpperCase();
3423
+ break;
3424
+ }
3425
+ setFieldValue(name, value);
3426
+ };
3427
+ return /* @__PURE__ */ jsxs("div", { className: `w-full ${divClasses}`, children: [
3428
+ /* @__PURE__ */ jsxs(
3429
+ "label",
3430
+ {
3431
+ className: `${labelClassName} mb-1.5 text-sm font-medium text-slate-700 capitalize flex`,
3432
+ children: [
3433
+ label,
3434
+ enableRedAsterick && /* @__PURE__ */ jsx(AsteriskIcon, { className: "size-3 text-red-500" })
3435
+ ]
3436
+ }
3437
+ ),
3438
+ /* @__PURE__ */ jsx(
3439
+ Field,
3440
+ __spreadProps(__spreadValues({
3441
+ name,
3442
+ placeholder,
3443
+ readOnly,
3444
+ type,
3445
+ maxLength: length,
3446
+ disabled: disable,
3447
+ max,
3448
+ min,
3449
+ onChange: handleCaseChange
3450
+ }, props), {
3451
+ className: `${className} rounded-[2.5rem] block w-full px-3 py-2.5 text-slate-700 placeholder-slate-400 placeholder:capitalize bg-white border border-slate-300/80 focus:border-blumine-500 focus:ring-2 focus:ring-blumine-500/50 focus:outline-none transition-all disabled:opacity-70`
3452
+ })
3453
+ ),
3454
+ /* @__PURE__ */ jsx(
3455
+ ErrorMessage,
3456
+ {
3457
+ name,
3458
+ className: "text-red-500 text-sm mt-1",
3459
+ component: "div"
3460
+ }
3461
+ )
3462
+ ] });
3463
+ };
3464
+ var FormikTextarea = ({
3465
+ label,
3466
+ name,
3467
+ placeholder,
3468
+ readOnly,
3469
+ divClasses = "",
3470
+ className = "",
3471
+ length,
3472
+ disable,
3473
+ min,
3474
+ max,
3475
+ enableRedAsterick = false
3476
+ }) => {
3477
+ return /* @__PURE__ */ jsxs("div", { className: `w-full ${divClasses}`, children: [
3478
+ /* @__PURE__ */ jsxs(
3479
+ "label",
3480
+ {
3481
+ className: `mb-1.5 text-sm font-medium text-slate-700 capitalize flex`,
3482
+ children: [
3483
+ label,
3484
+ enableRedAsterick && /* @__PURE__ */ jsx(AsteriskIcon, { className: "size-3 text-red-500" })
3485
+ ]
3486
+ }
3487
+ ),
3488
+ /* @__PURE__ */ jsx(
3489
+ Field,
3490
+ {
3491
+ as: "textarea",
3492
+ name,
3493
+ placeholder,
3494
+ readOnly,
3495
+ maxLength: length,
3496
+ disabled: disable,
3497
+ max,
3498
+ min,
3499
+ className: `${className} block w-full px-4 py-3 text-slate-700 placeholder-slate-400 placeholder:capitalize bg-white border border-slate-300/80 rounded-2xl focus:border-blumine-500 focus:ring-2 focus:ring-blumine-500/50 focus:outline-none transition-all disabled:opacity-70`
3500
+ }
3501
+ ),
3502
+ /* @__PURE__ */ jsx(
3503
+ ErrorMessage,
3504
+ {
3505
+ name,
3506
+ className: "text-red-500 text-sm mt-1",
3507
+ component: "div"
3508
+ }
3509
+ )
3510
+ ] });
3511
+ };
3512
+ var Switch = ({
3513
+ isOn,
3514
+ handleToggle,
3515
+ activeColor = "bg-green-500",
3516
+ inactiveColor = "bg-gray-300",
3517
+ size = "medium",
3518
+ onLabel,
3519
+ offLabel,
3520
+ label,
3521
+ divClasses,
3522
+ labelClasses,
3523
+ disable = false
3524
+ }) => {
3525
+ const sizeClasses = {
3526
+ small: { width: 28, height: 18, handle: 12, labelSize: 12, gap: 4 },
3527
+ medium: { width: 48, height: 28, handle: 20, labelSize: 16, gap: 6 },
3528
+ large: { width: 64, height: 36, handle: 28, labelSize: 20, gap: 10 }
3529
+ };
3530
+ const selectedSize = sizeClasses[size] || sizeClasses.medium;
3531
+ return /* @__PURE__ */ jsxs("div", { className: `w-full ${divClasses}`, children: [
3532
+ label && /* @__PURE__ */ jsx(
3533
+ "label",
3534
+ {
3535
+ className: `block mb-2 text-sm text-gray-600 ${disable && "text-gray-400!"} ${labelClasses}`,
3536
+ children: label
3537
+ }
3538
+ ),
3539
+ /* @__PURE__ */ jsxs("div", { style: { gap: selectedSize.gap }, className: "flex items-center", children: [
3540
+ /* @__PURE__ */ jsx(
3541
+ "div",
3542
+ {
3543
+ className: `flex items-center rounded-full cursor-pointer relative ${isOn ? activeColor : inactiveColor} ${disable && "opacity-50 cursor-not-allowed"}`,
3544
+ onClick: disable ? () => {
3545
+ } : handleToggle,
3546
+ role: "button",
3547
+ "aria-pressed": isOn,
3548
+ style: {
3549
+ width: selectedSize.width,
3550
+ height: selectedSize.height
3551
+ },
3552
+ children: /* @__PURE__ */ jsx(
3553
+ "div",
3554
+ {
3555
+ className: "bg-white rounded-full shadow-sm ease-in duration-200",
3556
+ style: {
3557
+ width: selectedSize.handle,
3558
+ height: selectedSize.handle,
3559
+ transform: `translateX(${isOn ? selectedSize.width - selectedSize.handle - 3 : 3}px)`,
3560
+ transition: "transform 0.2s ease-in-out"
3561
+ }
3562
+ }
3563
+ )
3564
+ }
3565
+ ),
3566
+ onLabel && offLabel && /* @__PURE__ */ jsx("span", { style: { fontSize: selectedSize.labelSize }, children: isOn ? onLabel : offLabel })
3567
+ ] })
3568
+ ] });
3569
+ };
3570
+ var MultiSelect = ({
3571
+ label,
3572
+ options,
3573
+ value,
3574
+ onChange,
3575
+ placeholder = "Select options...",
3576
+ valueProperty = "name",
3577
+ labelProperty = "name",
3578
+ divClasses = "",
3579
+ returnObjects = false
3580
+ }) => {
3581
+ const [isOpen, setIsOpen] = React4.useState(false);
3582
+ const containerRef = React4.useRef(null);
3583
+ const isSelected = (optionValue) => {
3584
+ return value.some(
3585
+ (v) => typeof v === "object" && v !== null ? v[valueProperty] === optionValue : v === optionValue
3586
+ );
3587
+ };
3588
+ const toggleOption = (optionValue) => {
3589
+ let newValues;
3590
+ if (isSelected(optionValue)) {
3591
+ newValues = value.filter(
3592
+ (v) => typeof v === "object" && v !== null ? v[valueProperty] !== optionValue : v !== optionValue
3593
+ );
3594
+ } else {
3595
+ const newValue = returnObjects ? options.find((opt) => opt[valueProperty] === optionValue) : optionValue;
3596
+ newValues = [...value, newValue];
3597
+ }
3598
+ onChange(newValues);
3599
+ };
3600
+ const removeOption = (e, optionValue) => {
3601
+ e.stopPropagation();
3602
+ const newValues = value.filter(
3603
+ (v) => typeof v === "object" && v !== null ? v[valueProperty] !== optionValue : v !== optionValue
3604
+ );
3605
+ onChange(newValues);
3606
+ };
3607
+ React4.useEffect(() => {
3608
+ const handleClickOutside = (event) => {
3609
+ if (containerRef.current && !containerRef.current.contains(event.target)) {
3610
+ setIsOpen(false);
3611
+ }
3612
+ };
3613
+ document.addEventListener("mousedown", handleClickOutside);
3614
+ return () => document.removeEventListener("mousedown", handleClickOutside);
3615
+ }, []);
3616
+ return /* @__PURE__ */ jsxs("div", { className: `w-full relative ${divClasses}`, ref: containerRef, children: [
3617
+ label && /* @__PURE__ */ jsx("label", { className: "mb-1.5 text-xs font-bold text-slate-600 ml-1 uppercase tracking-wider", children: label }),
3618
+ /* @__PURE__ */ jsx(
3619
+ "div",
3620
+ {
3621
+ onClick: () => setIsOpen(!isOpen),
3622
+ className: `min-h-[40px] w-full px-3 py-1.5 bg-slate-50/50 border border-slate-200/80 rounded-xl transition-all cursor-pointer flex flex-wrap gap-1.5 items-center ${isOpen ? "border-blumine-500 bg-white shadow-sm ring-2 ring-blumine-500/10" : "hover:border-slate-300"}`,
3623
+ children: value.length === 0 ? /* @__PURE__ */ jsx("span", { className: "text-slate-400 text-[13px] ml-1", children: placeholder }) : value.map((val) => {
3624
+ const actualValue = typeof val === "object" && val !== null ? val[valueProperty] : val;
3625
+ const option = options.find(
3626
+ (opt) => opt[valueProperty] === actualValue
3627
+ );
3628
+ return /* @__PURE__ */ jsxs(
3629
+ "div",
3630
+ {
3631
+ className: "flex items-center gap-1 bg-white text-slate-700 px-2 py-0.5 rounded-lg border border-slate-200 text-[11px] font-bold shadow-sm animate-in zoom-in-95 duration-150",
3632
+ children: [
3633
+ option ? option[labelProperty] : actualValue,
3634
+ /* @__PURE__ */ jsx(
3635
+ "button",
3636
+ {
3637
+ type: "button",
3638
+ onClick: (e) => removeOption(e, actualValue),
3639
+ className: "hover:text-red-500 transition-colors ml-0.5",
3640
+ children: "\xD7"
3641
+ }
3642
+ )
3643
+ ]
3644
+ },
3645
+ actualValue
3646
+ );
3647
+ })
3648
+ }
3649
+ ),
3650
+ isOpen && /* @__PURE__ */ jsx("div", { className: "absolute z-[110] w-full mt-1.5 bg-white border border-slate-200 rounded-xl shadow-xl max-h-48 overflow-y-auto animate-in fade-in slide-in-from-top-1 duration-200 custom-scrollbar", children: /* @__PURE__ */ jsx("div", { className: "p-1", children: options.filter((opt) => !isSelected(opt[valueProperty])).length > 0 ? options.filter((opt) => !isSelected(opt[valueProperty])).map((option, index) => {
3651
+ return /* @__PURE__ */ jsx(
3652
+ "div",
3653
+ {
3654
+ onClick: () => toggleOption(option[valueProperty]),
3655
+ className: "px-3 py-2 text-[12px] rounded-lg cursor-pointer transition-colors flex items-center justify-between text-slate-600 hover:bg-slate-50",
3656
+ children: option[labelProperty]
3657
+ },
3658
+ index
3659
+ );
3660
+ }) : /* @__PURE__ */ jsx("div", { className: "px-3 py-3 text-[10px] text-slate-400 text-center font-bold uppercase tracking-wider", children: "All selected" }) }) })
3661
+ ] });
3662
+ };
3301
3663
  function ScriptBreakdownSceneView({
3302
3664
  blocks,
3303
3665
  characters,
@@ -3321,7 +3683,7 @@ function ScriptBreakdownSceneView({
3321
3683
  }) {
3322
3684
  const [expandedCategories, setExpandedCategories] = useState({});
3323
3685
  const [editingTagData, setEditingTagData] = useState(null);
3324
- const [tagForm, setTagForm] = useState({ quantity: 1, look: "", age: "" });
3686
+ const [tagForm, setTagForm] = useState({ quantity: 1, look: "", age: "", age_range: [], crowd_type: [] });
3325
3687
  const [popupPlacement, setPopupPlacement] = useState({
3326
3688
  alignRight: false,
3327
3689
  alignBottom: false
@@ -3682,7 +4044,7 @@ function ScriptBreakdownSceneView({
3682
4044
  title: tag.name,
3683
4045
  onClick: (e) => {
3684
4046
  e.stopPropagation();
3685
- if (cat.id !== "PROP" && cat.id !== "SET_PROP" && cat.id !== "CAST")
4047
+ if (cat.id !== "PROP" && cat.id !== "SET_PROP" && cat.id !== "CAST" && cat.id !== "EXTRA")
3686
4048
  return;
3687
4049
  if ((editingTagData == null ? void 0 : editingTagData.tag.id) === tag.id) {
3688
4050
  setEditingTagData(null);
@@ -3695,7 +4057,9 @@ function ScriptBreakdownSceneView({
3695
4057
  setTagForm({
3696
4058
  quantity: tag.quantity || 1,
3697
4059
  look: tag.look || "",
3698
- age: tag.age || ""
4060
+ age: tag.age || "",
4061
+ age_range: tag.age_range || [],
4062
+ crowd_type: tag.crowd_type || []
3699
4063
  });
3700
4064
  setEditingTagData({
3701
4065
  tag,
@@ -3705,7 +4069,7 @@ function ScriptBreakdownSceneView({
3705
4069
  });
3706
4070
  }
3707
4071
  },
3708
- className: `inline-block max-w-full truncate text-[11px] font-semibold px-3 py-1.5 rounded-full border backdrop-blur-md transition-all duration-300 ${cat.id === "PROP" || cat.id === "SET_PROP" || cat.id === "CAST" ? "cursor-pointer hover:scale-105 shadow-sm" : ""}`,
4072
+ className: `inline-block max-w-full truncate text-[11px] font-semibold px-3 py-1.5 rounded-full border backdrop-blur-md transition-all duration-300 cursor-pointer! ${cat.id === "PROP" || cat.id === "SET_PROP" || cat.id === "CAST" ? "cursor-pointer hover:scale-105 shadow-sm" : ""}`,
3709
4073
  style: {
3710
4074
  color: cat.color,
3711
4075
  background: `linear-gradient(145deg, ${cat.color}18, rgba(255,255,255,0.88))`,
@@ -3829,13 +4193,38 @@ function ScriptBreakdownSceneView({
3829
4193
  )
3830
4194
  ] })
3831
4195
  ] }),
4196
+ editingTagData.catId === "EXTRA" && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
4197
+ /* @__PURE__ */ jsx(
4198
+ MultiSelect,
4199
+ {
4200
+ label: "Age Range",
4201
+ options: crowdAgeOption,
4202
+ value: tagForm.age_range,
4203
+ returnObjects: true,
4204
+ onChange: (val) => setTagForm((prev) => __spreadProps(__spreadValues({}, prev), { age_range: val }))
4205
+ }
4206
+ ),
4207
+ /* @__PURE__ */ jsx(
4208
+ MultiSelect,
4209
+ {
4210
+ label: "Crowd Type",
4211
+ options: crowdTypeOption,
4212
+ value: tagForm.crowd_type,
4213
+ returnObjects: true,
4214
+ onChange: (val) => setTagForm((prev) => __spreadProps(__spreadValues({}, prev), { crowd_type: val }))
4215
+ }
4216
+ )
4217
+ ] }),
3832
4218
  /* @__PURE__ */ jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsx(
3833
4219
  "button",
3834
4220
  {
3835
4221
  onClick: (e) => {
3836
4222
  e.stopPropagation();
3837
4223
  if (editingTagData.tag.id) {
3838
- updateTag == null ? void 0 : updateTag(editingTagData.tag.id, editingTagData.catId, __spreadValues(__spreadValues({}, editingTagData.catId === "PROP" || editingTagData.catId === "SET_PROP" ? { quantity: tagForm.quantity } : {}), editingTagData.catId === "CAST" ? { look: tagForm.look, age: tagForm.age } : {}));
4224
+ updateTag == null ? void 0 : updateTag(editingTagData.tag.id, editingTagData.catId, __spreadValues(__spreadValues(__spreadValues({}, editingTagData.catId === "PROP" || editingTagData.catId === "SET_PROP" ? { quantity: tagForm.quantity } : {}), editingTagData.catId === "CAST" ? { look: tagForm.look, age: tagForm.age } : {}), editingTagData.catId === "EXTRA" ? {
4225
+ age_range: tagForm.age_range,
4226
+ crowd_type: tagForm.crowd_type
4227
+ } : {}));
3839
4228
  }
3840
4229
  setEditingTagData(null);
3841
4230
  },
@@ -4376,196 +4765,6 @@ function ModalLayout({
4376
4765
  );
4377
4766
  }
4378
4767
  var modal_layout_default = ModalLayout;
4379
- var FormikSelect = ({
4380
- label,
4381
- name,
4382
- selectedOption,
4383
- optionData,
4384
- value,
4385
- disable,
4386
- divClasses,
4387
- valueProperty = "name",
4388
- labelProperty = "name",
4389
- label2propery,
4390
- brackets,
4391
- className,
4392
- enableRedAsterick = false,
4393
- disableOptionProperty = "disable",
4394
- disabledOptionText = "",
4395
- onChange
4396
- }) => {
4397
- return /* @__PURE__ */ jsxs("div", { className: `w-full ${divClasses}`, children: [
4398
- label && /* @__PURE__ */ jsxs("label", { className: `mb-1.5 text-sm font-medium text-slate-700 capitalize flex`, children: [
4399
- label,
4400
- enableRedAsterick && /* @__PURE__ */ jsx(AsteriskIcon, { className: "size-3 text-red-500" })
4401
- ] }),
4402
- /* @__PURE__ */ jsxs(
4403
- Field,
4404
- {
4405
- name,
4406
- as: "select",
4407
- value,
4408
- disabled: disable,
4409
- onChange,
4410
- className: `${className} rounded-[2.5rem] block w-full px-3 py-2.5 text-slate-700 placeholder-slate-400 placeholder:capitalize bg-white border border-slate-300/80 focus:border-blumine-500 focus:ring-2 focus:ring-blumine-500/50 focus:outline-none transition-all`,
4411
- children: [
4412
- /* @__PURE__ */ jsx("option", { selected: true, value: "", disabled: true, className: "capitalize", children: selectedOption }),
4413
- optionData == null ? void 0 : optionData.map((option, index) => /* @__PURE__ */ jsxs(
4414
- "option",
4415
- {
4416
- value: option[valueProperty],
4417
- disabled: option[disableOptionProperty],
4418
- children: [
4419
- option[labelProperty],
4420
- label2propery ? brackets ? ` (${option[label2propery]})` : option[label2propery] : "",
4421
- " ",
4422
- option[disableOptionProperty] && `(${disabledOptionText})`
4423
- ]
4424
- },
4425
- index
4426
- ))
4427
- ]
4428
- }
4429
- ),
4430
- /* @__PURE__ */ jsx(
4431
- ErrorMessage,
4432
- {
4433
- name,
4434
- className: "text-red-500 text-sm mt-1",
4435
- component: "div"
4436
- }
4437
- )
4438
- ] });
4439
- };
4440
- var FormikInput = (_a) => {
4441
- var _b = _a, {
4442
- label,
4443
- name,
4444
- type,
4445
- placeholder,
4446
- className,
4447
- labelClassName,
4448
- readOnly,
4449
- divClasses,
4450
- length,
4451
- disable,
4452
- min = 0,
4453
- max,
4454
- convertToText = false,
4455
- enableRedAsterick = false,
4456
- case_sensitivity = "normal"
4457
- } = _b, props = __objRest(_b, [
4458
- "label",
4459
- "name",
4460
- "type",
4461
- "placeholder",
4462
- "className",
4463
- "labelClassName",
4464
- "readOnly",
4465
- "divClasses",
4466
- "length",
4467
- "disable",
4468
- "min",
4469
- "max",
4470
- "convertToText",
4471
- "enableRedAsterick",
4472
- "case_sensitivity"
4473
- ]);
4474
- const { setFieldValue } = useFormikContext();
4475
- const handleCaseChange = (e) => {
4476
- let value = e.target.value;
4477
- if (type === "number" && min !== void 0) {
4478
- if (value !== "" && Number(value) < min) return;
4479
- }
4480
- switch (case_sensitivity) {
4481
- case "lowercase":
4482
- value = value.toLowerCase();
4483
- break;
4484
- case "uppercase":
4485
- value = value.toUpperCase();
4486
- break;
4487
- }
4488
- setFieldValue(name, value);
4489
- };
4490
- return /* @__PURE__ */ jsxs("div", { className: `w-full ${divClasses}`, children: [
4491
- /* @__PURE__ */ jsxs(
4492
- "label",
4493
- {
4494
- className: `${labelClassName} mb-1.5 text-sm font-medium text-slate-700 capitalize flex`,
4495
- children: [
4496
- label,
4497
- enableRedAsterick && /* @__PURE__ */ jsx(AsteriskIcon, { className: "size-3 text-red-500" })
4498
- ]
4499
- }
4500
- ),
4501
- /* @__PURE__ */ jsx(
4502
- Field,
4503
- __spreadProps(__spreadValues({
4504
- name,
4505
- placeholder,
4506
- readOnly,
4507
- type,
4508
- maxLength: length,
4509
- disabled: disable,
4510
- max,
4511
- min,
4512
- onChange: handleCaseChange
4513
- }, props), {
4514
- className: `${className} rounded-[2.5rem] block w-full px-3 py-2.5 text-slate-700 placeholder-slate-400 placeholder:capitalize bg-white border border-slate-300/80 focus:border-blumine-500 focus:ring-2 focus:ring-blumine-500/50 focus:outline-none transition-all disabled:opacity-70`
4515
- })
4516
- ),
4517
- /* @__PURE__ */ jsx(
4518
- ErrorMessage,
4519
- {
4520
- name,
4521
- className: "text-red-500 text-sm mt-1",
4522
- component: "div"
4523
- }
4524
- )
4525
- ] });
4526
- };
4527
- var FormikTextarea = ({
4528
- label,
4529
- name,
4530
- placeholder,
4531
- readOnly,
4532
- divClasses = "",
4533
- className = "",
4534
- length,
4535
- disable,
4536
- min,
4537
- max,
4538
- enableRedAsterick = false
4539
- }) => {
4540
- return /* @__PURE__ */ jsxs("div", { className: `w-full ${divClasses}`, children: [
4541
- /* @__PURE__ */ jsxs("label", { className: `mb-1.5 text-sm font-medium text-slate-700 capitalize flex`, children: [
4542
- label,
4543
- enableRedAsterick && /* @__PURE__ */ jsx(AsteriskIcon, { className: "size-3 text-red-500" })
4544
- ] }),
4545
- /* @__PURE__ */ jsx(
4546
- Field,
4547
- {
4548
- as: "textarea",
4549
- name,
4550
- placeholder,
4551
- readOnly,
4552
- maxLength: length,
4553
- disabled: disable,
4554
- max,
4555
- min,
4556
- className: `${className} block w-full px-4 py-3 text-slate-700 placeholder-slate-400 placeholder:capitalize bg-white border border-slate-300/80 rounded-2xl focus:border-blumine-500 focus:ring-2 focus:ring-blumine-500/50 focus:outline-none transition-all disabled:opacity-70`
4557
- }
4558
- ),
4559
- /* @__PURE__ */ jsx(
4560
- ErrorMessage,
4561
- {
4562
- name,
4563
- className: "text-red-500 text-sm mt-1",
4564
- component: "div"
4565
- }
4566
- )
4567
- ] });
4568
- };
4569
4768
 
4570
4769
  // data/shot-data.ts
4571
4770
  var shot_types = [
@@ -5326,22 +5525,32 @@ var ProductionSetupModal = ({
5326
5525
  initialValues
5327
5526
  }) => {
5328
5527
  return /* @__PURE__ */ jsx("div", { className: "min-h-[80vh] flex items-center justify-center px-6", children: /* @__PURE__ */ jsxs("div", { className: "w-full max-w-lg", children: [
5329
- /* @__PURE__ */ jsxs("div", { className: "mb-8 text-center", children: [
5528
+ /* @__PURE__ */ jsxs("div", { className: "my-8 text-center", children: [
5330
5529
  /* @__PURE__ */ jsx("h1", { className: "text-2xl md:text-3xl font-semibold text-slate-900 tracking-tight", children: "Production Setup for this Scene" }),
5331
5530
  /* @__PURE__ */ jsx("p", { className: "text-sm text-slate-500 mt-2", children: "Configure your scene and camera setup to get started" })
5332
5531
  ] }),
5333
5532
  /* @__PURE__ */ jsx("div", { className: "p-6 md:p-8", children: /* @__PURE__ */ jsx(
5334
5533
  Formik,
5335
5534
  {
5336
- initialValues: initialValues || { numCameras: 1, scene_type: "" },
5535
+ initialValues: initialValues || {
5536
+ numCameras: 1,
5537
+ scene_type: "",
5538
+ dance_choreographer_required: false,
5539
+ action_sequence_required: false
5540
+ },
5337
5541
  validationSchema: Yup.object({
5338
5542
  numCameras: Yup.number().min(1, "Must be at least 1").max(20, "Cannot add more than 20 cameras").required("Number of cameras is required"),
5339
5543
  scene_type: Yup.string().required("Scene type is required")
5340
5544
  }),
5341
5545
  onSubmit: async (values) => {
5342
- await initializeProduction(values.numCameras, values.scene_type);
5546
+ await initializeProduction(
5547
+ values.numCameras,
5548
+ values.scene_type,
5549
+ values.dance_choreographer_required,
5550
+ values.action_sequence_required
5551
+ );
5343
5552
  },
5344
- children: ({ isSubmitting, setFieldValue }) => /* @__PURE__ */ jsxs(Form, { className: "flex flex-col gap-6", children: [
5553
+ children: ({ isSubmitting, setFieldValue, values }) => /* @__PURE__ */ jsxs(Form, { className: "flex flex-col gap-6", children: [
5345
5554
  /* @__PURE__ */ jsxs("div", { className: "grid gap-5", children: [
5346
5555
  /* @__PURE__ */ jsx(
5347
5556
  FormikSelect,
@@ -5364,7 +5573,65 @@ var ProductionSetupModal = ({
5364
5573
  max: 20,
5365
5574
  enableRedAsterick: true
5366
5575
  }
5367
- )
5576
+ ),
5577
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
5578
+ /* @__PURE__ */ jsx(
5579
+ "div",
5580
+ {
5581
+ className: `relative p-5 rounded-3xl border transition-all duration-300 flex flex-col gap-4 group cursor-pointer ${values.dance_choreographer_required ? "bg-blumine-50/30 border-blumine-200 shadow-sm" : "bg-slate-50/50 border-slate-100 hover:border-slate-200"}`,
5582
+ onClick: () => setFieldValue(
5583
+ "dance_choreographer_required",
5584
+ !values.dance_choreographer_required
5585
+ ),
5586
+ children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full", children: [
5587
+ /* @__PURE__ */ jsxs("div", { children: [
5588
+ /* @__PURE__ */ jsx("p", { className: "text-[15px] font-bold text-slate-800", children: "Dance Sequence" }),
5589
+ /* @__PURE__ */ jsx("p", { className: "text-[11px] text-slate-500 font-medium mt-0.5", children: "Choreography needed" })
5590
+ ] }),
5591
+ /* @__PURE__ */ jsx(
5592
+ Switch,
5593
+ {
5594
+ isOn: values.dance_choreographer_required || false,
5595
+ handleToggle: () => setFieldValue(
5596
+ "dance_choreographer_required",
5597
+ !values.dance_choreographer_required
5598
+ ),
5599
+ activeColor: "bg-blumine-600",
5600
+ divClasses: "w-fit!"
5601
+ }
5602
+ )
5603
+ ] })
5604
+ }
5605
+ ),
5606
+ /* @__PURE__ */ jsx(
5607
+ "div",
5608
+ {
5609
+ className: `relative p-5 rounded-3xl border transition-all duration-300 flex flex-col gap-4 group cursor-pointer ${values.action_sequence_required ? "bg-rose-50/30 border-rose-200 shadow-sm" : "bg-slate-50/50 border-slate-100 hover:border-slate-200"}`,
5610
+ onClick: () => setFieldValue(
5611
+ "action_sequence_required",
5612
+ !values.action_sequence_required
5613
+ ),
5614
+ children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full", children: [
5615
+ /* @__PURE__ */ jsxs("div", { children: [
5616
+ /* @__PURE__ */ jsx("p", { className: "text-[15px] font-bold text-slate-800", children: "Action Sequence" }),
5617
+ /* @__PURE__ */ jsx("p", { className: "text-[11px] text-slate-500 font-medium mt-0.5", children: "Stunt & combat logic" })
5618
+ ] }),
5619
+ /* @__PURE__ */ jsx(
5620
+ Switch,
5621
+ {
5622
+ isOn: values.action_sequence_required || false,
5623
+ handleToggle: () => setFieldValue(
5624
+ "action_sequence_required",
5625
+ !values.action_sequence_required
5626
+ ),
5627
+ activeColor: "bg-rose-500",
5628
+ divClasses: "w-fit!"
5629
+ }
5630
+ )
5631
+ ] })
5632
+ }
5633
+ )
5634
+ ] })
5368
5635
  ] }),
5369
5636
  /* @__PURE__ */ jsxs("div", { className: "flex gap-3 bg-slate-50 border border-slate-100 p-4 rounded-xl", children: [
5370
5637
  /* @__PURE__ */ jsx(Info, { className: "w-5 h-5 text-slate-400 shrink-0 mt-0.5" }),
@@ -5906,14 +6173,21 @@ function ShotBreakdownView({
5906
6173
  children: /* @__PURE__ */ jsx(
5907
6174
  production_setup_modal_default,
5908
6175
  {
5909
- initializeProduction: (count, type) => {
5910
- initializeProduction(count, type).then(() => {
6176
+ initializeProduction: (count, type, dance_choreographer_required, action_sequence_required) => {
6177
+ initializeProduction(
6178
+ count,
6179
+ type,
6180
+ dance_choreographer_required,
6181
+ action_sequence_required
6182
+ ).then(() => {
5911
6183
  setIsInitModalOpen(false);
5912
6184
  });
5913
6185
  },
5914
6186
  initialValues: {
5915
6187
  numCameras: cameras.length || 1,
5916
- scene_type: sceneType
6188
+ scene_type: sceneType,
6189
+ dance_choreographer_required: false,
6190
+ action_sequence_required: false
5917
6191
  }
5918
6192
  }
5919
6193
  )
@@ -6129,13 +6403,19 @@ function useShotBreakdownScene(options) {
6129
6403
  });
6130
6404
  }
6131
6405
  };
6132
- const initializeProduction = async (count, type) => {
6406
+ const initializeProduction = async (count, type, dance_choreographer_required, action_sequence_required) => {
6133
6407
  var _a;
6134
6408
  const newCameras = [];
6135
6409
  for (let i = 1; i <= count; i++) {
6136
6410
  newCameras.push({ name: `Camera ${String.fromCharCode(64 + i)}` });
6137
6411
  }
6138
- const result = (_a = options.onProductionInitialized) == null ? void 0 : _a.call(options, newCameras, type);
6412
+ const result = (_a = options.onProductionInitialized) == null ? void 0 : _a.call(
6413
+ options,
6414
+ newCameras,
6415
+ type,
6416
+ dance_choreographer_required,
6417
+ action_sequence_required
6418
+ );
6139
6419
  if (result instanceof Promise) {
6140
6420
  setCameras(newCameras);
6141
6421
  setSceneType(type);