@tinacms/app 0.0.19 → 0.0.20
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/assets/out.es.js +148 -16
- package/package.json +3 -3
package/dist/assets/out.es.js
CHANGED
|
@@ -82062,13 +82062,13 @@ const ModalLayout = ({
|
|
|
82062
82062
|
});
|
|
82063
82063
|
};
|
|
82064
82064
|
const textFieldClasses = "shadow-inner focus:shadow-outline focus:border-blue-500 focus:outline-none block text-base px-3 py-2 text-gray-600 w-full bg-white border border-gray-200 transition-all ease-out duration-150 focus:text-gray-900 rounded-md";
|
|
82065
|
-
const disabledClasses = "
|
|
82065
|
+
const disabledClasses = "opacity-50 pointer-events-none cursor-not-allowed";
|
|
82066
82066
|
const BaseTextField = ({
|
|
82067
82067
|
...props
|
|
82068
82068
|
}) => {
|
|
82069
82069
|
return /* @__PURE__ */ jsx$1("input", {
|
|
82070
82070
|
type: "text",
|
|
82071
|
-
className: `${textFieldClasses}${(props == null ? void 0 : props.disabled) ? disabledClasses : ""}`,
|
|
82071
|
+
className: `${textFieldClasses} ${(props == null ? void 0 : props.disabled) ? disabledClasses : ""}`,
|
|
82072
82072
|
...props
|
|
82073
82073
|
});
|
|
82074
82074
|
};
|
|
@@ -112324,6 +112324,9 @@ var styles = `.tina-tailwind {
|
|
|
112324
112324
|
--tw-backdrop-saturate: ;
|
|
112325
112325
|
--tw-backdrop-sepia: ;
|
|
112326
112326
|
}
|
|
112327
|
+
.tina-tailwind .pointer-events-none {
|
|
112328
|
+
pointer-events: none;
|
|
112329
|
+
}
|
|
112327
112330
|
.tina-tailwind .pointer-events-auto {
|
|
112328
112331
|
pointer-events: auto;
|
|
112329
112332
|
}
|
|
@@ -112363,6 +112366,12 @@ var styles = `.tina-tailwind {
|
|
|
112363
112366
|
.tina-tailwind .top-4 {
|
|
112364
112367
|
top: 16px;
|
|
112365
112368
|
}
|
|
112369
|
+
.tina-tailwind .top-1\\/2 {
|
|
112370
|
+
top: 50%;
|
|
112371
|
+
}
|
|
112372
|
+
.tina-tailwind .left-2 {
|
|
112373
|
+
left: 8px;
|
|
112374
|
+
}
|
|
112366
112375
|
.tina-tailwind .z-overlay {
|
|
112367
112376
|
z-index: 10600;
|
|
112368
112377
|
}
|
|
@@ -112439,12 +112448,12 @@ var styles = `.tina-tailwind {
|
|
|
112439
112448
|
.tina-tailwind .h-7 {
|
|
112440
112449
|
height: 28px;
|
|
112441
112450
|
}
|
|
112442
|
-
.tina-tailwind .h-10 {
|
|
112443
|
-
height: 40px;
|
|
112444
|
-
}
|
|
112445
112451
|
.tina-tailwind .h-5 {
|
|
112446
112452
|
height: 20px;
|
|
112447
112453
|
}
|
|
112454
|
+
.tina-tailwind .h-10 {
|
|
112455
|
+
height: 40px;
|
|
112456
|
+
}
|
|
112448
112457
|
.tina-tailwind .h-12 {
|
|
112449
112458
|
height: 48px;
|
|
112450
112459
|
}
|
|
@@ -112508,6 +112517,10 @@ var styles = `.tina-tailwind {
|
|
|
112508
112517
|
--tw-translate-x: 100%;
|
|
112509
112518
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
112510
112519
|
}
|
|
112520
|
+
.tina-tailwind .-translate-y-1\\/2 {
|
|
112521
|
+
--tw-translate-y: -50%;
|
|
112522
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
112523
|
+
}
|
|
112511
112524
|
.tina-tailwind .scale-95 {
|
|
112512
112525
|
--tw-scale-x: .95;
|
|
112513
112526
|
--tw-scale-y: .95;
|
|
@@ -112575,6 +112588,11 @@ var styles = `.tina-tailwind {
|
|
|
112575
112588
|
.tina-tailwind .overflow-y-auto {
|
|
112576
112589
|
overflow-y: auto;
|
|
112577
112590
|
}
|
|
112591
|
+
.tina-tailwind .truncate {
|
|
112592
|
+
overflow: hidden;
|
|
112593
|
+
text-overflow: ellipsis;
|
|
112594
|
+
white-space: nowrap;
|
|
112595
|
+
}
|
|
112578
112596
|
.tina-tailwind .whitespace-normal {
|
|
112579
112597
|
white-space: normal;
|
|
112580
112598
|
}
|
|
@@ -112587,12 +112605,12 @@ var styles = `.tina-tailwind {
|
|
|
112587
112605
|
.tina-tailwind .rounded {
|
|
112588
112606
|
border-radius: 4px;
|
|
112589
112607
|
}
|
|
112590
|
-
.tina-tailwind .rounded-full {
|
|
112591
|
-
border-radius: 9999px;
|
|
112592
|
-
}
|
|
112593
112608
|
.tina-tailwind .rounded-md {
|
|
112594
112609
|
border-radius: 6px;
|
|
112595
112610
|
}
|
|
112611
|
+
.tina-tailwind .rounded-full {
|
|
112612
|
+
border-radius: 9999px;
|
|
112613
|
+
}
|
|
112596
112614
|
.tina-tailwind .rounded-r-md {
|
|
112597
112615
|
border-top-right-radius: 6px;
|
|
112598
112616
|
border-bottom-right-radius: 6px;
|
|
@@ -112673,6 +112691,10 @@ var styles = `.tina-tailwind {
|
|
|
112673
112691
|
padding-top: 40px;
|
|
112674
112692
|
padding-bottom: 40px;
|
|
112675
112693
|
}
|
|
112694
|
+
.tina-tailwind .py-2 {
|
|
112695
|
+
padding-top: 8px;
|
|
112696
|
+
padding-bottom: 8px;
|
|
112697
|
+
}
|
|
112676
112698
|
.tina-tailwind .px-20 {
|
|
112677
112699
|
padding-left: 80px;
|
|
112678
112700
|
padding-right: 80px;
|
|
@@ -112685,10 +112707,6 @@ var styles = `.tina-tailwind {
|
|
|
112685
112707
|
padding-top: 4px;
|
|
112686
112708
|
padding-bottom: 4px;
|
|
112687
112709
|
}
|
|
112688
|
-
.tina-tailwind .py-2 {
|
|
112689
|
-
padding-top: 8px;
|
|
112690
|
-
padding-bottom: 8px;
|
|
112691
|
-
}
|
|
112692
112710
|
.tina-tailwind .py-5 {
|
|
112693
112711
|
padding-top: 20px;
|
|
112694
112712
|
padding-bottom: 20px;
|
|
@@ -112702,6 +112720,15 @@ var styles = `.tina-tailwind {
|
|
|
112702
112720
|
.tina-tailwind .pt-16 {
|
|
112703
112721
|
padding-top: 64px;
|
|
112704
112722
|
}
|
|
112723
|
+
.tina-tailwind .pr-3 {
|
|
112724
|
+
padding-right: 12px;
|
|
112725
|
+
}
|
|
112726
|
+
.tina-tailwind .pl-8 {
|
|
112727
|
+
padding-left: 32px;
|
|
112728
|
+
}
|
|
112729
|
+
.tina-tailwind .pl-3 {
|
|
112730
|
+
padding-left: 12px;
|
|
112731
|
+
}
|
|
112705
112732
|
.tina-tailwind .pt-3 {
|
|
112706
112733
|
padding-top: 12px;
|
|
112707
112734
|
}
|
|
@@ -112781,10 +112808,18 @@ var styles = `.tina-tailwind {
|
|
|
112781
112808
|
--tw-text-opacity: 1;
|
|
112782
112809
|
color: rgb(113 108 127 / var(--tw-text-opacity));
|
|
112783
112810
|
}
|
|
112811
|
+
.tina-tailwind .text-gray-300 {
|
|
112812
|
+
--tw-text-opacity: 1;
|
|
112813
|
+
color: rgb(178 173 190 / var(--tw-text-opacity));
|
|
112814
|
+
}
|
|
112784
112815
|
.tina-tailwind .text-gray-400 {
|
|
112785
112816
|
--tw-text-opacity: 1;
|
|
112786
112817
|
color: rgb(145 140 158 / var(--tw-text-opacity));
|
|
112787
112818
|
}
|
|
112819
|
+
.tina-tailwind .text-blue-500 {
|
|
112820
|
+
--tw-text-opacity: 1;
|
|
112821
|
+
color: rgb(0 132 255 / var(--tw-text-opacity));
|
|
112822
|
+
}
|
|
112788
112823
|
.tina-tailwind .text-current {
|
|
112789
112824
|
color: currentColor;
|
|
112790
112825
|
}
|
|
@@ -112819,6 +112854,9 @@ var styles = `.tina-tailwind {
|
|
|
112819
112854
|
.tina-tailwind .opacity-90 {
|
|
112820
112855
|
opacity: .9;
|
|
112821
112856
|
}
|
|
112857
|
+
.tina-tailwind .opacity-20 {
|
|
112858
|
+
opacity: .2;
|
|
112859
|
+
}
|
|
112822
112860
|
.tina-tailwind .opacity-50 {
|
|
112823
112861
|
opacity: .5;
|
|
112824
112862
|
}
|
|
@@ -112835,6 +112873,11 @@ var styles = `.tina-tailwind {
|
|
|
112835
112873
|
--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);
|
|
112836
112874
|
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
112837
112875
|
}
|
|
112876
|
+
.tina-tailwind .shadow-inner {
|
|
112877
|
+
--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
|
|
112878
|
+
--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);
|
|
112879
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
112880
|
+
}
|
|
112838
112881
|
.tina-tailwind .shadow {
|
|
112839
112882
|
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
112840
112883
|
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
|
|
@@ -112924,6 +112967,14 @@ var styles = `.tina-tailwind {
|
|
|
112924
112967
|
.tina-tailwind .hover\\:opacity-60:hover {
|
|
112925
112968
|
opacity: .6;
|
|
112926
112969
|
}
|
|
112970
|
+
.tina-tailwind .focus\\:border-blue-500:focus {
|
|
112971
|
+
--tw-border-opacity: 1;
|
|
112972
|
+
border-color: rgb(0 132 255 / var(--tw-border-opacity));
|
|
112973
|
+
}
|
|
112974
|
+
.tina-tailwind .focus\\:text-gray-900:focus {
|
|
112975
|
+
--tw-text-opacity: 1;
|
|
112976
|
+
color: rgb(37 35 54 / var(--tw-text-opacity));
|
|
112977
|
+
}
|
|
112927
112978
|
.tina-tailwind .focus\\:text-blue-400:focus {
|
|
112928
112979
|
--tw-text-opacity: 1;
|
|
112929
112980
|
color: rgb(34 150 254 / var(--tw-text-opacity));
|
|
@@ -112949,6 +113000,30 @@ var styles = `.tina-tailwind {
|
|
|
112949
113000
|
--tw-ring-opacity: 1;
|
|
112950
113001
|
--tw-ring-color: rgb(0 132 255 / var(--tw-ring-opacity));
|
|
112951
113002
|
}
|
|
113003
|
+
.tina-tailwind .group:hover .group-hover\\:border-gray-200 {
|
|
113004
|
+
--tw-border-opacity: 1;
|
|
113005
|
+
border-color: rgb(225 221 236 / var(--tw-border-opacity));
|
|
113006
|
+
}
|
|
113007
|
+
.tina-tailwind .group:hover .group-hover\\:bg-white {
|
|
113008
|
+
--tw-bg-opacity: 1;
|
|
113009
|
+
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
|
113010
|
+
}
|
|
113011
|
+
.tina-tailwind .group:hover .group-hover\\:text-gray-600 {
|
|
113012
|
+
--tw-text-opacity: 1;
|
|
113013
|
+
color: rgb(86 81 101 / var(--tw-text-opacity));
|
|
113014
|
+
}
|
|
113015
|
+
.tina-tailwind .group:hover .group-hover\\:opacity-0 {
|
|
113016
|
+
opacity: 0;
|
|
113017
|
+
}
|
|
113018
|
+
.tina-tailwind .group:hover .group-hover\\:opacity-80 {
|
|
113019
|
+
opacity: .8;
|
|
113020
|
+
}
|
|
113021
|
+
.tina-tailwind .group:active .group-active\\:opacity-0 {
|
|
113022
|
+
opacity: 0;
|
|
113023
|
+
}
|
|
113024
|
+
.tina-tailwind .group:active .group-active\\:opacity-80 {
|
|
113025
|
+
opacity: .8;
|
|
113026
|
+
}
|
|
112952
113027
|
`;
|
|
112953
113028
|
class ContentCreatorPlugin {
|
|
112954
113029
|
constructor(options) {
|
|
@@ -114729,6 +114804,34 @@ function HiChevronRight(props) {
|
|
|
114729
114804
|
}]
|
|
114730
114805
|
})(props);
|
|
114731
114806
|
}
|
|
114807
|
+
function FaLock(props) {
|
|
114808
|
+
return GenIcon({
|
|
114809
|
+
"tag": "svg",
|
|
114810
|
+
"attr": {
|
|
114811
|
+
"viewBox": "0 0 448 512"
|
|
114812
|
+
},
|
|
114813
|
+
"child": [{
|
|
114814
|
+
"tag": "path",
|
|
114815
|
+
"attr": {
|
|
114816
|
+
"d": "M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"
|
|
114817
|
+
}
|
|
114818
|
+
}]
|
|
114819
|
+
})(props);
|
|
114820
|
+
}
|
|
114821
|
+
function FaUnlock(props) {
|
|
114822
|
+
return GenIcon({
|
|
114823
|
+
"tag": "svg",
|
|
114824
|
+
"attr": {
|
|
114825
|
+
"viewBox": "0 0 448 512"
|
|
114826
|
+
},
|
|
114827
|
+
"child": [{
|
|
114828
|
+
"tag": "path",
|
|
114829
|
+
"attr": {
|
|
114830
|
+
"d": "M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z"
|
|
114831
|
+
}
|
|
114832
|
+
}]
|
|
114833
|
+
})(props);
|
|
114834
|
+
}
|
|
114732
114835
|
const createDocument = async (cms, collection, template, mutationInfo, values2) => {
|
|
114733
114836
|
const api = new TinaAdminApi(cms);
|
|
114734
114837
|
const {
|
|
@@ -114784,6 +114887,25 @@ const CollectionCreatePage = () => {
|
|
|
114784
114887
|
})
|
|
114785
114888
|
});
|
|
114786
114889
|
};
|
|
114890
|
+
const FilenameInput = (props) => {
|
|
114891
|
+
const [filenameTouched, setFilenameTouched] = React.useState(false);
|
|
114892
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
114893
|
+
className: "group relative block cursor-pointer",
|
|
114894
|
+
onClick: () => {
|
|
114895
|
+
setFilenameTouched(true);
|
|
114896
|
+
},
|
|
114897
|
+
children: [/* @__PURE__ */ jsx$1("input", {
|
|
114898
|
+
type: "text",
|
|
114899
|
+
className: `shadow-inner focus:shadow-outline focus:border-blue-500 focus:outline-none block text-base pr-3 truncate py-2 w-full border transition-all ease-out duration-150 focus:text-gray-900 rounded-md ${props.readonly || !filenameTouched ? "bg-gray-50 text-gray-300 border-gray-150 pointer-events-none pl-8 group-hover:bg-white group-hover:text-gray-600 group-hover:border-gray-200" : "bg-white text-gray-600 border-gray-200 pl-3"}`,
|
|
114900
|
+
...props,
|
|
114901
|
+
disabled: props.readonly || !filenameTouched
|
|
114902
|
+
}), /* @__PURE__ */ jsx$1(FaLock, {
|
|
114903
|
+
className: `text-gray-400 absolute top-1/2 left-2 -translate-y-1/2 pointer-events-none h-5 w-auto transition-opacity duration-150 ease-out ${!filenameTouched && !props.readonly ? "opacity-20 group-hover:opacity-0 group-active:opacity-0" : "opacity-0"}`
|
|
114904
|
+
}), /* @__PURE__ */ jsx$1(FaUnlock, {
|
|
114905
|
+
className: `text-blue-500 absolute top-1/2 left-2 -translate-y-1/2 pointer-events-none h-5 w-auto transition-opacity duration-150 ease-out ${!filenameTouched && !props.readonly ? "opacity-0 group-hover:opacity-80 group-active:opacity-80" : "opacity-0"}`
|
|
114906
|
+
})]
|
|
114907
|
+
});
|
|
114908
|
+
};
|
|
114787
114909
|
const RenderForm$1 = ({
|
|
114788
114910
|
cms,
|
|
114789
114911
|
collection,
|
|
@@ -114835,11 +114957,21 @@ const RenderForm$1 = ({
|
|
|
114835
114957
|
},
|
|
114836
114958
|
id: "create-form",
|
|
114837
114959
|
label: "form",
|
|
114838
|
-
fields: [{
|
|
114960
|
+
fields: [...formInfo.fields, {
|
|
114839
114961
|
name: "filename",
|
|
114840
114962
|
label: "Filename",
|
|
114841
|
-
component:
|
|
114842
|
-
|
|
114963
|
+
component: slugFunction ? wrapFieldsWithMeta(({
|
|
114964
|
+
field,
|
|
114965
|
+
input,
|
|
114966
|
+
meta
|
|
114967
|
+
}) => {
|
|
114968
|
+
var _a3, _b3;
|
|
114969
|
+
return /* @__PURE__ */ jsx$1(FilenameInput, {
|
|
114970
|
+
readonly: (_b3 = (_a3 = template == null ? void 0 : template.ui) == null ? void 0 : _a3.filename) == null ? void 0 : _b3.readonly,
|
|
114971
|
+
...input
|
|
114972
|
+
});
|
|
114973
|
+
}) : "text",
|
|
114974
|
+
disabled: (_b2 = (_a22 = template == null ? void 0 : template.ui) == null ? void 0 : _a22.filename) == null ? void 0 : _b2.readonly,
|
|
114843
114975
|
description: /* @__PURE__ */ jsxs("span", {
|
|
114844
114976
|
children: ["A unique filename for the content.", /* @__PURE__ */ jsx$1("br", {}), "Examples: ", /* @__PURE__ */ jsx$1("code", {
|
|
114845
114977
|
children: "My_Document"
|
|
@@ -114862,7 +114994,7 @@ const RenderForm$1 = ({
|
|
|
114862
114994
|
return "Must begin with a-z, A-Z, 0-9, or _ and contain only a-z, A-Z, 0-9, -, _, ., or /.";
|
|
114863
114995
|
}
|
|
114864
114996
|
}
|
|
114865
|
-
}
|
|
114997
|
+
}],
|
|
114866
114998
|
onSubmit: async (values2) => {
|
|
114867
114999
|
try {
|
|
114868
115000
|
await createDocument(cms, collection, template, mutationInfo, values2);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/app",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@tailwindcss/aspect-ratio": "^0.4.0",
|
|
38
38
|
"@tailwindcss/line-clamp": "^0.3.1",
|
|
39
39
|
"@tailwindcss/typography": "^0.5.4",
|
|
40
|
-
"@tinacms/schema-tools": "0.1.
|
|
40
|
+
"@tinacms/schema-tools": "0.1.7",
|
|
41
41
|
"@tinacms/scripts": "0.51.1",
|
|
42
42
|
"@vitejs/plugin-react": "^1.3.2",
|
|
43
43
|
"@xstate/react": "^3.0.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"react-router-dom": "6",
|
|
56
56
|
"styled-components": "5.3.5",
|
|
57
57
|
"tailwindcss": "^3.1.6",
|
|
58
|
-
"tinacms": "0.69.
|
|
58
|
+
"tinacms": "0.69.15",
|
|
59
59
|
"typescript": "^4.6.4",
|
|
60
60
|
"vite": "2.9.15",
|
|
61
61
|
"vite-node": "^0.23.4",
|