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.
- package/dist/index.js +367 -158
- package/dist/index.mjs +368 -159
- package/dist/rich-text/index.d.ts +6 -0
- package/dist/rich-text/index.js +8 -1
- package/dist/rich-text/index.mjs +8 -1
- package/dist/rich-text/static.d.ts +6 -0
- package/dist/rich-text/static.js +8 -1
- package/dist/rich-text/static.mjs +8 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/blockquote-element.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/button.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block/code-block-element.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-line-element.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/list-element.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/paragraph-element.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/slash-input-element.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-cell-element.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-element.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-row-element.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +18 -18
- package/dist/toolkit/form-builder/form-builder.d.ts +2 -1
- package/dist/toolkit/icons/TinaExtended.d.ts +4 -0
- package/dist/toolkit/icons/index.d.ts +1 -0
- package/dist/toolkit/plugin-branch-switcher/branch-button.d.ts +3 -1
- package/dist/toolkit/react-modals/modal/modal-actions.d.ts +2 -1
- package/dist/toolkit/react-sidebar/components/local-warning.d.ts +3 -1
- package/dist/toolkit/styles/dropdown-button.d.ts +75 -0
- package/dist/toolkit/styles/index.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -15,7 +15,7 @@ import { isHotkey } from "is-hotkey";
|
|
|
15
15
|
import clsx$1, { clsx } from "clsx";
|
|
16
16
|
import { Slot } from "@radix-ui/react-slot";
|
|
17
17
|
import { isLangSupported, formatCodeBlock, insertEmptyCodeBlock, unwrapCodeBlock, isCodeBlockEmpty, isSelectionAtCodeBlockStart } from "@udecode/plate-code-block";
|
|
18
|
-
import { X, Search, ChevronDown, Check, AlertTriangle, BracesIcon, Plus, AlignCenter as AlignCenter$1, AlignJustify, AlignLeft as AlignLeft$1, AlignRight as AlignRight$1, PaintBucket, Quote, ChevronRight, ChevronsUpDown, FileCode, Baseline, RectangleVertical, Combine, Ungroup, MessageSquare, MessageSquarePlus, Trash, GripVertical, Edit2, Smile, ExternalLink, Heading1, Heading2, Heading3, Heading4, Heading5, Heading6, Indent, Keyboard, WrapText, Minus, MoreHorizontal, Outdent, Pilcrow, RotateCcw, RectangleHorizontal, Settings, Strikethrough, Subscript, Superscript, Table, Text as Text$2, Underline, Link2Off, Eye, SeparatorHorizontal, Moon, SunMedium, Twitter, PaintBucketIcon, CombineIcon, SquareSplitHorizontalIcon, Grid2X2Icon, Trash2Icon, ArrowUp, ArrowDown, XIcon, ArrowLeft, ArrowRight, EraserIcon, LoaderCircle, TriangleAlert, EllipsisVertical, List as List$1, ListOrdered, Grid3x3Icon, Link, Unlink } from "lucide-react";
|
|
18
|
+
import { X, Search, ChevronDown, Check, AlertTriangle, BracesIcon, Plus, AlignCenter as AlignCenter$1, AlignJustify, AlignLeft as AlignLeft$1, AlignRight as AlignRight$1, PaintBucket, Quote, ChevronRight, ChevronsUpDown, FileCode, Baseline, RectangleVertical, Combine, Ungroup, MessageSquare, MessageSquarePlus, Trash, GripVertical, Edit2, Smile, ExternalLink, Heading1, Heading2, Heading3, Heading4, Heading5, Heading6, Indent, Keyboard, WrapText, Minus, MoreHorizontal, Outdent, Pilcrow, RotateCcw, RectangleHorizontal, Settings, Strikethrough, Subscript, Superscript, Table, Text as Text$2, Underline, Link2Off, Eye, SeparatorHorizontal, Moon, SunMedium, Twitter, PaintBucketIcon, CombineIcon, SquareSplitHorizontalIcon, Grid2X2Icon, Trash2Icon, ArrowUp, ArrowDown, XIcon, ArrowLeft, ArrowRight, EraserIcon, ChevronDownIcon as ChevronDownIcon$1, LoaderCircle, TriangleAlert, EllipsisVertical, GitBranchIcon, List as List$1, ListOrdered, Grid3x3Icon, Link, Unlink } from "lucide-react";
|
|
19
19
|
import mermaid from "mermaid";
|
|
20
20
|
import { cva } from "class-variance-authority";
|
|
21
21
|
import { Command as Command$2 } from "cmdk";
|
|
@@ -100,8 +100,14 @@ const Modal = (props) => {
|
|
|
100
100
|
portalNode
|
|
101
101
|
);
|
|
102
102
|
};
|
|
103
|
-
const ModalActions = ({ children }) => {
|
|
104
|
-
return /* @__PURE__ */ React.createElement(
|
|
103
|
+
const ModalActions = ({ align = "between", children }) => {
|
|
104
|
+
return /* @__PURE__ */ React.createElement(
|
|
105
|
+
"div",
|
|
106
|
+
{
|
|
107
|
+
className: `w-full flex flex-wrap-reverse justify-${align} gap-4 items-center px-5 pb-5 rounded-b-md`
|
|
108
|
+
},
|
|
109
|
+
children
|
|
110
|
+
);
|
|
105
111
|
};
|
|
106
112
|
const ModalBody = ({ className = "", padded = false, ...props }) => /* @__PURE__ */ React__default.createElement(
|
|
107
113
|
"div",
|
|
@@ -716,12 +722,84 @@ const CircleCheck = ({ ...props }) => /* @__PURE__ */ React.createElement(
|
|
|
716
722
|
},
|
|
717
723
|
/* @__PURE__ */ React.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" })
|
|
718
724
|
);
|
|
725
|
+
const TinaExtendedIcon = ({ ...props }) => /* @__PURE__ */ React.createElement(
|
|
726
|
+
"svg",
|
|
727
|
+
{
|
|
728
|
+
viewBox: "0 0 1020 254",
|
|
729
|
+
fill: "currentColor",
|
|
730
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
731
|
+
...props
|
|
732
|
+
},
|
|
733
|
+
/* @__PURE__ */ React.createElement(
|
|
734
|
+
"path",
|
|
735
|
+
{
|
|
736
|
+
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",
|
|
737
|
+
fill: "#EC4815"
|
|
738
|
+
}
|
|
739
|
+
),
|
|
740
|
+
/* @__PURE__ */ React.createElement(
|
|
741
|
+
"path",
|
|
742
|
+
{
|
|
743
|
+
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",
|
|
744
|
+
fill: "#EC4815"
|
|
745
|
+
}
|
|
746
|
+
),
|
|
747
|
+
/* @__PURE__ */ React.createElement(
|
|
748
|
+
"path",
|
|
749
|
+
{
|
|
750
|
+
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",
|
|
751
|
+
fill: "#EC4815"
|
|
752
|
+
}
|
|
753
|
+
),
|
|
754
|
+
/* @__PURE__ */ React.createElement(
|
|
755
|
+
"path",
|
|
756
|
+
{
|
|
757
|
+
d: "M320.581 81.2H359.781V110.4H320.581V81.2ZM302.781 153.6V124H359.581V236H323.181V153.6H302.781Z",
|
|
758
|
+
fill: "#EC4815"
|
|
759
|
+
}
|
|
760
|
+
),
|
|
761
|
+
/* @__PURE__ */ React.createElement(
|
|
762
|
+
"path",
|
|
763
|
+
{
|
|
764
|
+
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",
|
|
765
|
+
fill: "#EC4815"
|
|
766
|
+
}
|
|
767
|
+
),
|
|
768
|
+
/* @__PURE__ */ React.createElement(
|
|
769
|
+
"path",
|
|
770
|
+
{
|
|
771
|
+
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",
|
|
772
|
+
fill: "#EC4815"
|
|
773
|
+
}
|
|
774
|
+
),
|
|
775
|
+
/* @__PURE__ */ React.createElement(
|
|
776
|
+
"path",
|
|
777
|
+
{
|
|
778
|
+
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",
|
|
779
|
+
fill: "#EC4815"
|
|
780
|
+
}
|
|
781
|
+
),
|
|
782
|
+
/* @__PURE__ */ React.createElement(
|
|
783
|
+
"path",
|
|
784
|
+
{
|
|
785
|
+
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",
|
|
786
|
+
fill: "#EC4815"
|
|
787
|
+
}
|
|
788
|
+
),
|
|
789
|
+
/* @__PURE__ */ React.createElement(
|
|
790
|
+
"path",
|
|
791
|
+
{
|
|
792
|
+
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",
|
|
793
|
+
fill: "#EC4815"
|
|
794
|
+
}
|
|
795
|
+
)
|
|
796
|
+
);
|
|
719
797
|
const ModalHeader = ({ children, close: close2 }) => {
|
|
720
|
-
return /* @__PURE__ */ React.createElement("div", { className: "h-14 flex items-center
|
|
798
|
+
return /* @__PURE__ */ React.createElement("div", { className: "h-14 flex items-center px-5 border-b border-gray-200 m-0" }, /* @__PURE__ */ React.createElement(TinaIcon, { className: "w-10 h-auto -ml-1 mr-1 my-1 fill-tina-orange" }), /* @__PURE__ */ React.createElement(ModalTitle, null, children), close2 && /* @__PURE__ */ React.createElement(
|
|
721
799
|
"div",
|
|
722
800
|
{
|
|
723
801
|
onClick: close2,
|
|
724
|
-
className: "flex items-center fill-gray-400 cursor-pointer transition-colors duration-100 ease-out hover:fill-gray-700"
|
|
802
|
+
className: "ml-auto flex justify-self-end items-center fill-gray-400 cursor-pointer transition-colors duration-100 ease-out hover:fill-gray-700"
|
|
725
803
|
},
|
|
726
804
|
/* @__PURE__ */ React.createElement(CloseIcon, { className: "w-6 h-auto" })
|
|
727
805
|
));
|
|
@@ -36981,7 +37059,7 @@ const DropdownMenuLabel = withVariants(
|
|
|
36981
37059
|
dropdownMenuLabelVariants,
|
|
36982
37060
|
["inset"]
|
|
36983
37061
|
);
|
|
36984
|
-
const DropdownMenuSeparator = withCn(
|
|
37062
|
+
const DropdownMenuSeparator$1 = withCn(
|
|
36985
37063
|
DropdownMenuPrimitive.Separator,
|
|
36986
37064
|
"-mx-1 my-1 h-px bg-muted"
|
|
36987
37065
|
);
|
|
@@ -38915,9 +38993,6 @@ function MdOutlineSettings(props) {
|
|
|
38915
38993
|
function MdOutlineClear(props) {
|
|
38916
38994
|
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);
|
|
38917
38995
|
}
|
|
38918
|
-
function MdOutlineSaveAlt(props) {
|
|
38919
|
-
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);
|
|
38920
|
-
}
|
|
38921
38996
|
function MdOutlineCloud(props) {
|
|
38922
38997
|
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);
|
|
38923
38998
|
}
|
|
@@ -39155,10 +39230,10 @@ const Button$1 = ({
|
|
|
39155
39230
|
}) => {
|
|
39156
39231
|
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 ";
|
|
39157
39232
|
const variantClasses = {
|
|
39158
|
-
primary: `shadow text-white bg-
|
|
39159
|
-
secondary: `shadow text-gray-500 hover:
|
|
39160
|
-
white: `shadow text-gray-500 hover:
|
|
39161
|
-
ghost: `text-gray-500 hover:
|
|
39233
|
+
primary: `shadow text-white bg-tina-orange-dark hover:bg-tina-orange focus:ring-tina-orange-dark border-0`,
|
|
39234
|
+
secondary: `shadow text-gray-500 hover:tina-orange-dark bg-gray-50 hover:bg-white border border-gray-100`,
|
|
39235
|
+
white: `shadow text-gray-500 hover:tina-orange-dark bg-white hover:bg-gray-50 border border-gray-100`,
|
|
39236
|
+
ghost: `text-gray-500 hover:tina-orange-dark hover:shadow border border-transparent border-0 hover:border hover:border-gray-200 bg-transparent`,
|
|
39162
39237
|
danger: `shadow text-white bg-red-500 hover:bg-red-600 focus:ring-red-500`,
|
|
39163
39238
|
accent: `shadow text-white bg-orange-500 hover:bg-orange-600 focus:ring-orange-500`,
|
|
39164
39239
|
custom: ""
|
|
@@ -39208,7 +39283,7 @@ const IconButton = ({
|
|
|
39208
39283
|
}) => {
|
|
39209
39284
|
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";
|
|
39210
39285
|
const variantClasses = {
|
|
39211
|
-
primary: `shadow text-white bg-
|
|
39286
|
+
primary: `shadow text-white bg-tina-orange-dark hover:bg-tina-orange focus:ring-tina-orange-dark`,
|
|
39212
39287
|
secondary: `shadow text-gray-500 hover:text-blue-500 bg-gray-50 hover:bg-white border border-gray-200`,
|
|
39213
39288
|
white: `shadow text-gray-500 hover:text-blue-500 bg-white hover:bg-gray-50 border border-gray-200`,
|
|
39214
39289
|
ghost: `text-gray-500 hover:text-blue-500 hover:shadow border border-transparent hover:border-gray-200 bg-transparent`,
|
|
@@ -39294,7 +39369,8 @@ const OverflowMenu$1 = ({ toolbarItems: toolbarItems2, className = "w-full" }) =
|
|
|
39294
39369
|
},
|
|
39295
39370
|
className: classNames(
|
|
39296
39371
|
toolbarItem.active ? "bg-gray-50 text-blue-500" : "bg-white text-gray-600",
|
|
39297
|
-
"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"
|
|
39372
|
+
"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",
|
|
39373
|
+
toolbarItem.className ?? ""
|
|
39298
39374
|
)
|
|
39299
39375
|
},
|
|
39300
39376
|
/* @__PURE__ */ React__default.createElement("div", { className: "mr-2 opacity-80" }, toolbarItem.Icon),
|
|
@@ -39379,6 +39455,176 @@ const Message = ({
|
|
|
39379
39455
|
))
|
|
39380
39456
|
);
|
|
39381
39457
|
};
|
|
39458
|
+
function cn(...inputs) {
|
|
39459
|
+
return twMerge(clsx(inputs));
|
|
39460
|
+
}
|
|
39461
|
+
function DropdownMenu({
|
|
39462
|
+
...props
|
|
39463
|
+
}) {
|
|
39464
|
+
return /* @__PURE__ */ React.createElement(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
39465
|
+
}
|
|
39466
|
+
function DropdownMenuTrigger({
|
|
39467
|
+
...props
|
|
39468
|
+
}) {
|
|
39469
|
+
return /* @__PURE__ */ React.createElement(
|
|
39470
|
+
DropdownMenuPrimitive.Trigger,
|
|
39471
|
+
{
|
|
39472
|
+
"data-slot": "dropdown-menu-trigger",
|
|
39473
|
+
...props
|
|
39474
|
+
}
|
|
39475
|
+
);
|
|
39476
|
+
}
|
|
39477
|
+
function DropdownMenuContent({
|
|
39478
|
+
className,
|
|
39479
|
+
sideOffset = 4,
|
|
39480
|
+
...props
|
|
39481
|
+
}) {
|
|
39482
|
+
return /* @__PURE__ */ React.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React.createElement(
|
|
39483
|
+
DropdownMenuPrimitive.Content,
|
|
39484
|
+
{
|
|
39485
|
+
"data-slot": "dropdown-menu-content",
|
|
39486
|
+
sideOffset,
|
|
39487
|
+
className: cn(
|
|
39488
|
+
"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",
|
|
39489
|
+
className
|
|
39490
|
+
),
|
|
39491
|
+
...props
|
|
39492
|
+
}
|
|
39493
|
+
));
|
|
39494
|
+
}
|
|
39495
|
+
function DropdownMenuItem({
|
|
39496
|
+
className,
|
|
39497
|
+
inset,
|
|
39498
|
+
variant = "default",
|
|
39499
|
+
...props
|
|
39500
|
+
}) {
|
|
39501
|
+
return /* @__PURE__ */ React.createElement(
|
|
39502
|
+
DropdownMenuPrimitive.Item,
|
|
39503
|
+
{
|
|
39504
|
+
"data-slot": "dropdown-menu-item",
|
|
39505
|
+
"data-inset": inset,
|
|
39506
|
+
"data-variant": variant,
|
|
39507
|
+
className: cn(
|
|
39508
|
+
"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",
|
|
39509
|
+
className
|
|
39510
|
+
),
|
|
39511
|
+
...props
|
|
39512
|
+
}
|
|
39513
|
+
);
|
|
39514
|
+
}
|
|
39515
|
+
function DropdownMenuSeparator({
|
|
39516
|
+
className,
|
|
39517
|
+
...props
|
|
39518
|
+
}) {
|
|
39519
|
+
return /* @__PURE__ */ React.createElement(
|
|
39520
|
+
DropdownMenuPrimitive.Separator,
|
|
39521
|
+
{
|
|
39522
|
+
"data-slot": "dropdown-menu-separator",
|
|
39523
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
39524
|
+
...props
|
|
39525
|
+
}
|
|
39526
|
+
);
|
|
39527
|
+
}
|
|
39528
|
+
const DropdownButton = React.forwardRef(
|
|
39529
|
+
({
|
|
39530
|
+
variant = "primary",
|
|
39531
|
+
size: size2 = "medium",
|
|
39532
|
+
busy,
|
|
39533
|
+
disabled,
|
|
39534
|
+
rounded = "full",
|
|
39535
|
+
children,
|
|
39536
|
+
className = "",
|
|
39537
|
+
onMainAction,
|
|
39538
|
+
items: items2,
|
|
39539
|
+
showSplitButton = true,
|
|
39540
|
+
...props
|
|
39541
|
+
}, ref) => {
|
|
39542
|
+
const [open, setOpen] = React.useState(false);
|
|
39543
|
+
if (!onMainAction || !showSplitButton) {
|
|
39544
|
+
return /* @__PURE__ */ React.createElement(DropdownMenu, { open, onOpenChange: setOpen, modal: false }, /* @__PURE__ */ React.createElement(DropdownMenuTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
|
|
39545
|
+
Button$1,
|
|
39546
|
+
{
|
|
39547
|
+
variant,
|
|
39548
|
+
size: size2,
|
|
39549
|
+
busy,
|
|
39550
|
+
disabled,
|
|
39551
|
+
rounded,
|
|
39552
|
+
className: cn$1("gap-2", className),
|
|
39553
|
+
...props
|
|
39554
|
+
},
|
|
39555
|
+
children,
|
|
39556
|
+
/* @__PURE__ */ React.createElement(
|
|
39557
|
+
ChevronDownIcon$1,
|
|
39558
|
+
{
|
|
39559
|
+
className: cn$1(
|
|
39560
|
+
"h-4 w-4 transition-transform duration-200",
|
|
39561
|
+
open && "rotate-180"
|
|
39562
|
+
)
|
|
39563
|
+
}
|
|
39564
|
+
)
|
|
39565
|
+
)), /* @__PURE__ */ React.createElement(DropdownMenuContent, { align: "end", side: "bottom", className: "z-[100000]" }, items2.map((item, index) => /* @__PURE__ */ React.createElement(
|
|
39566
|
+
DropdownMenuItem,
|
|
39567
|
+
{
|
|
39568
|
+
key: index,
|
|
39569
|
+
onClick: item.onClick,
|
|
39570
|
+
disabled: item.disabled,
|
|
39571
|
+
variant: item.variant
|
|
39572
|
+
},
|
|
39573
|
+
item.icon && item.icon,
|
|
39574
|
+
item.label
|
|
39575
|
+
))));
|
|
39576
|
+
}
|
|
39577
|
+
return /* @__PURE__ */ React.createElement("div", { className: cn$1("inline-flex", className) }, /* @__PURE__ */ React.createElement(
|
|
39578
|
+
Button$1,
|
|
39579
|
+
{
|
|
39580
|
+
variant,
|
|
39581
|
+
size: size2,
|
|
39582
|
+
busy,
|
|
39583
|
+
disabled,
|
|
39584
|
+
rounded: "left",
|
|
39585
|
+
onClick: onMainAction,
|
|
39586
|
+
className: "border-r-0 w-full",
|
|
39587
|
+
...props
|
|
39588
|
+
},
|
|
39589
|
+
children
|
|
39590
|
+
), /* @__PURE__ */ React.createElement(DropdownMenu, { open, onOpenChange: setOpen }, /* @__PURE__ */ React.createElement(DropdownMenuTrigger, null, /* @__PURE__ */ React.createElement(
|
|
39591
|
+
Button$1,
|
|
39592
|
+
{
|
|
39593
|
+
variant,
|
|
39594
|
+
size: size2,
|
|
39595
|
+
busy,
|
|
39596
|
+
disabled,
|
|
39597
|
+
rounded: "right",
|
|
39598
|
+
className: "px-4 border-l",
|
|
39599
|
+
style: { borderColor: "#00000030" },
|
|
39600
|
+
"aria-label": "More options"
|
|
39601
|
+
},
|
|
39602
|
+
/* @__PURE__ */ React.createElement(
|
|
39603
|
+
ChevronDownIcon$1,
|
|
39604
|
+
{
|
|
39605
|
+
className: cn$1(
|
|
39606
|
+
"h-4 w-4 transition-transform duration-200 fill-none",
|
|
39607
|
+
open && "rotate-180"
|
|
39608
|
+
),
|
|
39609
|
+
style: { fill: "none" }
|
|
39610
|
+
}
|
|
39611
|
+
)
|
|
39612
|
+
)), /* @__PURE__ */ React.createElement(DropdownMenuContent, { align: "end", side: "bottom" }, items2.map((item, index) => {
|
|
39613
|
+
var _a2;
|
|
39614
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, { key: index }, /* @__PURE__ */ React.createElement(
|
|
39615
|
+
DropdownMenuItem,
|
|
39616
|
+
{
|
|
39617
|
+
onClick: item.onClick,
|
|
39618
|
+
disabled: item.disabled,
|
|
39619
|
+
variant: item.variant
|
|
39620
|
+
},
|
|
39621
|
+
item.icon && item.icon,
|
|
39622
|
+
item.label
|
|
39623
|
+
), item.variant === "destructive" && index < items2.length - 1 && ((_a2 = items2[index + 1]) == null ? void 0 : _a2.variant) !== "destructive" && /* @__PURE__ */ React.createElement(DropdownMenuSeparator, null));
|
|
39624
|
+
}))));
|
|
39625
|
+
}
|
|
39626
|
+
);
|
|
39627
|
+
DropdownButton.displayName = "DropdownButton";
|
|
39382
39628
|
function useCMS() {
|
|
39383
39629
|
return useCMS$1();
|
|
39384
39630
|
}
|
|
@@ -40369,6 +40615,18 @@ const GroupFieldPlugin = {
|
|
|
40369
40615
|
name: "group",
|
|
40370
40616
|
Component: Group
|
|
40371
40617
|
};
|
|
40618
|
+
const constructUrlWithBasePath = (url, basePath) => {
|
|
40619
|
+
if (!url)
|
|
40620
|
+
return url;
|
|
40621
|
+
if (url.startsWith("http://") || url.startsWith("https://") || url.startsWith("//")) {
|
|
40622
|
+
return url;
|
|
40623
|
+
}
|
|
40624
|
+
if (basePath) {
|
|
40625
|
+
const cleanBasePath = basePath.replace(/^\/+|\/+$/g, "");
|
|
40626
|
+
return `/${cleanBasePath}/${url}`;
|
|
40627
|
+
}
|
|
40628
|
+
return url;
|
|
40629
|
+
};
|
|
40372
40630
|
const BlockSelectorBig = ({
|
|
40373
40631
|
templates,
|
|
40374
40632
|
addItem,
|
|
@@ -40568,6 +40826,10 @@ const CardColumns = ({ children, className = "" }) => {
|
|
|
40568
40826
|
);
|
|
40569
40827
|
};
|
|
40570
40828
|
const BlockCard = ({ close: close2, name, template }) => {
|
|
40829
|
+
const cms = useCMS$1();
|
|
40830
|
+
const basePath = cms.flags.get("tina-basepath");
|
|
40831
|
+
const basePathStr = typeof basePath === "string" ? basePath : void 0;
|
|
40832
|
+
const previewSrc = template.previewSrc ? constructUrlWithBasePath(template.previewSrc, basePathStr) : void 0;
|
|
40571
40833
|
return /* @__PURE__ */ React.createElement(
|
|
40572
40834
|
"button",
|
|
40573
40835
|
{
|
|
@@ -40578,17 +40840,17 @@ const BlockCard = ({ close: close2, name, template }) => {
|
|
|
40578
40840
|
close2(name, template);
|
|
40579
40841
|
}
|
|
40580
40842
|
},
|
|
40581
|
-
|
|
40843
|
+
previewSrc && /* @__PURE__ */ React.createElement(
|
|
40582
40844
|
"img",
|
|
40583
40845
|
{
|
|
40584
|
-
src:
|
|
40846
|
+
src: previewSrc,
|
|
40585
40847
|
className: "w-full h-auto transition-all ease-out duration-150 group-hover:opacity-50"
|
|
40586
40848
|
}
|
|
40587
40849
|
),
|
|
40588
40850
|
/* @__PURE__ */ React.createElement(
|
|
40589
40851
|
"span",
|
|
40590
40852
|
{
|
|
40591
|
-
className: `relative flex justify-between items-center gap-4 w-full px-4 text-left ${
|
|
40853
|
+
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`}`
|
|
40592
40854
|
},
|
|
40593
40855
|
template.label ? template.label : name,
|
|
40594
40856
|
/* @__PURE__ */ React.createElement(AddIcon, { className: "w-5 h-auto group-hover:text-blue-500 opacity-30 transition-all ease-out duration-150 group-hover:opacity-80" })
|
|
@@ -43236,7 +43498,7 @@ let Alerts$1 = class Alerts {
|
|
|
43236
43498
|
...eventsToAlerts
|
|
43237
43499
|
};
|
|
43238
43500
|
}
|
|
43239
|
-
add(level, message, timeout =
|
|
43501
|
+
add(level, message, timeout = 8e3) {
|
|
43240
43502
|
const alert = {
|
|
43241
43503
|
level,
|
|
43242
43504
|
message,
|
|
@@ -44287,9 +44549,6 @@ const CopyField = ({ label, description, value }) => {
|
|
|
44287
44549
|
)
|
|
44288
44550
|
), description && /* @__PURE__ */ React__default.createElement("p", { className: "mt-2 text-sm text-gray-500" }, description));
|
|
44289
44551
|
};
|
|
44290
|
-
function cn(...inputs) {
|
|
44291
|
-
return twMerge(clsx(inputs));
|
|
44292
|
-
}
|
|
44293
44552
|
const checkerboardStyle = {
|
|
44294
44553
|
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%)",
|
|
44295
44554
|
backgroundSize: "12px 12px",
|
|
@@ -44860,8 +45119,8 @@ const ActiveItemPreview = ({
|
|
|
44860
45119
|
variant: "primary",
|
|
44861
45120
|
onClick: () => selectMediaItem(activeItem)
|
|
44862
45121
|
},
|
|
44863
|
-
"
|
|
44864
|
-
|
|
45122
|
+
/* @__PURE__ */ React__default.createElement(BiArrowToBottom, { className: "mr-1 -ml-0.5 w-6 h-auto opacity-70" }),
|
|
45123
|
+
"Insert"
|
|
44865
45124
|
), allowDelete && /* @__PURE__ */ React__default.createElement(
|
|
44866
45125
|
Button$1,
|
|
44867
45126
|
{
|
|
@@ -44869,8 +45128,8 @@ const ActiveItemPreview = ({
|
|
|
44869
45128
|
size: "medium",
|
|
44870
45129
|
onClick: deleteMediaItem
|
|
44871
45130
|
},
|
|
44872
|
-
"
|
|
44873
|
-
|
|
45131
|
+
/* @__PURE__ */ React__default.createElement(TrashIcon, { className: "mr-1 -ml-0.5 w-6 h-auto opacity-70" }),
|
|
45132
|
+
"Delete"
|
|
44874
45133
|
))))
|
|
44875
45134
|
);
|
|
44876
45135
|
};
|
|
@@ -45222,14 +45481,14 @@ const Callout = ({
|
|
|
45222
45481
|
children
|
|
45223
45482
|
);
|
|
45224
45483
|
};
|
|
45225
|
-
const LocalWarning = () => {
|
|
45484
|
+
const LocalWarning = ({ className = "" }) => {
|
|
45226
45485
|
var _a2, _b;
|
|
45227
45486
|
const cms = useCMS$1();
|
|
45228
45487
|
const isLocalMode = (_b = (_a2 = cms.api) == null ? void 0 : _a2.tina) == null ? void 0 : _b.isLocalMode;
|
|
45229
45488
|
if (!isLocalMode) {
|
|
45230
45489
|
return null;
|
|
45231
45490
|
}
|
|
45232
|
-
return /* @__PURE__ */ React.createElement(Callout, { calloutStyle: "warning", className: "w-fit" }, /* @__PURE__ */ React.createElement("a", { href: "https://tina.io/docs/r/what-is-tinacloud/", target: "_blank" }, "You are in local mode"));
|
|
45491
|
+
return /* @__PURE__ */ React.createElement(Callout, { calloutStyle: "warning", className: cn("w-fit", className) }, /* @__PURE__ */ React.createElement("a", { href: "https://tina.io/docs/r/what-is-tinacloud/", target: "_blank" }, "You are in local mode"));
|
|
45233
45492
|
};
|
|
45234
45493
|
const BillingWarning = () => {
|
|
45235
45494
|
var _a2;
|
|
@@ -45970,7 +46229,7 @@ function formatDistanceToNow(dirtyDate, options) {
|
|
|
45970
46229
|
requiredArgs(1, arguments);
|
|
45971
46230
|
return formatDistance2(dirtyDate, Date.now(), options);
|
|
45972
46231
|
}
|
|
45973
|
-
const version$1 = "2.9.
|
|
46232
|
+
const version$1 = "2.9.3";
|
|
45974
46233
|
const VersionInfo = () => {
|
|
45975
46234
|
var _a2, _b, _c, _d, _e, _f;
|
|
45976
46235
|
const cms = useCMS();
|
|
@@ -46206,7 +46465,7 @@ const Nav = ({
|
|
|
46206
46465
|
toggleMenu();
|
|
46207
46466
|
}
|
|
46208
46467
|
},
|
|
46209
|
-
/* @__PURE__ */ React.createElement(BiMenu, { className: "h-
|
|
46468
|
+
/* @__PURE__ */ React.createElement(BiMenu, { className: "h-8 w-auto text-gray-600" })
|
|
46210
46469
|
)), /* @__PURE__ */ React.createElement(
|
|
46211
46470
|
"div",
|
|
46212
46471
|
{
|
|
@@ -46227,8 +46486,8 @@ const Nav = ({
|
|
|
46227
46486
|
toggleMenu();
|
|
46228
46487
|
}
|
|
46229
46488
|
},
|
|
46230
|
-
/* @__PURE__ */ React.createElement(BiMenu, { className: "h-
|
|
46231
|
-
), /* @__PURE__ */ React.createElement("span", { className: "text-left inline-flex items-center text-xl tracking-wide text-gray-800/80 flex-1 gap-1" }, /* @__PURE__ */ React.createElement(
|
|
46489
|
+
/* @__PURE__ */ React.createElement(BiMenu, { className: "h-8 w-auto text-gray-600" })
|
|
46490
|
+
), /* @__PURE__ */ React.createElement("span", { className: "text-left inline-flex items-center text-xl tracking-wide text-gray-800/80 flex-1 gap-1" }, /* @__PURE__ */ React.createElement(TinaExtendedIcon, { className: "h-8 w-auto fill-orange-500" }))),
|
|
46232
46491
|
children,
|
|
46233
46492
|
/* @__PURE__ */ React.createElement("div", { className: "flex flex-col px-6 flex-1 overflow-auto" }, showCollections && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.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.createElement("span", null, "Collections"), isLocalMode && /* @__PURE__ */ React.createElement("span", { className: "flex items-center" }, /* @__PURE__ */ React.createElement(
|
|
46234
46493
|
"a",
|
|
@@ -46478,60 +46737,6 @@ function BreadcrumbEllipsis({
|
|
|
46478
46737
|
/* @__PURE__ */ React.createElement("span", { className: "sr-only" }, "More")
|
|
46479
46738
|
);
|
|
46480
46739
|
}
|
|
46481
|
-
function DropdownMenu({
|
|
46482
|
-
...props
|
|
46483
|
-
}) {
|
|
46484
|
-
return /* @__PURE__ */ React.createElement(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
46485
|
-
}
|
|
46486
|
-
function DropdownMenuTrigger({
|
|
46487
|
-
...props
|
|
46488
|
-
}) {
|
|
46489
|
-
return /* @__PURE__ */ React.createElement(
|
|
46490
|
-
DropdownMenuPrimitive.Trigger,
|
|
46491
|
-
{
|
|
46492
|
-
"data-slot": "dropdown-menu-trigger",
|
|
46493
|
-
...props
|
|
46494
|
-
}
|
|
46495
|
-
);
|
|
46496
|
-
}
|
|
46497
|
-
function DropdownMenuContent({
|
|
46498
|
-
className,
|
|
46499
|
-
sideOffset = 4,
|
|
46500
|
-
...props
|
|
46501
|
-
}) {
|
|
46502
|
-
return /* @__PURE__ */ React.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React.createElement(
|
|
46503
|
-
DropdownMenuPrimitive.Content,
|
|
46504
|
-
{
|
|
46505
|
-
"data-slot": "dropdown-menu-content",
|
|
46506
|
-
sideOffset,
|
|
46507
|
-
className: cn(
|
|
46508
|
-
"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",
|
|
46509
|
-
className
|
|
46510
|
-
),
|
|
46511
|
-
...props
|
|
46512
|
-
}
|
|
46513
|
-
));
|
|
46514
|
-
}
|
|
46515
|
-
function DropdownMenuItem({
|
|
46516
|
-
className,
|
|
46517
|
-
inset,
|
|
46518
|
-
variant = "default",
|
|
46519
|
-
...props
|
|
46520
|
-
}) {
|
|
46521
|
-
return /* @__PURE__ */ React.createElement(
|
|
46522
|
-
DropdownMenuPrimitive.Item,
|
|
46523
|
-
{
|
|
46524
|
-
"data-slot": "dropdown-menu-item",
|
|
46525
|
-
"data-inset": inset,
|
|
46526
|
-
"data-variant": variant,
|
|
46527
|
-
className: cn(
|
|
46528
|
-
"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",
|
|
46529
|
-
className
|
|
46530
|
-
),
|
|
46531
|
-
...props
|
|
46532
|
-
}
|
|
46533
|
-
);
|
|
46534
|
-
}
|
|
46535
46740
|
const Item = ({
|
|
46536
46741
|
item,
|
|
46537
46742
|
depth,
|
|
@@ -46800,7 +47005,6 @@ const FormBreadcrumbs = ({
|
|
|
46800
47005
|
DropdownMenuItem,
|
|
46801
47006
|
{
|
|
46802
47007
|
key: breadcrumb.formId,
|
|
46803
|
-
className: "cursor-pointer text-gray-700 hover:text-blue-500",
|
|
46804
47008
|
onClick: (e3) => {
|
|
46805
47009
|
e3.preventDefault();
|
|
46806
47010
|
goBack(breadcrumb.formId, breadcrumb.formName);
|
|
@@ -47128,7 +47332,7 @@ const updateBodyDisplacement = ({
|
|
|
47128
47332
|
};
|
|
47129
47333
|
const SidebarHeader = ({ isLocalMode }) => {
|
|
47130
47334
|
const { toggleSidebarOpen, toggleMenu } = React.useContext(SidebarContext);
|
|
47131
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "p-2 flex-grow-0 w-full" }, !isLocalMode && /* @__PURE__ */ React.createElement(BillingWarning, null), /* @__PURE__ */ React.createElement("div", { className: "w-full flex justify-between items-center" }, /* @__PURE__ */ React.createElement("div", { className: "flex" }, /* @__PURE__ */ React.createElement(
|
|
47335
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "p-2 flex-grow-0 w-full" }, !isLocalMode && /* @__PURE__ */ React.createElement(BillingWarning, null), /* @__PURE__ */ React.createElement("div", { className: "w-full flex justify-between items-center" }, /* @__PURE__ */ React.createElement("div", { className: "flex overflow-hidden py-1" }, /* @__PURE__ */ React.createElement(
|
|
47132
47336
|
"button",
|
|
47133
47337
|
{
|
|
47134
47338
|
className: "p-2 hover:bg-gray-100 transition-colors duration-150 ease-in-out rounded",
|
|
@@ -47136,8 +47340,8 @@ const SidebarHeader = ({ isLocalMode }) => {
|
|
|
47136
47340
|
title: "Open navigation menu",
|
|
47137
47341
|
"aria-label": "Open navigation menu"
|
|
47138
47342
|
},
|
|
47139
|
-
/* @__PURE__ */ React.createElement(BiMenu, { className: "h-
|
|
47140
|
-
), /* @__PURE__ */ React.createElement(
|
|
47343
|
+
/* @__PURE__ */ React.createElement(BiMenu, { className: "h-8 w-auto text-gray-600" })
|
|
47344
|
+
), /* @__PURE__ */ React.createElement(TinaIcon, { className: "self-center h-10 min-w-10 w-auto text-orange-500 mr-2" }), /* @__PURE__ */ React.createElement(BranchButton, { className: "overflow-hidden mr-2" }), /* @__PURE__ */ React.createElement(LocalWarning, { className: "px-4" })), /* @__PURE__ */ React.createElement("div", { className: "flex" }, /* @__PURE__ */ React.createElement(BranchPreviewButton, null), /* @__PURE__ */ React.createElement(
|
|
47141
47345
|
"button",
|
|
47142
47346
|
{
|
|
47143
47347
|
type: "button",
|
|
@@ -47984,10 +48188,7 @@ const BranchModal = ({ close: close2 }) => {
|
|
|
47984
48188
|
}
|
|
47985
48189
|
))));
|
|
47986
48190
|
};
|
|
47987
|
-
const
|
|
47988
|
-
return branchName.replace(/^tina\//, "");
|
|
47989
|
-
};
|
|
47990
|
-
const BranchButton = () => {
|
|
48191
|
+
const BranchButton = ({ className = "" }) => {
|
|
47991
48192
|
const [open, setOpen] = React.useState(false);
|
|
47992
48193
|
const { currentBranch } = useBranchData();
|
|
47993
48194
|
const cms = useCMS();
|
|
@@ -47997,22 +48198,19 @@ const BranchButton = () => {
|
|
|
47997
48198
|
}
|
|
47998
48199
|
const isProtected = cms.api.tina.usingProtectedBranch();
|
|
47999
48200
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
48000
|
-
|
|
48201
|
+
Button$1,
|
|
48001
48202
|
{
|
|
48203
|
+
variant: "secondary",
|
|
48204
|
+
size: "custom",
|
|
48002
48205
|
className: cn(
|
|
48003
|
-
|
|
48004
|
-
|
|
48005
|
-
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"
|
|
48206
|
+
"pointer-events-auto px-3 py-3 flex shrink gap-1 items-center justify-between",
|
|
48207
|
+
className
|
|
48006
48208
|
),
|
|
48007
|
-
onClick: () => setOpen(true)
|
|
48209
|
+
onClick: () => setOpen(true),
|
|
48210
|
+
title: currentBranch
|
|
48008
48211
|
},
|
|
48009
|
-
isProtected ? /* @__PURE__ */ React.createElement(BiLockAlt, { className: "flex-shrink-0 h-
|
|
48010
|
-
|
|
48011
|
-
{
|
|
48012
|
-
className: `flex-shrink-0 h-4 w-auto opacity-70 text-zinc-400`
|
|
48013
|
-
}
|
|
48014
|
-
),
|
|
48015
|
-
/* @__PURE__ */ React.createElement("span", { className: "truncate max-w-full -mr-1" }, trimPrefix(currentBranch)),
|
|
48212
|
+
isProtected ? /* @__PURE__ */ React.createElement(BiLockAlt, { className: "flex-shrink-0 h-6 w-auto opacity-70" }) : /* @__PURE__ */ React.createElement(BiGitBranch, { className: "flex-shrink-0 h-6 w-auto opacity-70 text-zinc-400" }),
|
|
48213
|
+
/* @__PURE__ */ React.createElement("span", { className: "truncate max-w-full -mr-1" }, currentBranch),
|
|
48016
48214
|
/* @__PURE__ */ React.createElement(
|
|
48017
48215
|
BiChevronDown,
|
|
48018
48216
|
{
|
|
@@ -48042,7 +48240,7 @@ const BranchPreviewButton = (props) => {
|
|
|
48042
48240
|
className: "p-2 text-gray-500 hover:text-blue-500 hover:bg-gray-100 transition-colors duration-150 ease-in-out rounded",
|
|
48043
48241
|
...props,
|
|
48044
48242
|
onClick: () => {
|
|
48045
|
-
window.open(
|
|
48243
|
+
window.open("", "_blank");
|
|
48046
48244
|
},
|
|
48047
48245
|
title: "Preview site in new tab"
|
|
48048
48246
|
},
|
|
@@ -63846,7 +64044,9 @@ const CreateBranchModal = ({
|
|
|
63846
64044
|
const tinaApi = cms.api.tina;
|
|
63847
64045
|
const { setCurrentBranch } = useBranchData();
|
|
63848
64046
|
const [disabled, setDisabled] = React.useState(false);
|
|
63849
|
-
const [newBranchName, setNewBranchName] = React.useState(
|
|
64047
|
+
const [newBranchName, setNewBranchName] = React.useState(
|
|
64048
|
+
`${crudType}-${path3}`
|
|
64049
|
+
);
|
|
63850
64050
|
const [isExecuting, setIsExecuting] = React.useState(false);
|
|
63851
64051
|
const [errorMessage, setErrorMessage] = React.useState("");
|
|
63852
64052
|
const [currentStep, setCurrentStep] = React.useState(0);
|
|
@@ -64015,13 +64215,7 @@ const CreateBranchModal = ({
|
|
|
64015
64215
|
)
|
|
64016
64216
|
) : isActive ? /* @__PURE__ */ React.createElement(AiOutlineLoading, { className: "animate-spin text-lg" }) : stepNumber
|
|
64017
64217
|
),
|
|
64018
|
-
/* @__PURE__ */ React.createElement("div", { className: "text-center max-w-24" }, /* @__PURE__ */ React.createElement(
|
|
64019
|
-
"div",
|
|
64020
|
-
{
|
|
64021
|
-
className: `text-sm font-semibold leading-tight ${isActive ? "text-blue-600" : isCompleted ? "text-green-600" : "text-gray-400"}`
|
|
64022
|
-
},
|
|
64023
|
-
step.name
|
|
64024
|
-
), /* @__PURE__ */ React.createElement("div", { className: "text-xs text-gray-400 mt-1 leading-tight" }, step.description))
|
|
64218
|
+
/* @__PURE__ */ React.createElement("div", { className: "text-center max-w-24" }, /* @__PURE__ */ React.createElement("div", { className: "text-sm font-semibold leading-tight" }, step.name), /* @__PURE__ */ React.createElement("div", { className: "text-xs text-gray-400 mt-1 leading-tight" }, step.description))
|
|
64025
64219
|
);
|
|
64026
64220
|
})), /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-between mb-4" }, /* @__PURE__ */ React.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.createElement("div", { className: "flex items-center gap-1 text-sm text-gray-500" }, /* @__PURE__ */ React.createElement("svg", { className: "w-4 h-4", fill: "currentColor", viewBox: "0 0 20 20" }, /* @__PURE__ */ React.createElement(
|
|
64027
64221
|
"path",
|
|
@@ -64058,9 +64252,19 @@ const CreateBranchModal = ({
|
|
|
64058
64252
|
if (isExecuting) {
|
|
64059
64253
|
return renderProgressIndicator();
|
|
64060
64254
|
} else {
|
|
64061
|
-
return /* @__PURE__ */ React.createElement("div", { className: "max-w-sm" }, errorMessage && /* @__PURE__ */ React.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.createElement(BiError, { className: "w-5 h-auto text-red-400 flex-shrink-0" }), /* @__PURE__ */ React.createElement("span", { className: "text-sm" }, /* @__PURE__ */ React.createElement("b", null, "Error:"), " ", errorMessage)), /* @__PURE__ */ React.createElement("p", { className: "text-lg text-gray-700 font-bold mb-2" }, "
|
|
64255
|
+
return /* @__PURE__ */ React.createElement("div", { className: "max-w-sm" }, errorMessage && /* @__PURE__ */ React.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.createElement(BiError, { className: "w-5 h-auto text-red-400 flex-shrink-0" }), /* @__PURE__ */ React.createElement("span", { className: "text-sm" }, /* @__PURE__ */ React.createElement("b", null, "Error:"), " ", errorMessage)), /* @__PURE__ */ React.createElement("p", { className: "text-lg text-gray-700 font-bold mb-2" }, "First, let's create a copy"), /* @__PURE__ */ React.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.createElement(
|
|
64256
|
+
"a",
|
|
64257
|
+
{
|
|
64258
|
+
className: "underline text-tina-orange-dark font-medium",
|
|
64259
|
+
href: "https://tina.io/docs/tinacloud/editorial-workflow",
|
|
64260
|
+
target: "_blank"
|
|
64261
|
+
},
|
|
64262
|
+
"Editorial Workflow"
|
|
64263
|
+
)), /* @__PURE__ */ React.createElement(
|
|
64062
64264
|
PrefixedTextField,
|
|
64063
64265
|
{
|
|
64266
|
+
name: "new-branch-name",
|
|
64267
|
+
label: "Branch Name",
|
|
64064
64268
|
placeholder: "e.g. {{PAGE-NAME}}-updates",
|
|
64065
64269
|
value: newBranchName,
|
|
64066
64270
|
onChange: (e3) => {
|
|
@@ -64072,42 +64276,49 @@ const CreateBranchModal = ({
|
|
|
64072
64276
|
));
|
|
64073
64277
|
}
|
|
64074
64278
|
};
|
|
64075
|
-
return /* @__PURE__ */ React.createElement(Modal, { className: "flex" }, /* @__PURE__ */ React.createElement(PopupModal, { className: "w-auto" }, /* @__PURE__ */ React.createElement(ModalHeader, { close: isExecuting ? void 0 : close2 }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-between w-full" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center" },
|
|
64076
|
-
|
|
64279
|
+
return /* @__PURE__ */ React.createElement(Modal, { className: "flex" }, /* @__PURE__ */ React.createElement(PopupModal, { className: "w-auto" }, /* @__PURE__ */ React.createElement(ModalHeader, { close: isExecuting ? void 0 : close2 }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-between w-full" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center" }, "Save changes to new branch"))), /* @__PURE__ */ React.createElement(ModalBody, { padded: true }, renderStateContent()), !isExecuting && /* @__PURE__ */ React.createElement(ModalActions, { align: "end" }, /* @__PURE__ */ React.createElement(Button$1, { variant: "secondary", className: "w-full sm:w-auto" }, "Cancel"), /* @__PURE__ */ React.createElement(
|
|
64280
|
+
DropdownButton,
|
|
64077
64281
|
{
|
|
64078
64282
|
variant: "primary",
|
|
64079
|
-
|
|
64283
|
+
align: "start",
|
|
64284
|
+
className: "w-full sm:w-auto",
|
|
64080
64285
|
disabled: newBranchName === "" || disabled,
|
|
64081
|
-
|
|
64082
|
-
|
|
64083
|
-
"Confirm"
|
|
64084
|
-
), /* @__PURE__ */ React.createElement(
|
|
64085
|
-
OverflowMenu$1,
|
|
64086
|
-
{
|
|
64087
|
-
className: "-ml-2",
|
|
64088
|
-
toolbarItems: [
|
|
64286
|
+
onMainAction: executeEditorialWorkflow,
|
|
64287
|
+
items: [
|
|
64089
64288
|
{
|
|
64090
|
-
name: "override",
|
|
64091
64289
|
label: "Save to Protected Branch",
|
|
64092
|
-
|
|
64093
|
-
onMouseDown: () => {
|
|
64290
|
+
onClick: () => {
|
|
64094
64291
|
close2();
|
|
64095
64292
|
safeSubmit();
|
|
64096
|
-
}
|
|
64293
|
+
},
|
|
64294
|
+
icon: /* @__PURE__ */ React.createElement(TriangleAlert, { className: "w-4 h-4" })
|
|
64097
64295
|
}
|
|
64098
64296
|
]
|
|
64099
|
-
}
|
|
64297
|
+
},
|
|
64298
|
+
/* @__PURE__ */ React.createElement(
|
|
64299
|
+
GitBranchIcon,
|
|
64300
|
+
{
|
|
64301
|
+
className: "w-4 h-4 mr-1",
|
|
64302
|
+
style: { fill: "none" }
|
|
64303
|
+
}
|
|
64304
|
+
),
|
|
64305
|
+
"Save to a new branch"
|
|
64100
64306
|
))));
|
|
64101
64307
|
};
|
|
64102
|
-
const PrefixedTextField = ({
|
|
64103
|
-
|
|
64308
|
+
const PrefixedTextField = ({
|
|
64309
|
+
label = null,
|
|
64310
|
+
prefix = "tina/",
|
|
64311
|
+
...props
|
|
64312
|
+
}) => {
|
|
64313
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, label && /* @__PURE__ */ React.createElement(FieldLabel, { name: props.name }, label), /* @__PURE__ */ React.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.createElement("span", { className: "pl-3 pr-2 py-2 text-base text-tina-orange-dark bg-tina-orange-light" }, prefix), /* @__PURE__ */ React.createElement(
|
|
64104
64314
|
"input",
|
|
64105
64315
|
{
|
|
64316
|
+
id: props.name,
|
|
64106
64317
|
type: "text",
|
|
64107
64318
|
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",
|
|
64108
64319
|
...props
|
|
64109
64320
|
}
|
|
64110
|
-
));
|
|
64321
|
+
)));
|
|
64111
64322
|
};
|
|
64112
64323
|
const NestedForm = (props) => {
|
|
64113
64324
|
const FormPortal = useFormPortal();
|
|
@@ -65443,9 +65654,9 @@ const editorVariants = cva(
|
|
|
65443
65654
|
ai: "w-full px-0 text-base md:text-sm",
|
|
65444
65655
|
aiChat: "max-h-[min(70vh,320px)] w-full max-w-[700px] overflow-y-auto px-3 py-2 text-base md:text-sm",
|
|
65445
65656
|
comment: cn$2("rounded-none border-none bg-transparent text-sm"),
|
|
65446
|
-
default: "size-full px-
|
|
65447
|
-
demo: "size-full px-
|
|
65448
|
-
fullWidth: "size-full px-
|
|
65657
|
+
default: "size-full px-2 sm:px-4 pt-2 text-base",
|
|
65658
|
+
demo: "size-full px-2 sm:px-4 pt-2 text-base h-[650px]",
|
|
65659
|
+
fullWidth: "size-full px-2 sm:px-4 pt-4 pb-72 text-base",
|
|
65449
65660
|
none: "",
|
|
65450
65661
|
select: "px-3 py-2 text-base data-readonly:w-fit"
|
|
65451
65662
|
}
|
|
@@ -65877,7 +66088,7 @@ const EmbedButton = ({ editor, templates }) => {
|
|
|
65877
66088
|
className: "w-full p-2 border border-gray-300 rounded",
|
|
65878
66089
|
onChange: filterChange
|
|
65879
66090
|
}
|
|
65880
|
-
), /* @__PURE__ */ React__default.createElement(DropdownMenuSeparator, null), filteredTemplates.map((template) => /* @__PURE__ */ React__default.createElement(
|
|
66091
|
+
), /* @__PURE__ */ React__default.createElement(DropdownMenuSeparator$1, null), filteredTemplates.map((template) => /* @__PURE__ */ React__default.createElement(
|
|
65881
66092
|
DropdownMenuItem$1,
|
|
65882
66093
|
{
|
|
65883
66094
|
key: template.name,
|
|
@@ -119036,7 +119247,7 @@ mutation addPendingDocumentMutation(
|
|
|
119036
119247
|
}
|
|
119037
119248
|
usingProtectedBranch() {
|
|
119038
119249
|
var _a2;
|
|
119039
|
-
return this.usingEditorialWorkflow && ((_a2 = this.protectedBranches) == null ? void 0 : _a2.includes(this.branch));
|
|
119250
|
+
return this.usingEditorialWorkflow && ((_a2 = this.protectedBranches) == null ? void 0 : _a2.includes(decodeURIComponent(this.branch)));
|
|
119040
119251
|
}
|
|
119041
119252
|
async createBranch({ baseBranch, branchName }) {
|
|
119042
119253
|
const url = `${this.contentApiBase}/github/${this.clientId}/create_branch`;
|
|
@@ -119249,7 +119460,7 @@ class LocalSearchClient {
|
|
|
119249
119460
|
}
|
|
119250
119461
|
}
|
|
119251
119462
|
function ModalBuilder(modalProps) {
|
|
119252
|
-
return /* @__PURE__ */ React__default.createElement(Modal, null, /* @__PURE__ */ React__default.createElement(ModalPopup, null, /* @__PURE__ */ React__default.createElement(ModalHeader, null,
|
|
119463
|
+
return /* @__PURE__ */ React__default.createElement(Modal, null, /* @__PURE__ */ React__default.createElement(ModalPopup, null, /* @__PURE__ */ React__default.createElement(ModalHeader, null, modalProps.title), /* @__PURE__ */ React__default.createElement(ModalBody, { padded: true }, modalProps.message && (typeof modalProps.message === "string" ? /* @__PURE__ */ React__default.createElement("p", null, modalProps.message) : modalProps.message), modalProps.error && /* @__PURE__ */ React__default.createElement(ErrorLabel, null, modalProps.error), modalProps.children), /* @__PURE__ */ React__default.createElement(ModalActions, null, modalProps.actions.map((action) => /* @__PURE__ */ React__default.createElement(AsyncButton, { key: action.name, ...action })))));
|
|
119253
119464
|
}
|
|
119254
119465
|
const ErrorLabel = ({ style = {}, ...props }) => /* @__PURE__ */ React__default.createElement("p", { style: { ...style, color: "var(--tina-color-error)" }, ...props });
|
|
119255
119466
|
const AsyncButton = ({ name, primary, action }) => {
|
|
@@ -120463,7 +120674,7 @@ const PageWrapper = ({
|
|
|
120463
120674
|
headerClassName,
|
|
120464
120675
|
children
|
|
120465
120676
|
}) => {
|
|
120466
|
-
return /* @__PURE__ */ React__default.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__default.createElement("div", { className: `py-2
|
|
120677
|
+
return /* @__PURE__ */ React__default.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__default.createElement("div", { className: `py-2 pr-4 w-full ${headerClassName}` }, /* @__PURE__ */ React__default.createElement(LocalWarning, null), /* @__PURE__ */ React__default.createElement(BillingWarning, null), /* @__PURE__ */ React__default.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React__default.createElement(TinaIcon, { className: "self-center h-10 min-w-10 w-auto text-orange-500" }), /* @__PURE__ */ React__default.createElement(BranchButton, null), /* @__PURE__ */ React__default.createElement(BranchPreviewButton, null))), children);
|
|
120467
120678
|
};
|
|
120468
120679
|
const PageHeader = ({
|
|
120469
120680
|
children
|
|
@@ -120568,6 +120779,7 @@ const handleNavigate = async (navigate, cms, collection, collectionDefinition, d
|
|
|
120568
120779
|
const plugins2 = cms.plugins.all("tina-admin");
|
|
120569
120780
|
const routeMapping = plugins2.find(({ name }) => name === "route-mapping");
|
|
120570
120781
|
const tinaPreview = cms.flags.get("tina-preview") || false;
|
|
120782
|
+
const basePath = cms.flags.get("tina-basepath");
|
|
120571
120783
|
let routeOverride = ((_a2 = collectionDefinition.ui) == null ? void 0 : _a2.router) ? await ((_b = collectionDefinition.ui) == null ? void 0 : _b.router({
|
|
120572
120784
|
document: document2,
|
|
120573
120785
|
collection: collectionDefinition
|
|
@@ -120576,7 +120788,7 @@ const handleNavigate = async (navigate, cms, collection, collectionDefinition, d
|
|
|
120576
120788
|
if (routeOverride.startsWith("/")) {
|
|
120577
120789
|
routeOverride = routeOverride.slice(1);
|
|
120578
120790
|
}
|
|
120579
|
-
tinaPreview ? navigate(
|
|
120791
|
+
tinaPreview ? navigate(`/~${basePath ? `/${basePath}` : ""}/${routeOverride}`) : window.location.href = `${basePath ? `/${basePath}` : ""}/${routeOverride}`;
|
|
120580
120792
|
return null;
|
|
120581
120793
|
} else {
|
|
120582
120794
|
const pathToDoc = document2._sys.breadcrumbs;
|
|
@@ -120944,7 +121156,7 @@ const CollectionListPage = () => {
|
|
|
120944
121156
|
},
|
|
120945
121157
|
to: "/collections/new-folder",
|
|
120946
121158
|
className: cn$1(
|
|
120947
|
-
"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-
|
|
121159
|
+
"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",
|
|
120948
121160
|
collection.templates && "opacity-50 pointer-events-none cursor-not-allowed"
|
|
120949
121161
|
),
|
|
120950
121162
|
"aria-disabled": !!collection.templates,
|
|
@@ -120982,7 +121194,7 @@ const CollectionListPage = () => {
|
|
|
120982
121194
|
"new",
|
|
120983
121195
|
collectionName
|
|
120984
121196
|
].join("/")}`,
|
|
120985
|
-
className: "inline-flex items-center font-medium focus:outline-none focus:ring-
|
|
121197
|
+
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"
|
|
120986
121198
|
},
|
|
120987
121199
|
/* @__PURE__ */ React__default.createElement(FaFile, { className: "mr-2" }),
|
|
120988
121200
|
"Add File"
|
|
@@ -121113,15 +121325,9 @@ const CollectionListPage = () => {
|
|
|
121113
121325
|
}
|
|
121114
121326
|
},
|
|
121115
121327
|
allowDelete && {
|
|
121116
|
-
name: "
|
|
121117
|
-
label: "
|
|
121118
|
-
Icon: /* @__PURE__ */ React__default.createElement(
|
|
121119
|
-
BiTrash,
|
|
121120
|
-
{
|
|
121121
|
-
size: "1.3rem",
|
|
121122
|
-
className: "text-red-500"
|
|
121123
|
-
}
|
|
121124
|
-
),
|
|
121328
|
+
name: "rename",
|
|
121329
|
+
label: "Rename",
|
|
121330
|
+
Icon: /* @__PURE__ */ React__default.createElement(BiRename, { size: "1.3rem" }),
|
|
121125
121331
|
onMouseDown: () => {
|
|
121126
121332
|
setVars((old) => ({
|
|
121127
121333
|
...old,
|
|
@@ -121134,19 +121340,20 @@ const CollectionListPage = () => {
|
|
|
121134
121340
|
) + document2.node._sys.extension,
|
|
121135
121341
|
newRelativePath: ""
|
|
121136
121342
|
}));
|
|
121137
|
-
|
|
121343
|
+
setRenameModalOpen(true);
|
|
121138
121344
|
}
|
|
121139
121345
|
},
|
|
121140
121346
|
allowDelete && {
|
|
121141
|
-
name: "
|
|
121142
|
-
label: "
|
|
121347
|
+
name: "delete",
|
|
121348
|
+
label: "Delete",
|
|
121143
121349
|
Icon: /* @__PURE__ */ React__default.createElement(
|
|
121144
|
-
|
|
121350
|
+
BiTrash,
|
|
121145
121351
|
{
|
|
121146
121352
|
size: "1.3rem",
|
|
121147
121353
|
className: "text-red-500"
|
|
121148
121354
|
}
|
|
121149
121355
|
),
|
|
121356
|
+
className: "text-red-500",
|
|
121150
121357
|
onMouseDown: () => {
|
|
121151
121358
|
setVars((old) => ({
|
|
121152
121359
|
...old,
|
|
@@ -121159,7 +121366,7 @@ const CollectionListPage = () => {
|
|
|
121159
121366
|
) + document2.node._sys.extension,
|
|
121160
121367
|
newRelativePath: ""
|
|
121161
121368
|
}));
|
|
121162
|
-
|
|
121369
|
+
setDeleteModalOpen(true);
|
|
121163
121370
|
}
|
|
121164
121371
|
}
|
|
121165
121372
|
].filter(Boolean)
|
|
@@ -122555,6 +122762,7 @@ export {
|
|
|
122555
122762
|
Dismissible,
|
|
122556
122763
|
DragHandle,
|
|
122557
122764
|
DragIcon,
|
|
122765
|
+
DropdownButton,
|
|
122558
122766
|
DummyMediaStore,
|
|
122559
122767
|
DuplicateIcon,
|
|
122560
122768
|
EditIcon,
|
|
@@ -122684,6 +122892,7 @@ export {
|
|
|
122684
122892
|
TinaCloudAuthProvider,
|
|
122685
122893
|
TinaCloudAuthWall,
|
|
122686
122894
|
TinaCloudProvider,
|
|
122895
|
+
TinaExtendedIcon,
|
|
122687
122896
|
TinaField,
|
|
122688
122897
|
TinaForm,
|
|
122689
122898
|
TinaIcon,
|