tinacms 2.9.0 → 2.9.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.
Files changed (28) hide show
  1. package/dist/index.js +367 -158
  2. package/dist/index.mjs +368 -159
  3. package/dist/rich-text/index.d.ts +6 -0
  4. package/dist/rich-text/index.js +8 -1
  5. package/dist/rich-text/index.mjs +8 -1
  6. package/dist/rich-text/static.d.ts +6 -0
  7. package/dist/rich-text/static.js +8 -1
  8. package/dist/rich-text/static.mjs +8 -1
  9. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/blockquote-element.d.ts +1 -1
  10. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/button.d.ts +2 -2
  11. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block/code-block-element.d.ts +1 -1
  12. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-line-element.d.ts +1 -1
  13. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/list-element.d.ts +2 -2
  14. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/paragraph-element.d.ts +1 -1
  15. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/slash-input-element.d.ts +1 -1
  16. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-cell-element.d.ts +2 -2
  17. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-element.d.ts +1 -1
  18. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-row-element.d.ts +1 -1
  19. package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +18 -18
  20. package/dist/toolkit/form-builder/form-builder.d.ts +2 -1
  21. package/dist/toolkit/icons/TinaExtended.d.ts +4 -0
  22. package/dist/toolkit/icons/index.d.ts +1 -0
  23. package/dist/toolkit/plugin-branch-switcher/branch-button.d.ts +3 -1
  24. package/dist/toolkit/react-modals/modal/modal-actions.d.ts +2 -1
  25. package/dist/toolkit/react-sidebar/components/local-warning.d.ts +3 -1
  26. package/dist/toolkit/styles/dropdown-button.d.ts +75 -0
  27. package/dist/toolkit/styles/index.d.ts +1 -0
  28. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -73,8 +73,14 @@ var __publicField = (obj, key, value) => {
73
73
  portalNode
74
74
  );
75
75
  };
76
- const ModalActions = ({ children }) => {
77
- return /* @__PURE__ */ React__namespace.createElement("div", { className: "w-full flex justify-between gap-4 items-center px-5 pb-5 rounded-b-md" }, children);
76
+ const ModalActions = ({ align = "between", children }) => {
77
+ return /* @__PURE__ */ React__namespace.createElement(
78
+ "div",
79
+ {
80
+ className: `w-full flex flex-wrap-reverse justify-${align} gap-4 items-center px-5 pb-5 rounded-b-md`
81
+ },
82
+ children
83
+ );
78
84
  };
79
85
  const ModalBody = ({ className = "", padded = false, ...props }) => /* @__PURE__ */ React.createElement(
80
86
  "div",
@@ -689,12 +695,84 @@ var __publicField = (obj, key, value) => {
689
695
  },
690
696
  /* @__PURE__ */ React__namespace.createElement("path", { d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z" })
691
697
  );
698
+ const TinaExtendedIcon = ({ ...props }) => /* @__PURE__ */ React__namespace.createElement(
699
+ "svg",
700
+ {
701
+ viewBox: "0 0 1020 254",
702
+ fill: "currentColor",
703
+ xmlns: "http://www.w3.org/2000/svg",
704
+ ...props
705
+ },
706
+ /* @__PURE__ */ React__namespace.createElement(
707
+ "path",
708
+ {
709
+ d: "M115.685 110.921C132.719 98.699 135.293 42.2913 140.63 20.6271C145.968 -1.03697 168.043 0.0618098 168.043 0.0618098C168.043 0.0618098 162.312 10.0353 164.649 17.478C166.987 24.9207 183 31.5735 183 31.5735L179.546 40.6787C179.546 40.6787 172.334 39.7562 168.043 48.3408C156.833 70.7637 176.368 136.236 176.368 136.236C176.368 136.236 145.007 180.759 145.007 214.282C145.007 235.763 155.174 253.765 155.174 253.765H140.907C140.907 253.765 119.978 228.858 115.685 216.41C111.393 203.962 113.109 191.515 113.109 191.515C113.109 191.515 90.3595 190.227 70.1863 191.515C50.0132 192.802 36.5597 210.144 34.1316 219.844C31.7036 229.544 30.6978 253.765 30.6978 253.765H19.4169C12.5507 232.576 7.09751 224.982 10.0558 214.282C18.2501 184.647 16.6405 167.839 14.7433 160.352C12.846 152.866 0 146.331 0 146.331C6.29266 133.511 16.4152 127.265 40.3455 126.708C67.9751 126.066 98.6519 123.142 115.685 110.921Z",
710
+ fill: "#EC4815"
711
+ }
712
+ ),
713
+ /* @__PURE__ */ React__namespace.createElement(
714
+ "path",
715
+ {
716
+ d: "M44.113 213.041C44.113 213.041 47.0281 240.018 62.5148 253.765H75.7865C62.5148 238.73 61.0676 199.54 61.0676 199.54C54.3171 201.738 44.9715 209.607 44.113 213.041Z",
717
+ fill: "#EC4815"
718
+ }
719
+ ),
720
+ /* @__PURE__ */ React__namespace.createElement(
721
+ "path",
722
+ {
723
+ d: "M290 124V153.6H261.6V195.6C261.6 205 265 208.6 277.2 208.6C281.4 208.6 286.6 208.2 291.6 207.8V237C286.2 238.2 277.4 239.6 266.4 239.6C231.6 239.6 225.2 219.6 225.2 204.2V153.6H207.2V124H225.2V106.2L259.6 90.4H261.6V124H290Z",
724
+ fill: "#EC4815"
725
+ }
726
+ ),
727
+ /* @__PURE__ */ React__namespace.createElement(
728
+ "path",
729
+ {
730
+ d: "M320.581 81.2H359.781V110.4H320.581V81.2ZM302.781 153.6V124H359.581V236H323.181V153.6H302.781Z",
731
+ fill: "#EC4815"
732
+ }
733
+ ),
734
+ /* @__PURE__ */ React__namespace.createElement(
735
+ "path",
736
+ {
737
+ d: "M420.022 138.8H423.622C427.222 127.6 435.022 120 457.022 120C480.022 120 497.422 131.2 497.422 158.4V236H461.022V169.2C461.022 157 454.222 151.4 443.022 151.4C430.422 151.4 423.422 157.6 423.422 172.8V236H387.022V124H420.022V138.8Z",
738
+ fill: "#EC4815"
739
+ }
740
+ ),
741
+ /* @__PURE__ */ React__namespace.createElement(
742
+ "path",
743
+ {
744
+ d: "M592.605 219H590.605C584.805 229.8 571.005 238.8 554.005 238.8C529.005 238.8 516.205 226.4 516.205 207C516.205 187.8 527.605 176.6 548.805 173.2L580.405 168.2C587.405 167 589.205 163.2 589.205 159.8V157.6C589.205 152.6 585.605 146.4 573.605 146.4C563.405 146.4 557.405 151 556.805 158.8H522.005C523.405 136.2 538.805 120 572.005 120C606.805 120 624.005 134 624.005 156.4V206.8H636.605V236H592.605V219ZM589.205 192.4V183H587.205C585.205 185.2 582.405 186.8 578.005 187.8L563.205 191.4C556.605 193 553.405 196.8 553.405 203C553.405 210.4 558.205 214.2 567.805 214.2C582.005 214.2 589.205 204.4 589.205 192.4Z",
745
+ fill: "#EC4815"
746
+ }
747
+ ),
748
+ /* @__PURE__ */ React__namespace.createElement(
749
+ "path",
750
+ {
751
+ d: "M726.356 200H747.356C743.756 227.8 728.556 240 700.956 240C666.356 240 650.756 219.6 650.756 180C650.756 145.8 662.756 120 700.956 120C732.956 120 743.556 137.2 746.356 160H725.156C723.156 145.4 716.156 136.6 700.956 136.6C680.956 136.6 671.356 149.8 671.356 180C671.356 208 679.356 223 700.956 223C715.956 223 724.156 214.6 726.356 200Z",
752
+ fill: "#EC4815"
753
+ }
754
+ ),
755
+ /* @__PURE__ */ React__namespace.createElement(
756
+ "path",
757
+ {
758
+ d: "M846.18 139.6H848.18C851.78 128 860.38 120 874.38 120C892.98 120 900.58 132.4 900.58 158.4V236H880.58V161.6C880.58 148 877.78 138.8 865.78 138.8C854.18 138.8 847.78 148.8 847.78 167.4V236H828.18V161.6C828.18 148.2 824.98 138.8 813.58 138.8C799.78 138.8 795.18 149.8 795.18 169.2V236H775.18V124H793.98V139.6H796.38C800.58 127.2 807.78 120 821.98 120C835.38 120 842.78 126.8 846.18 139.6Z",
759
+ fill: "#EC4815"
760
+ }
761
+ ),
762
+ /* @__PURE__ */ React__namespace.createElement(
763
+ "path",
764
+ {
765
+ d: "M1018.2 155H996.6C995.2 143.4 989.2 135.6 973.6 135.6C961.6 135.6 951 140.6 951 151.8C951 159.4 954.8 164.6 965.8 167.2L988.4 172.4C1009 177 1020 188 1020 205.2C1020 224.8 1007 240 975.6 240C947.8 240 931 229.6 927 205H950C953.2 219.2 961.6 224.4 976 224.4C988 224.4 999.2 220 999.2 207.2C999.2 199.6 994.4 193.8 982 190.8L955.6 184.6C940.4 181 930.6 171.2 930.6 154C930.6 134 945.8 120 974 120C1006 120 1016.4 137.8 1018.2 155Z",
766
+ fill: "#EC4815"
767
+ }
768
+ )
769
+ );
692
770
  const ModalHeader = ({ children, close: close2 }) => {
693
- return /* @__PURE__ */ React__namespace.createElement("div", { className: "h-14 flex items-center justify-between px-5 border-b border-gray-200 m-0" }, /* @__PURE__ */ React__namespace.createElement(ModalTitle, null, children), close2 && /* @__PURE__ */ React__namespace.createElement(
771
+ return /* @__PURE__ */ React__namespace.createElement("div", { className: "h-14 flex items-center px-5 border-b border-gray-200 m-0" }, /* @__PURE__ */ React__namespace.createElement(TinaIcon, { className: "w-10 h-auto -ml-1 mr-1 my-1 fill-tina-orange" }), /* @__PURE__ */ React__namespace.createElement(ModalTitle, null, children), close2 && /* @__PURE__ */ React__namespace.createElement(
694
772
  "div",
695
773
  {
696
774
  onClick: close2,
697
- className: "flex items-center fill-gray-400 cursor-pointer transition-colors duration-100 ease-out hover:fill-gray-700"
775
+ className: "ml-auto flex justify-self-end items-center fill-gray-400 cursor-pointer transition-colors duration-100 ease-out hover:fill-gray-700"
698
776
  },
699
777
  /* @__PURE__ */ React__namespace.createElement(CloseIcon, { className: "w-6 h-auto" })
700
778
  ));
@@ -36954,7 +37032,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
36954
37032
  dropdownMenuLabelVariants,
36955
37033
  ["inset"]
36956
37034
  );
36957
- const DropdownMenuSeparator = cn$2.withCn(
37035
+ const DropdownMenuSeparator$1 = cn$2.withCn(
36958
37036
  DropdownMenuPrimitive__namespace.Separator,
36959
37037
  "-mx-1 my-1 h-px bg-muted"
36960
37038
  );
@@ -38888,9 +38966,6 @@ Please wrap them with useCallback or configure the deps array correctly.`
38888
38966
  function MdOutlineClear(props) {
38889
38967
  return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "d": "M0 0h24v24H0V0z" }, "child": [] }, { "tag": "path", "attr": { "d": "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" }, "child": [] }] })(props);
38890
38968
  }
38891
- function MdOutlineSaveAlt(props) {
38892
- return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "d": "M0 0h24v24H0V0z" }, "child": [] }, { "tag": "path", "attr": { "d": "M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67 2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2v9.67z" }, "child": [] }] })(props);
38893
- }
38894
38969
  function MdOutlineCloud(props) {
38895
38970
  return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "d": "M0 0h24v24H0V0z" }, "child": [] }, { "tag": "path", "attr": { "d": "M12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11A2.98 2.98 0 0 1 22 15c0 1.65-1.35 3-3 3H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95A5.469 5.469 0 0 1 12 6m0-2C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 0 0 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96A7.49 7.49 0 0 0 12 4z" }, "child": [] }] })(props);
38896
38971
  }
@@ -39128,10 +39203,10 @@ Please wrap them with useCallback or configure the deps array correctly.`
39128
39203
  }) => {
39129
39204
  const baseClasses = "icon-parent inline-flex items-center font-medium focus:outline-none focus:ring-2 focus:shadow-outline text-center inline-flex justify-center transition-all duration-150 ease-out ";
39130
39205
  const variantClasses = {
39131
- primary: `shadow text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 border-0`,
39132
- secondary: `shadow text-gray-500 hover:text-blue-500 bg-gray-50 hover:bg-white border border-gray-100`,
39133
- white: `shadow text-gray-500 hover:text-blue-500 bg-white hover:bg-gray-50 border border-gray-100`,
39134
- ghost: `text-gray-500 hover:text-blue-500 hover:shadow border border-transparent border-0 hover:border hover:border-gray-200 bg-transparent`,
39206
+ primary: `shadow text-white bg-tina-orange-dark hover:bg-tina-orange focus:ring-tina-orange-dark border-0`,
39207
+ secondary: `shadow text-gray-500 hover:tina-orange-dark bg-gray-50 hover:bg-white border border-gray-100`,
39208
+ white: `shadow text-gray-500 hover:tina-orange-dark bg-white hover:bg-gray-50 border border-gray-100`,
39209
+ ghost: `text-gray-500 hover:tina-orange-dark hover:shadow border border-transparent border-0 hover:border hover:border-gray-200 bg-transparent`,
39135
39210
  danger: `shadow text-white bg-red-500 hover:bg-red-600 focus:ring-red-500`,
39136
39211
  accent: `shadow text-white bg-orange-500 hover:bg-orange-600 focus:ring-orange-500`,
39137
39212
  custom: ""
@@ -39181,7 +39256,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
39181
39256
  }) => {
39182
39257
  const baseClasses = "icon-parent inline-flex items-center border border-transparent text-sm font-medium focus:outline-none focus:ring-2 focus:shadow-outline text-center inline-flex justify-center transition-all duration-150 ease-out rounded-full";
39183
39258
  const variantClasses = {
39184
- primary: `shadow text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500`,
39259
+ primary: `shadow text-white bg-tina-orange-dark hover:bg-tina-orange focus:ring-tina-orange-dark`,
39185
39260
  secondary: `shadow text-gray-500 hover:text-blue-500 bg-gray-50 hover:bg-white border border-gray-200`,
39186
39261
  white: `shadow text-gray-500 hover:text-blue-500 bg-white hover:bg-gray-50 border border-gray-200`,
39187
39262
  ghost: `text-gray-500 hover:text-blue-500 hover:shadow border border-transparent hover:border-gray-200 bg-transparent`,
@@ -39267,7 +39342,8 @@ Please wrap them with useCallback or configure the deps array correctly.`
39267
39342
  },
39268
39343
  className: classNames(
39269
39344
  toolbarItem.active ? "bg-gray-50 text-blue-500" : "bg-white text-gray-600",
39270
- "hover:bg-gray-50 hover:text-blue-500 cursor-pointer pointer-events-auto px-4 py-2 text-sm w-full flex items-center whitespace-nowrap"
39345
+ "hover:bg-gray-50 hover:text-blue-500 cursor-pointer pointer-events-auto px-4 py-2 text-sm w-full flex items-center whitespace-nowrap",
39346
+ toolbarItem.className ?? ""
39271
39347
  )
39272
39348
  },
39273
39349
  /* @__PURE__ */ React.createElement("div", { className: "mr-2 opacity-80" }, toolbarItem.Icon),
@@ -39352,6 +39428,176 @@ Please wrap them with useCallback or configure the deps array correctly.`
39352
39428
  ))
39353
39429
  );
39354
39430
  };
39431
+ function cn(...inputs) {
39432
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
39433
+ }
39434
+ function DropdownMenu({
39435
+ ...props
39436
+ }) {
39437
+ return /* @__PURE__ */ React__namespace.createElement(DropdownMenuPrimitive__namespace.Root, { "data-slot": "dropdown-menu", ...props });
39438
+ }
39439
+ function DropdownMenuTrigger({
39440
+ ...props
39441
+ }) {
39442
+ return /* @__PURE__ */ React__namespace.createElement(
39443
+ DropdownMenuPrimitive__namespace.Trigger,
39444
+ {
39445
+ "data-slot": "dropdown-menu-trigger",
39446
+ ...props
39447
+ }
39448
+ );
39449
+ }
39450
+ function DropdownMenuContent({
39451
+ className,
39452
+ sideOffset = 4,
39453
+ ...props
39454
+ }) {
39455
+ return /* @__PURE__ */ React__namespace.createElement(DropdownMenuPrimitive__namespace.Portal, null, /* @__PURE__ */ React__namespace.createElement(
39456
+ DropdownMenuPrimitive__namespace.Content,
39457
+ {
39458
+ "data-slot": "dropdown-menu-content",
39459
+ sideOffset,
39460
+ className: cn(
39461
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-base max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
39462
+ className
39463
+ ),
39464
+ ...props
39465
+ }
39466
+ ));
39467
+ }
39468
+ function DropdownMenuItem({
39469
+ className,
39470
+ inset,
39471
+ variant = "default",
39472
+ ...props
39473
+ }) {
39474
+ return /* @__PURE__ */ React__namespace.createElement(
39475
+ DropdownMenuPrimitive__namespace.Item,
39476
+ {
39477
+ "data-slot": "dropdown-menu-item",
39478
+ "data-inset": inset,
39479
+ "data-variant": variant,
39480
+ className: cn(
39481
+ "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 cursor-pointer text-gray-700 hover:text-blue-500",
39482
+ className
39483
+ ),
39484
+ ...props
39485
+ }
39486
+ );
39487
+ }
39488
+ function DropdownMenuSeparator({
39489
+ className,
39490
+ ...props
39491
+ }) {
39492
+ return /* @__PURE__ */ React__namespace.createElement(
39493
+ DropdownMenuPrimitive__namespace.Separator,
39494
+ {
39495
+ "data-slot": "dropdown-menu-separator",
39496
+ className: cn("bg-border -mx-1 my-1 h-px", className),
39497
+ ...props
39498
+ }
39499
+ );
39500
+ }
39501
+ const DropdownButton = React__namespace.forwardRef(
39502
+ ({
39503
+ variant = "primary",
39504
+ size: size2 = "medium",
39505
+ busy,
39506
+ disabled,
39507
+ rounded = "full",
39508
+ children,
39509
+ className = "",
39510
+ onMainAction,
39511
+ items: items2,
39512
+ showSplitButton = true,
39513
+ ...props
39514
+ }, ref) => {
39515
+ const [open, setOpen] = React__namespace.useState(false);
39516
+ if (!onMainAction || !showSplitButton) {
39517
+ return /* @__PURE__ */ React__namespace.createElement(DropdownMenu, { open, onOpenChange: setOpen, modal: false }, /* @__PURE__ */ React__namespace.createElement(DropdownMenuTrigger, { asChild: true }, /* @__PURE__ */ React__namespace.createElement(
39518
+ Button$1,
39519
+ {
39520
+ variant,
39521
+ size: size2,
39522
+ busy,
39523
+ disabled,
39524
+ rounded,
39525
+ className: cn$1("gap-2", className),
39526
+ ...props
39527
+ },
39528
+ children,
39529
+ /* @__PURE__ */ React__namespace.createElement(
39530
+ lucideReact.ChevronDownIcon,
39531
+ {
39532
+ className: cn$1(
39533
+ "h-4 w-4 transition-transform duration-200",
39534
+ open && "rotate-180"
39535
+ )
39536
+ }
39537
+ )
39538
+ )), /* @__PURE__ */ React__namespace.createElement(DropdownMenuContent, { align: "end", side: "bottom", className: "z-[100000]" }, items2.map((item, index) => /* @__PURE__ */ React__namespace.createElement(
39539
+ DropdownMenuItem,
39540
+ {
39541
+ key: index,
39542
+ onClick: item.onClick,
39543
+ disabled: item.disabled,
39544
+ variant: item.variant
39545
+ },
39546
+ item.icon && item.icon,
39547
+ item.label
39548
+ ))));
39549
+ }
39550
+ return /* @__PURE__ */ React__namespace.createElement("div", { className: cn$1("inline-flex", className) }, /* @__PURE__ */ React__namespace.createElement(
39551
+ Button$1,
39552
+ {
39553
+ variant,
39554
+ size: size2,
39555
+ busy,
39556
+ disabled,
39557
+ rounded: "left",
39558
+ onClick: onMainAction,
39559
+ className: "border-r-0 w-full",
39560
+ ...props
39561
+ },
39562
+ children
39563
+ ), /* @__PURE__ */ React__namespace.createElement(DropdownMenu, { open, onOpenChange: setOpen }, /* @__PURE__ */ React__namespace.createElement(DropdownMenuTrigger, null, /* @__PURE__ */ React__namespace.createElement(
39564
+ Button$1,
39565
+ {
39566
+ variant,
39567
+ size: size2,
39568
+ busy,
39569
+ disabled,
39570
+ rounded: "right",
39571
+ className: "px-4 border-l",
39572
+ style: { borderColor: "#00000030" },
39573
+ "aria-label": "More options"
39574
+ },
39575
+ /* @__PURE__ */ React__namespace.createElement(
39576
+ lucideReact.ChevronDownIcon,
39577
+ {
39578
+ className: cn$1(
39579
+ "h-4 w-4 transition-transform duration-200 fill-none",
39580
+ open && "rotate-180"
39581
+ ),
39582
+ style: { fill: "none" }
39583
+ }
39584
+ )
39585
+ )), /* @__PURE__ */ React__namespace.createElement(DropdownMenuContent, { align: "end", side: "bottom" }, items2.map((item, index) => {
39586
+ var _a2;
39587
+ return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, { key: index }, /* @__PURE__ */ React__namespace.createElement(
39588
+ DropdownMenuItem,
39589
+ {
39590
+ onClick: item.onClick,
39591
+ disabled: item.disabled,
39592
+ variant: item.variant
39593
+ },
39594
+ item.icon && item.icon,
39595
+ item.label
39596
+ ), item.variant === "destructive" && index < items2.length - 1 && ((_a2 = items2[index + 1]) == null ? void 0 : _a2.variant) !== "destructive" && /* @__PURE__ */ React__namespace.createElement(DropdownMenuSeparator, null));
39597
+ }))));
39598
+ }
39599
+ );
39600
+ DropdownButton.displayName = "DropdownButton";
39355
39601
  function useCMS() {
39356
39602
  return useCMS$1();
39357
39603
  }
@@ -40342,6 +40588,18 @@ Please wrap them with useCallback or configure the deps array correctly.`
40342
40588
  name: "group",
40343
40589
  Component: Group
40344
40590
  };
40591
+ const constructUrlWithBasePath = (url, basePath) => {
40592
+ if (!url)
40593
+ return url;
40594
+ if (url.startsWith("http://") || url.startsWith("https://") || url.startsWith("//")) {
40595
+ return url;
40596
+ }
40597
+ if (basePath) {
40598
+ const cleanBasePath = basePath.replace(/^\/+|\/+$/g, "");
40599
+ return `/${cleanBasePath}/${url}`;
40600
+ }
40601
+ return url;
40602
+ };
40345
40603
  const BlockSelectorBig = ({
40346
40604
  templates,
40347
40605
  addItem,
@@ -40541,6 +40799,10 @@ Please wrap them with useCallback or configure the deps array correctly.`
40541
40799
  );
40542
40800
  };
40543
40801
  const BlockCard = ({ close: close2, name, template }) => {
40802
+ const cms = useCMS$1();
40803
+ const basePath = cms.flags.get("tina-basepath");
40804
+ const basePathStr = typeof basePath === "string" ? basePath : void 0;
40805
+ const previewSrc = template.previewSrc ? constructUrlWithBasePath(template.previewSrc, basePathStr) : void 0;
40544
40806
  return /* @__PURE__ */ React__namespace.createElement(
40545
40807
  "button",
40546
40808
  {
@@ -40551,17 +40813,17 @@ Please wrap them with useCallback or configure the deps array correctly.`
40551
40813
  close2(name, template);
40552
40814
  }
40553
40815
  },
40554
- template.previewSrc && /* @__PURE__ */ React__namespace.createElement(
40816
+ previewSrc && /* @__PURE__ */ React__namespace.createElement(
40555
40817
  "img",
40556
40818
  {
40557
- src: template.previewSrc,
40819
+ src: previewSrc,
40558
40820
  className: "w-full h-auto transition-all ease-out duration-150 group-hover:opacity-50"
40559
40821
  }
40560
40822
  ),
40561
40823
  /* @__PURE__ */ React__namespace.createElement(
40562
40824
  "span",
40563
40825
  {
40564
- className: `relative flex justify-between items-center gap-4 w-full px-4 text-left ${template.previewSrc ? `py-2 border-t border-gray-100 ` : `py-3`}`
40826
+ className: `relative flex justify-between items-center gap-4 w-full px-4 text-left ${previewSrc ? `py-2 border-t border-gray-100 ` : `py-3`}`
40565
40827
  },
40566
40828
  template.label ? template.label : name,
40567
40829
  /* @__PURE__ */ React__namespace.createElement(AddIcon, { className: "w-5 h-auto group-hover:text-blue-500 opacity-30 transition-all ease-out duration-150 group-hover:opacity-80" })
@@ -43209,7 +43471,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
43209
43471
  ...eventsToAlerts
43210
43472
  };
43211
43473
  }
43212
- add(level, message, timeout = 4e3) {
43474
+ add(level, message, timeout = 8e3) {
43213
43475
  const alert = {
43214
43476
  level,
43215
43477
  message,
@@ -44260,9 +44522,6 @@ Please wrap them with useCallback or configure the deps array correctly.`
44260
44522
  )
44261
44523
  ), description && /* @__PURE__ */ React.createElement("p", { className: "mt-2 text-sm text-gray-500" }, description));
44262
44524
  };
44263
- function cn(...inputs) {
44264
- return tailwindMerge.twMerge(clsx.clsx(inputs));
44265
- }
44266
44525
  const checkerboardStyle = {
44267
44526
  backgroundImage: "linear-gradient(45deg, #eee 25%, transparent 25%), linear-gradient(-45deg, #eee 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #eee 75%), linear-gradient(-45deg, transparent 75%, #eee 75%)",
44268
44527
  backgroundSize: "12px 12px",
@@ -44833,8 +45092,8 @@ Please wrap them with useCallback or configure the deps array correctly.`
44833
45092
  variant: "primary",
44834
45093
  onClick: () => selectMediaItem(activeItem)
44835
45094
  },
44836
- "Insert",
44837
- /* @__PURE__ */ React.createElement(BiArrowToBottom, { className: "ml-1 -mr-0.5 w-6 h-auto opacity-70" })
45095
+ /* @__PURE__ */ React.createElement(BiArrowToBottom, { className: "mr-1 -ml-0.5 w-6 h-auto opacity-70" }),
45096
+ "Insert"
44838
45097
  ), allowDelete && /* @__PURE__ */ React.createElement(
44839
45098
  Button$1,
44840
45099
  {
@@ -44842,8 +45101,8 @@ Please wrap them with useCallback or configure the deps array correctly.`
44842
45101
  size: "medium",
44843
45102
  onClick: deleteMediaItem
44844
45103
  },
44845
- "Delete",
44846
- /* @__PURE__ */ React.createElement(TrashIcon, { className: "ml-1 -mr-0.5 w-6 h-auto opacity-70" })
45104
+ /* @__PURE__ */ React.createElement(TrashIcon, { className: "mr-1 -ml-0.5 w-6 h-auto opacity-70" }),
45105
+ "Delete"
44847
45106
  ))))
44848
45107
  );
44849
45108
  };
@@ -45195,14 +45454,14 @@ Please wrap them with useCallback or configure the deps array correctly.`
45195
45454
  children
45196
45455
  );
45197
45456
  };
45198
- const LocalWarning = () => {
45457
+ const LocalWarning = ({ className = "" }) => {
45199
45458
  var _a2, _b;
45200
45459
  const cms = useCMS$1();
45201
45460
  const isLocalMode = (_b = (_a2 = cms.api) == null ? void 0 : _a2.tina) == null ? void 0 : _b.isLocalMode;
45202
45461
  if (!isLocalMode) {
45203
45462
  return null;
45204
45463
  }
45205
- return /* @__PURE__ */ React__namespace.createElement(Callout, { calloutStyle: "warning", className: "w-fit" }, /* @__PURE__ */ React__namespace.createElement("a", { href: "https://tina.io/docs/r/what-is-tinacloud/", target: "_blank" }, "You are in local mode"));
45464
+ return /* @__PURE__ */ React__namespace.createElement(Callout, { calloutStyle: "warning", className: cn("w-fit", className) }, /* @__PURE__ */ React__namespace.createElement("a", { href: "https://tina.io/docs/r/what-is-tinacloud/", target: "_blank" }, "You are in local mode"));
45206
45465
  };
45207
45466
  const BillingWarning = () => {
45208
45467
  var _a2;
@@ -45943,7 +46202,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
45943
46202
  requiredArgs(1, arguments);
45944
46203
  return formatDistance(dirtyDate, Date.now(), options);
45945
46204
  }
45946
- const version$1 = "2.9.0";
46205
+ const version$1 = "2.9.3";
45947
46206
  const VersionInfo = () => {
45948
46207
  var _a2, _b, _c, _d, _e, _f;
45949
46208
  const cms = useCMS();
@@ -46179,7 +46438,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
46179
46438
  toggleMenu();
46180
46439
  }
46181
46440
  },
46182
- /* @__PURE__ */ React__namespace.createElement(BiMenu, { className: "h-6 w-auto text-gray-600" })
46441
+ /* @__PURE__ */ React__namespace.createElement(BiMenu, { className: "h-8 w-auto text-gray-600" })
46183
46442
  )), /* @__PURE__ */ React__namespace.createElement(
46184
46443
  "div",
46185
46444
  {
@@ -46200,8 +46459,8 @@ Please wrap them with useCallback or configure the deps array correctly.`
46200
46459
  toggleMenu();
46201
46460
  }
46202
46461
  },
46203
- /* @__PURE__ */ React__namespace.createElement(BiMenu, { className: "h-6 w-auto text-gray-600" })
46204
- ), /* @__PURE__ */ React__namespace.createElement("span", { className: "text-left inline-flex items-center text-xl tracking-wide text-gray-800/80 flex-1 gap-1" }, /* @__PURE__ */ React__namespace.createElement(TinaIcon, { className: "w-10 h-auto -ml-1 fill-orange-500" }), /* @__PURE__ */ React__namespace.createElement("span", null, "TinaCMS"))),
46462
+ /* @__PURE__ */ React__namespace.createElement(BiMenu, { className: "h-8 w-auto text-gray-600" })
46463
+ ), /* @__PURE__ */ React__namespace.createElement("span", { className: "text-left inline-flex items-center text-xl tracking-wide text-gray-800/80 flex-1 gap-1" }, /* @__PURE__ */ React__namespace.createElement(TinaExtendedIcon, { className: "h-8 w-auto fill-orange-500" }))),
46205
46464
  children,
46206
46465
  /* @__PURE__ */ React__namespace.createElement("div", { className: "flex flex-col px-6 flex-1 overflow-auto" }, showCollections && /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement("h4", { className: "flex space-x-1 justify-items-start uppercase font-sans font-bold text-sm mb-3 mt-8 text-gray-700" }, /* @__PURE__ */ React__namespace.createElement("span", null, "Collections"), isLocalMode && /* @__PURE__ */ React__namespace.createElement("span", { className: "flex items-center" }, /* @__PURE__ */ React__namespace.createElement(
46207
46466
  "a",
@@ -46451,60 +46710,6 @@ Please wrap them with useCallback or configure the deps array correctly.`
46451
46710
  /* @__PURE__ */ React__namespace.createElement("span", { className: "sr-only" }, "More")
46452
46711
  );
46453
46712
  }
46454
- function DropdownMenu({
46455
- ...props
46456
- }) {
46457
- return /* @__PURE__ */ React__namespace.createElement(DropdownMenuPrimitive__namespace.Root, { "data-slot": "dropdown-menu", ...props });
46458
- }
46459
- function DropdownMenuTrigger({
46460
- ...props
46461
- }) {
46462
- return /* @__PURE__ */ React__namespace.createElement(
46463
- DropdownMenuPrimitive__namespace.Trigger,
46464
- {
46465
- "data-slot": "dropdown-menu-trigger",
46466
- ...props
46467
- }
46468
- );
46469
- }
46470
- function DropdownMenuContent({
46471
- className,
46472
- sideOffset = 4,
46473
- ...props
46474
- }) {
46475
- return /* @__PURE__ */ React__namespace.createElement(DropdownMenuPrimitive__namespace.Portal, null, /* @__PURE__ */ React__namespace.createElement(
46476
- DropdownMenuPrimitive__namespace.Content,
46477
- {
46478
- "data-slot": "dropdown-menu-content",
46479
- sideOffset,
46480
- className: cn(
46481
- "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-base max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
46482
- className
46483
- ),
46484
- ...props
46485
- }
46486
- ));
46487
- }
46488
- function DropdownMenuItem({
46489
- className,
46490
- inset,
46491
- variant = "default",
46492
- ...props
46493
- }) {
46494
- return /* @__PURE__ */ React__namespace.createElement(
46495
- DropdownMenuPrimitive__namespace.Item,
46496
- {
46497
- "data-slot": "dropdown-menu-item",
46498
- "data-inset": inset,
46499
- "data-variant": variant,
46500
- className: cn(
46501
- "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
46502
- className
46503
- ),
46504
- ...props
46505
- }
46506
- );
46507
- }
46508
46713
  const Item = ({
46509
46714
  item,
46510
46715
  depth,
@@ -46773,7 +46978,6 @@ Please wrap them with useCallback or configure the deps array correctly.`
46773
46978
  DropdownMenuItem,
46774
46979
  {
46775
46980
  key: breadcrumb.formId,
46776
- className: "cursor-pointer text-gray-700 hover:text-blue-500",
46777
46981
  onClick: (e3) => {
46778
46982
  e3.preventDefault();
46779
46983
  goBack(breadcrumb.formId, breadcrumb.formName);
@@ -47101,7 +47305,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
47101
47305
  };
47102
47306
  const SidebarHeader = ({ isLocalMode }) => {
47103
47307
  const { toggleSidebarOpen, toggleMenu } = React__namespace.useContext(SidebarContext);
47104
- return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement("div", { className: "p-2 flex-grow-0 w-full" }, !isLocalMode && /* @__PURE__ */ React__namespace.createElement(BillingWarning, null), /* @__PURE__ */ React__namespace.createElement("div", { className: "w-full flex justify-between items-center" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex" }, /* @__PURE__ */ React__namespace.createElement(
47308
+ return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement("div", { className: "p-2 flex-grow-0 w-full" }, !isLocalMode && /* @__PURE__ */ React__namespace.createElement(BillingWarning, null), /* @__PURE__ */ React__namespace.createElement("div", { className: "w-full flex justify-between items-center" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex overflow-hidden py-1" }, /* @__PURE__ */ React__namespace.createElement(
47105
47309
  "button",
47106
47310
  {
47107
47311
  className: "p-2 hover:bg-gray-100 transition-colors duration-150 ease-in-out rounded",
@@ -47109,8 +47313,8 @@ Please wrap them with useCallback or configure the deps array correctly.`
47109
47313
  title: "Open navigation menu",
47110
47314
  "aria-label": "Open navigation menu"
47111
47315
  },
47112
- /* @__PURE__ */ React__namespace.createElement(BiMenu, { className: "h-6 w-auto text-gray-600" })
47113
- ), /* @__PURE__ */ React__namespace.createElement(BranchButton, null), /* @__PURE__ */ React__namespace.createElement("div", { className: "px-4" }, /* @__PURE__ */ React__namespace.createElement(LocalWarning, null))), /* @__PURE__ */ React__namespace.createElement("div", { className: "flex" }, /* @__PURE__ */ React__namespace.createElement(BranchPreviewButton, null), /* @__PURE__ */ React__namespace.createElement(
47316
+ /* @__PURE__ */ React__namespace.createElement(BiMenu, { className: "h-8 w-auto text-gray-600" })
47317
+ ), /* @__PURE__ */ React__namespace.createElement(TinaIcon, { className: "self-center h-10 min-w-10 w-auto text-orange-500 mr-2" }), /* @__PURE__ */ React__namespace.createElement(BranchButton, { className: "overflow-hidden mr-2" }), /* @__PURE__ */ React__namespace.createElement(LocalWarning, { className: "px-4" })), /* @__PURE__ */ React__namespace.createElement("div", { className: "flex" }, /* @__PURE__ */ React__namespace.createElement(BranchPreviewButton, null), /* @__PURE__ */ React__namespace.createElement(
47114
47318
  "button",
47115
47319
  {
47116
47320
  type: "button",
@@ -47957,10 +48161,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
47957
48161
  }
47958
48162
  ))));
47959
48163
  };
47960
- const trimPrefix = (branchName) => {
47961
- return branchName.replace(/^tina\//, "");
47962
- };
47963
- const BranchButton = () => {
48164
+ const BranchButton = ({ className = "" }) => {
47964
48165
  const [open, setOpen] = React__namespace.useState(false);
47965
48166
  const { currentBranch } = useBranchData();
47966
48167
  const cms = useCMS();
@@ -47970,22 +48171,19 @@ Please wrap them with useCallback or configure the deps array correctly.`
47970
48171
  }
47971
48172
  const isProtected = cms.api.tina.usingProtectedBranch();
47972
48173
  return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(
47973
- "button",
48174
+ Button$1,
47974
48175
  {
48176
+ variant: "secondary",
48177
+ size: "custom",
47975
48178
  className: cn(
47976
- `pointer-events-auto px-3 py-3 flex shrink gap-1 items-center justify-between form-select text-sm shadow transition-color duration-150 ease-out rounded-lg`,
47977
- `focus:outline-none focus:shadow-outline-blue focus:border-blue-300 transition duration-150 ease-in-out `,
47978
- isProtected ? "text-white hover:text-blue-50 bg-blue-500 hover:bg-blue-400 border-0" : "text-gray-500 hover:text-blue-500 bg-white hover:bg-gray-50 border border-gray-100"
48179
+ "pointer-events-auto px-3 py-3 flex shrink gap-1 items-center justify-between",
48180
+ className
47979
48181
  ),
47980
- onClick: () => setOpen(true)
48182
+ onClick: () => setOpen(true),
48183
+ title: currentBranch
47981
48184
  },
47982
- isProtected ? /* @__PURE__ */ React__namespace.createElement(BiLockAlt, { className: "flex-shrink-0 h-4 w-auto opacity-70 text-white" }) : /* @__PURE__ */ React__namespace.createElement(
47983
- BiGitBranch,
47984
- {
47985
- className: `flex-shrink-0 h-4 w-auto opacity-70 text-zinc-400`
47986
- }
47987
- ),
47988
- /* @__PURE__ */ React__namespace.createElement("span", { className: "truncate max-w-full -mr-1" }, trimPrefix(currentBranch)),
48185
+ isProtected ? /* @__PURE__ */ React__namespace.createElement(BiLockAlt, { className: "flex-shrink-0 h-6 w-auto opacity-70" }) : /* @__PURE__ */ React__namespace.createElement(BiGitBranch, { className: "flex-shrink-0 h-6 w-auto opacity-70 text-zinc-400" }),
48186
+ /* @__PURE__ */ React__namespace.createElement("span", { className: "truncate max-w-full -mr-1" }, currentBranch),
47989
48187
  /* @__PURE__ */ React__namespace.createElement(
47990
48188
  BiChevronDown,
47991
48189
  {
@@ -48015,7 +48213,7 @@ Please wrap them with useCallback or configure the deps array correctly.`
48015
48213
  className: "p-2 text-gray-500 hover:text-blue-500 hover:bg-gray-100 transition-colors duration-150 ease-in-out rounded",
48016
48214
  ...props,
48017
48215
  onClick: () => {
48018
- window.open(previewUrl, "_blank");
48216
+ window.open("", "_blank");
48019
48217
  },
48020
48218
  title: "Preview site in new tab"
48021
48219
  },
@@ -63819,7 +64017,9 @@ mutation DeleteDocument($collection: String!, $relativePath: String!){
63819
64017
  const tinaApi = cms.api.tina;
63820
64018
  const { setCurrentBranch } = useBranchData();
63821
64019
  const [disabled, setDisabled] = React__namespace.useState(false);
63822
- const [newBranchName, setNewBranchName] = React__namespace.useState("");
64020
+ const [newBranchName, setNewBranchName] = React__namespace.useState(
64021
+ `${crudType}-${path2}`
64022
+ );
63823
64023
  const [isExecuting, setIsExecuting] = React__namespace.useState(false);
63824
64024
  const [errorMessage, setErrorMessage] = React__namespace.useState("");
63825
64025
  const [currentStep, setCurrentStep] = React__namespace.useState(0);
@@ -63988,13 +64188,7 @@ mutation DeleteDocument($collection: String!, $relativePath: String!){
63988
64188
  )
63989
64189
  ) : isActive ? /* @__PURE__ */ React__namespace.createElement(AiOutlineLoading, { className: "animate-spin text-lg" }) : stepNumber
63990
64190
  ),
63991
- /* @__PURE__ */ React__namespace.createElement("div", { className: "text-center max-w-24" }, /* @__PURE__ */ React__namespace.createElement(
63992
- "div",
63993
- {
63994
- className: `text-sm font-semibold leading-tight ${isActive ? "text-blue-600" : isCompleted ? "text-green-600" : "text-gray-400"}`
63995
- },
63996
- step.name
63997
- ), /* @__PURE__ */ React__namespace.createElement("div", { className: "text-xs text-gray-400 mt-1 leading-tight" }, step.description))
64191
+ /* @__PURE__ */ React__namespace.createElement("div", { className: "text-center max-w-24" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "text-sm font-semibold leading-tight" }, step.name), /* @__PURE__ */ React__namespace.createElement("div", { className: "text-xs text-gray-400 mt-1 leading-tight" }, step.description))
63998
64192
  );
63999
64193
  })), /* @__PURE__ */ React__namespace.createElement("div", { className: "flex items-center justify-between mb-4" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "text-sm font-medium text-gray-700" }, "Step ", currentStep > steps.length ? steps.length : currentStep, " of", " ", steps.length), isExecuting && currentStep > 0 && /* @__PURE__ */ React__namespace.createElement("div", { className: "flex items-center gap-1 text-sm text-gray-500" }, /* @__PURE__ */ React__namespace.createElement("svg", { className: "w-4 h-4", fill: "currentColor", viewBox: "0 0 20 20" }, /* @__PURE__ */ React__namespace.createElement(
64000
64194
  "path",
@@ -64031,9 +64225,19 @@ mutation DeleteDocument($collection: String!, $relativePath: String!){
64031
64225
  if (isExecuting) {
64032
64226
  return renderProgressIndicator();
64033
64227
  } else {
64034
- return /* @__PURE__ */ React__namespace.createElement("div", { className: "max-w-sm" }, errorMessage && /* @__PURE__ */ React__namespace.createElement("div", { className: "flex items-center gap-1 text-red-700 py-2 px-3 mb-4 bg-red-50 border border-red-200 rounded" }, /* @__PURE__ */ React__namespace.createElement(BiError, { className: "w-5 h-auto text-red-400 flex-shrink-0" }), /* @__PURE__ */ React__namespace.createElement("span", { className: "text-sm" }, /* @__PURE__ */ React__namespace.createElement("b", null, "Error:"), " ", errorMessage)), /* @__PURE__ */ React__namespace.createElement("p", { className: "text-lg text-gray-700 font-bold mb-2" }, "This content is protected 🚧"), /* @__PURE__ */ React__namespace.createElement("p", { className: "text-sm text-gray-700 mb-4 max-w-sm" }, "To make changes, you need to create a copy then get it approved and merged for it to go live."), /* @__PURE__ */ React__namespace.createElement(
64228
+ return /* @__PURE__ */ React__namespace.createElement("div", { className: "max-w-sm" }, errorMessage && /* @__PURE__ */ React__namespace.createElement("div", { className: "flex items-center gap-1 text-red-700 py-2 px-3 mb-4 bg-red-50 border border-red-200 rounded" }, /* @__PURE__ */ React__namespace.createElement(BiError, { className: "w-5 h-auto text-red-400 flex-shrink-0" }), /* @__PURE__ */ React__namespace.createElement("span", { className: "text-sm" }, /* @__PURE__ */ React__namespace.createElement("b", null, "Error:"), " ", errorMessage)), /* @__PURE__ */ React__namespace.createElement("p", { className: "text-lg text-gray-700 font-bold mb-2" }, "First, let's create a copy"), /* @__PURE__ */ React__namespace.createElement("p", { className: "text-sm text-gray-700 mb-4 max-w-sm" }, "To make changes, create a copy then get it approved and merged for it to go live.", " ", /* @__PURE__ */ React__namespace.createElement(
64229
+ "a",
64230
+ {
64231
+ className: "underline text-tina-orange-dark font-medium",
64232
+ href: "https://tina.io/docs/tinacloud/editorial-workflow",
64233
+ target: "_blank"
64234
+ },
64235
+ "Editorial Workflow"
64236
+ )), /* @__PURE__ */ React__namespace.createElement(
64035
64237
  PrefixedTextField,
64036
64238
  {
64239
+ name: "new-branch-name",
64240
+ label: "Branch Name",
64037
64241
  placeholder: "e.g. {{PAGE-NAME}}-updates",
64038
64242
  value: newBranchName,
64039
64243
  onChange: (e3) => {
@@ -64045,42 +64249,49 @@ mutation DeleteDocument($collection: String!, $relativePath: String!){
64045
64249
  ));
64046
64250
  }
64047
64251
  };
64048
- return /* @__PURE__ */ React__namespace.createElement(Modal, { className: "flex" }, /* @__PURE__ */ React__namespace.createElement(PopupModal, { className: "w-auto" }, /* @__PURE__ */ React__namespace.createElement(ModalHeader, { close: isExecuting ? void 0 : close2 }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex items-center justify-between w-full" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ React__namespace.createElement(BiGitBranch, { className: "w-6 h-auto mr-1 text-blue-500 opacity-70" }), "Create Branch"))), /* @__PURE__ */ React__namespace.createElement(ModalBody, { padded: true }, renderStateContent()), !isExecuting && /* @__PURE__ */ React__namespace.createElement(ModalActions, null, /* @__PURE__ */ React__namespace.createElement(Button$1, { style: { flexGrow: 1 }, onClick: close2 }, "Cancel"), /* @__PURE__ */ React__namespace.createElement(
64049
- Button$1,
64252
+ return /* @__PURE__ */ React__namespace.createElement(Modal, { className: "flex" }, /* @__PURE__ */ React__namespace.createElement(PopupModal, { className: "w-auto" }, /* @__PURE__ */ React__namespace.createElement(ModalHeader, { close: isExecuting ? void 0 : close2 }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex items-center justify-between w-full" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex items-center" }, "Save changes to new branch"))), /* @__PURE__ */ React__namespace.createElement(ModalBody, { padded: true }, renderStateContent()), !isExecuting && /* @__PURE__ */ React__namespace.createElement(ModalActions, { align: "end" }, /* @__PURE__ */ React__namespace.createElement(Button$1, { variant: "secondary", className: "w-full sm:w-auto" }, "Cancel"), /* @__PURE__ */ React__namespace.createElement(
64253
+ DropdownButton,
64050
64254
  {
64051
64255
  variant: "primary",
64052
- style: { flexGrow: 2 },
64256
+ align: "start",
64257
+ className: "w-full sm:w-auto",
64053
64258
  disabled: newBranchName === "" || disabled,
64054
- onClick: executeEditorialWorkflow
64055
- },
64056
- "Confirm"
64057
- ), /* @__PURE__ */ React__namespace.createElement(
64058
- OverflowMenu$1,
64059
- {
64060
- className: "-ml-2",
64061
- toolbarItems: [
64259
+ onMainAction: executeEditorialWorkflow,
64260
+ items: [
64062
64261
  {
64063
- name: "override",
64064
64262
  label: "Save to Protected Branch",
64065
- Icon: /* @__PURE__ */ React__namespace.createElement(MdOutlineSaveAlt, { size: "1rem" }),
64066
- onMouseDown: () => {
64263
+ onClick: () => {
64067
64264
  close2();
64068
64265
  safeSubmit();
64069
- }
64266
+ },
64267
+ icon: /* @__PURE__ */ React__namespace.createElement(lucideReact.TriangleAlert, { className: "w-4 h-4" })
64070
64268
  }
64071
64269
  ]
64072
- }
64270
+ },
64271
+ /* @__PURE__ */ React__namespace.createElement(
64272
+ lucideReact.GitBranchIcon,
64273
+ {
64274
+ className: "w-4 h-4 mr-1",
64275
+ style: { fill: "none" }
64276
+ }
64277
+ ),
64278
+ "Save to a new branch"
64073
64279
  ))));
64074
64280
  };
64075
- const PrefixedTextField = ({ prefix = "tina/", ...props }) => {
64076
- return /* @__PURE__ */ React__namespace.createElement("div", { className: "border border-gray-200 focus-within:border-blue-200 bg-gray-100 focus-within:bg-blue-100 rounded shadow-sm focus-within:shadow-outline overflow-hidden flex items-stretch divide-x divide-gray-200 focus-within:divide-blue-100 w-full transition-all ease-out duration-150" }, /* @__PURE__ */ React__namespace.createElement("span", { className: "pl-3 pr-2 py-2 font-medium text-base text-gray-700 opacity-50" }, prefix), /* @__PURE__ */ React__namespace.createElement(
64281
+ const PrefixedTextField = ({
64282
+ label = null,
64283
+ prefix = "tina/",
64284
+ ...props
64285
+ }) => {
64286
+ return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, label && /* @__PURE__ */ React__namespace.createElement(FieldLabel, { name: props.name }, label), /* @__PURE__ */ React__namespace.createElement("div", { className: "border border-gray-200 focus-within:border-blue-200 bg-gray-100 focus-within:bg-blue-100 rounded shadow-sm focus-within:shadow-outline overflow-hidden flex items-stretch divide-x divide-gray-200 focus-within:divide-blue-100 w-full transition-all ease-out duration-150" }, /* @__PURE__ */ React__namespace.createElement("span", { className: "pl-3 pr-2 py-2 text-base text-tina-orange-dark bg-tina-orange-light" }, prefix), /* @__PURE__ */ React__namespace.createElement(
64077
64287
  "input",
64078
64288
  {
64289
+ id: props.name,
64079
64290
  type: "text",
64080
64291
  className: "shadow-inner focus:outline-none block text-base placeholder:text-gray-300 px-3 py-2 text-gray-600 flex-1 bg-white focus:text-gray-900",
64081
64292
  ...props
64082
64293
  }
64083
- ));
64294
+ )));
64084
64295
  };
64085
64296
  const NestedForm = (props) => {
64086
64297
  const FormPortal = useFormPortal();
@@ -65416,9 +65627,9 @@ mutation DeleteDocument($collection: String!, $relativePath: String!){
65416
65627
  ai: "w-full px-0 text-base md:text-sm",
65417
65628
  aiChat: "max-h-[min(70vh,320px)] w-full max-w-[700px] overflow-y-auto px-3 py-2 text-base md:text-sm",
65418
65629
  comment: cn$2.cn("rounded-none border-none bg-transparent text-sm"),
65419
- default: "size-full px-16 pt-2 text-base sm:px-[max(24px,calc(50%-350px))]",
65420
- demo: "size-full px-16 pt-2 text-base sm:px-[max(24px,calc(50%-350px))]",
65421
- fullWidth: "size-full px-16 pt-4 pb-72 text-base sm:px-12",
65630
+ default: "size-full px-2 sm:px-4 pt-2 text-base",
65631
+ demo: "size-full px-2 sm:px-4 pt-2 text-base h-[650px]",
65632
+ fullWidth: "size-full px-2 sm:px-4 pt-4 pb-72 text-base",
65422
65633
  none: "",
65423
65634
  select: "px-3 py-2 text-base data-readonly:w-fit"
65424
65635
  }
@@ -65850,7 +66061,7 @@ flowchart TD
65850
66061
  className: "w-full p-2 border border-gray-300 rounded",
65851
66062
  onChange: filterChange
65852
66063
  }
65853
- ), /* @__PURE__ */ React.createElement(DropdownMenuSeparator, null), filteredTemplates.map((template) => /* @__PURE__ */ React.createElement(
66064
+ ), /* @__PURE__ */ React.createElement(DropdownMenuSeparator$1, null), filteredTemplates.map((template) => /* @__PURE__ */ React.createElement(
65854
66065
  DropdownMenuItem$1,
65855
66066
  {
65856
66067
  key: template.name,
@@ -119009,7 +119220,7 @@ mutation addPendingDocumentMutation(
119009
119220
  }
119010
119221
  usingProtectedBranch() {
119011
119222
  var _a2;
119012
- return this.usingEditorialWorkflow && ((_a2 = this.protectedBranches) == null ? void 0 : _a2.includes(this.branch));
119223
+ return this.usingEditorialWorkflow && ((_a2 = this.protectedBranches) == null ? void 0 : _a2.includes(decodeURIComponent(this.branch)));
119013
119224
  }
119014
119225
  async createBranch({ baseBranch, branchName }) {
119015
119226
  const url = `${this.contentApiBase}/github/${this.clientId}/create_branch`;
@@ -119222,7 +119433,7 @@ mutation addPendingDocumentMutation(
119222
119433
  }
119223
119434
  }
119224
119435
  function ModalBuilder(modalProps) {
119225
- return /* @__PURE__ */ React.createElement(Modal, null, /* @__PURE__ */ React.createElement(ModalPopup, null, /* @__PURE__ */ React.createElement(ModalHeader, null, /* @__PURE__ */ React.createElement(TinaIcon, { className: "w-10 h-auto -ml-1 mr-1 my-1 fill-orange-500" }), modalProps.title), /* @__PURE__ */ React.createElement(ModalBody, { padded: true }, modalProps.message && (typeof modalProps.message === "string" ? /* @__PURE__ */ React.createElement("p", null, modalProps.message) : modalProps.message), modalProps.error && /* @__PURE__ */ React.createElement(ErrorLabel, null, modalProps.error), modalProps.children), /* @__PURE__ */ React.createElement(ModalActions, null, modalProps.actions.map((action) => /* @__PURE__ */ React.createElement(AsyncButton, { key: action.name, ...action })))));
119436
+ return /* @__PURE__ */ React.createElement(Modal, null, /* @__PURE__ */ React.createElement(ModalPopup, null, /* @__PURE__ */ React.createElement(ModalHeader, null, modalProps.title), /* @__PURE__ */ React.createElement(ModalBody, { padded: true }, modalProps.message && (typeof modalProps.message === "string" ? /* @__PURE__ */ React.createElement("p", null, modalProps.message) : modalProps.message), modalProps.error && /* @__PURE__ */ React.createElement(ErrorLabel, null, modalProps.error), modalProps.children), /* @__PURE__ */ React.createElement(ModalActions, null, modalProps.actions.map((action) => /* @__PURE__ */ React.createElement(AsyncButton, { key: action.name, ...action })))));
119226
119437
  }
119227
119438
  const ErrorLabel = ({ style = {}, ...props }) => /* @__PURE__ */ React.createElement("p", { style: { ...style, color: "var(--tina-color-error)" }, ...props });
119228
119439
  const AsyncButton = ({ name, primary, action }) => {
@@ -120436,7 +120647,7 @@ This will work when developing locally but NOT when deployed to production.
120436
120647
  headerClassName,
120437
120648
  children
120438
120649
  }) => {
120439
- return /* @__PURE__ */ React.createElement("div", { className: "relative left-0 w-full h-full bg-gradient-to-b from-gray-50/50 to-gray-50 overflow-y-auto transition-opacity duration-300 ease-out flex flex-col opacity-100" }, /* @__PURE__ */ React.createElement("div", { className: `py-2 pl-4 pr-4 w-full ${headerClassName}` }, /* @__PURE__ */ React.createElement(LocalWarning, null), /* @__PURE__ */ React.createElement(BillingWarning, null), /* @__PURE__ */ React.createElement("div", { className: "flex justify-between items-center" }, /* @__PURE__ */ React.createElement(BranchButton, null), /* @__PURE__ */ React.createElement(BranchPreviewButton, null))), children);
120650
+ return /* @__PURE__ */ React.createElement("div", { className: "relative left-0 w-full h-full bg-gradient-to-b from-gray-50/50 to-gray-50 overflow-y-auto transition-opacity duration-300 ease-out flex flex-col opacity-100" }, /* @__PURE__ */ React.createElement("div", { className: `py-2 pr-4 w-full ${headerClassName}` }, /* @__PURE__ */ React.createElement(LocalWarning, null), /* @__PURE__ */ React.createElement(BillingWarning, null), /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React.createElement(TinaIcon, { className: "self-center h-10 min-w-10 w-auto text-orange-500" }), /* @__PURE__ */ React.createElement(BranchButton, null), /* @__PURE__ */ React.createElement(BranchPreviewButton, null))), children);
120440
120651
  };
120441
120652
  const PageHeader = ({
120442
120653
  children
@@ -120541,6 +120752,7 @@ This will work when developing locally but NOT when deployed to production.
120541
120752
  const plugins2 = cms.plugins.all("tina-admin");
120542
120753
  const routeMapping = plugins2.find(({ name }) => name === "route-mapping");
120543
120754
  const tinaPreview = cms.flags.get("tina-preview") || false;
120755
+ const basePath = cms.flags.get("tina-basepath");
120544
120756
  let routeOverride = ((_a2 = collectionDefinition.ui) == null ? void 0 : _a2.router) ? await ((_b = collectionDefinition.ui) == null ? void 0 : _b.router({
120545
120757
  document: document2,
120546
120758
  collection: collectionDefinition
@@ -120549,7 +120761,7 @@ This will work when developing locally but NOT when deployed to production.
120549
120761
  if (routeOverride.startsWith("/")) {
120550
120762
  routeOverride = routeOverride.slice(1);
120551
120763
  }
120552
- tinaPreview ? navigate(`/~/${routeOverride}`) : window.location.href = routeOverride;
120764
+ tinaPreview ? navigate(`/~${basePath ? `/${basePath}` : ""}/${routeOverride}`) : window.location.href = `${basePath ? `/${basePath}` : ""}/${routeOverride}`;
120553
120765
  return null;
120554
120766
  } else {
120555
120767
  const pathToDoc = document2._sys.breadcrumbs;
@@ -120917,7 +121129,7 @@ This will work when developing locally but NOT when deployed to production.
120917
121129
  },
120918
121130
  to: "/collections/new-folder",
120919
121131
  className: cn$1(
120920
- "icon-parent inline-flex items-center font-medium focus:outline-none focus:ring-2 focus:shadow-outline text-center rounded justify-center transition-all duration-150 ease-out whitespace-nowrap shadow text-blue-500 bg-white hover:bg-[#f1f5f9] focus:ring-white focus:ring-blue-500 w-full md:w-auto text-sm h-10 px-6 mr-4",
121132
+ "icon-parent inline-flex items-center font-medium focus:outline-none focus:ring-2 focus:shadow-outline text-center rounded justify-center transition-all duration-150 ease-out whitespace-nowrap shadow text-gray-500 hover:tina-orange-dark bg-white hover:bg-gray-50 border border-gray-100 focus:ring-white focus:ring-tina-orange-dark w-full md:w-auto text-sm h-10 px-6 mr-4",
120921
121133
  collection.templates && "opacity-50 pointer-events-none cursor-not-allowed"
120922
121134
  ),
120923
121135
  "aria-disabled": !!collection.templates,
@@ -120955,7 +121167,7 @@ This will work when developing locally but NOT when deployed to production.
120955
121167
  "new",
120956
121168
  collectionName
120957
121169
  ].join("/")}`,
120958
- className: "inline-flex items-center font-medium focus:outline-none focus:ring-2 focus:shadow-outline text-center rounded justify-center transition-all duration-150 ease-out whitespace-nowrap shadow text-white bg-blue-500 hover:bg-blue-600 w-full md:w-auto text-sm h-10 px-6"
121170
+ className: "inline-flex items-center font-medium focus:ring-2 focus:outline-none focus:ring-tina-orange-dark focus:shadow-outline text-center rounded justify-center transition-all duration-150 ease-out whitespace-nowrap shadow text-white bg-tina-orange-dark hover:bg-tina-orange w-full md:w-auto text-sm h-10 px-6"
120959
121171
  },
120960
121172
  /* @__PURE__ */ React.createElement(FaFile, { className: "mr-2" }),
120961
121173
  "Add File"
@@ -121086,15 +121298,9 @@ This will work when developing locally but NOT when deployed to production.
121086
121298
  }
121087
121299
  },
121088
121300
  allowDelete && {
121089
- name: "delete",
121090
- label: "Delete",
121091
- Icon: /* @__PURE__ */ React.createElement(
121092
- BiTrash,
121093
- {
121094
- size: "1.3rem",
121095
- className: "text-red-500"
121096
- }
121097
- ),
121301
+ name: "rename",
121302
+ label: "Rename",
121303
+ Icon: /* @__PURE__ */ React.createElement(BiRename, { size: "1.3rem" }),
121098
121304
  onMouseDown: () => {
121099
121305
  setVars((old) => ({
121100
121306
  ...old,
@@ -121107,19 +121313,20 @@ This will work when developing locally but NOT when deployed to production.
121107
121313
  ) + document2.node._sys.extension,
121108
121314
  newRelativePath: ""
121109
121315
  }));
121110
- setDeleteModalOpen(true);
121316
+ setRenameModalOpen(true);
121111
121317
  }
121112
121318
  },
121113
121319
  allowDelete && {
121114
- name: "rename",
121115
- label: "Rename",
121320
+ name: "delete",
121321
+ label: "Delete",
121116
121322
  Icon: /* @__PURE__ */ React.createElement(
121117
- BiRename,
121323
+ BiTrash,
121118
121324
  {
121119
121325
  size: "1.3rem",
121120
121326
  className: "text-red-500"
121121
121327
  }
121122
121328
  ),
121329
+ className: "text-red-500",
121123
121330
  onMouseDown: () => {
121124
121331
  setVars((old) => ({
121125
121332
  ...old,
@@ -121132,7 +121339,7 @@ This will work when developing locally but NOT when deployed to production.
121132
121339
  ) + document2.node._sys.extension,
121133
121340
  newRelativePath: ""
121134
121341
  }));
121135
- setRenameModalOpen(true);
121342
+ setDeleteModalOpen(true);
121136
121343
  }
121137
121344
  }
121138
121345
  ].filter(Boolean)
@@ -122535,6 +122742,7 @@ This will work when developing locally but NOT when deployed to production.
122535
122742
  exports2.Dismissible = Dismissible;
122536
122743
  exports2.DragHandle = DragHandle;
122537
122744
  exports2.DragIcon = DragIcon;
122745
+ exports2.DropdownButton = DropdownButton;
122538
122746
  exports2.DummyMediaStore = DummyMediaStore;
122539
122747
  exports2.DuplicateIcon = DuplicateIcon;
122540
122748
  exports2.EditIcon = EditIcon;
@@ -122663,6 +122871,7 @@ This will work when developing locally but NOT when deployed to production.
122663
122871
  exports2.TinaCloudAuthProvider = TinaCloudAuthProvider;
122664
122872
  exports2.TinaCloudAuthWall = TinaCloudAuthWall;
122665
122873
  exports2.TinaCloudProvider = TinaCloudProvider;
122874
+ exports2.TinaExtendedIcon = TinaExtendedIcon;
122666
122875
  exports2.TinaField = TinaField;
122667
122876
  exports2.TinaForm = TinaForm;
122668
122877
  exports2.TinaIcon = TinaIcon;