@tinacms/app 0.0.0-20221005184812 → 0.0.0-20221006135801
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 +23 -148
- package/package.json +3 -3
package/dist/assets/out.es.js
CHANGED
|
@@ -81101,6 +81101,9 @@ class TinaMediaStore {
|
|
|
81101
81101
|
const newFiles = [];
|
|
81102
81102
|
if (await this.isAuthenticated()) {
|
|
81103
81103
|
for (const item of media) {
|
|
81104
|
+
console.log({
|
|
81105
|
+
item
|
|
81106
|
+
});
|
|
81104
81107
|
const path2 = `${item.directory && item.directory !== "/" ? `${item.directory}/${item.file.name}` : item.file.name}`;
|
|
81105
81108
|
const res = await this.api.fetchWithToken(`${this.url}/upload_url/${path2}`, {
|
|
81106
81109
|
method: "GET"
|
|
@@ -81111,6 +81114,10 @@ class TinaMediaStore {
|
|
|
81111
81114
|
if (!signedUrl) {
|
|
81112
81115
|
throw new Error("Unexpected error generating upload url");
|
|
81113
81116
|
}
|
|
81117
|
+
console.log(item.file);
|
|
81118
|
+
console.log(item.file.name);
|
|
81119
|
+
console.log(item.file.name.indexOf("/"));
|
|
81120
|
+
console.log(mimeTypes.contentType(item.file.name));
|
|
81114
81121
|
const uploadRes = await this.fetchFunction(signedUrl, {
|
|
81115
81122
|
method: "PUT",
|
|
81116
81123
|
body: item.file,
|
|
@@ -82062,13 +82069,13 @@ const ModalLayout = ({
|
|
|
82062
82069
|
});
|
|
82063
82070
|
};
|
|
82064
82071
|
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 = "
|
|
82072
|
+
const disabledClasses = "bg-gray-100 pointer-events-none opacity-30 cursor-not-allowed";
|
|
82066
82073
|
const BaseTextField = ({
|
|
82067
82074
|
...props
|
|
82068
82075
|
}) => {
|
|
82069
82076
|
return /* @__PURE__ */ jsx$1("input", {
|
|
82070
82077
|
type: "text",
|
|
82071
|
-
className: `${textFieldClasses}
|
|
82078
|
+
className: `${textFieldClasses}${(props == null ? void 0 : props.disabled) ? disabledClasses : ""}`,
|
|
82072
82079
|
...props
|
|
82073
82080
|
});
|
|
82074
82081
|
};
|
|
@@ -112324,9 +112331,6 @@ var styles = `.tina-tailwind {
|
|
|
112324
112331
|
--tw-backdrop-saturate: ;
|
|
112325
112332
|
--tw-backdrop-sepia: ;
|
|
112326
112333
|
}
|
|
112327
|
-
.tina-tailwind .pointer-events-none {
|
|
112328
|
-
pointer-events: none;
|
|
112329
|
-
}
|
|
112330
112334
|
.tina-tailwind .pointer-events-auto {
|
|
112331
112335
|
pointer-events: auto;
|
|
112332
112336
|
}
|
|
@@ -112366,12 +112370,6 @@ var styles = `.tina-tailwind {
|
|
|
112366
112370
|
.tina-tailwind .top-4 {
|
|
112367
112371
|
top: 16px;
|
|
112368
112372
|
}
|
|
112369
|
-
.tina-tailwind .top-1\\/2 {
|
|
112370
|
-
top: 50%;
|
|
112371
|
-
}
|
|
112372
|
-
.tina-tailwind .left-2 {
|
|
112373
|
-
left: 8px;
|
|
112374
|
-
}
|
|
112375
112373
|
.tina-tailwind .z-overlay {
|
|
112376
112374
|
z-index: 10600;
|
|
112377
112375
|
}
|
|
@@ -112448,12 +112446,12 @@ var styles = `.tina-tailwind {
|
|
|
112448
112446
|
.tina-tailwind .h-7 {
|
|
112449
112447
|
height: 28px;
|
|
112450
112448
|
}
|
|
112451
|
-
.tina-tailwind .h-5 {
|
|
112452
|
-
height: 20px;
|
|
112453
|
-
}
|
|
112454
112449
|
.tina-tailwind .h-10 {
|
|
112455
112450
|
height: 40px;
|
|
112456
112451
|
}
|
|
112452
|
+
.tina-tailwind .h-5 {
|
|
112453
|
+
height: 20px;
|
|
112454
|
+
}
|
|
112457
112455
|
.tina-tailwind .h-12 {
|
|
112458
112456
|
height: 48px;
|
|
112459
112457
|
}
|
|
@@ -112517,10 +112515,6 @@ var styles = `.tina-tailwind {
|
|
|
112517
112515
|
--tw-translate-x: 100%;
|
|
112518
112516
|
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));
|
|
112519
112517
|
}
|
|
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
|
-
}
|
|
112524
112518
|
.tina-tailwind .scale-95 {
|
|
112525
112519
|
--tw-scale-x: .95;
|
|
112526
112520
|
--tw-scale-y: .95;
|
|
@@ -112588,11 +112582,6 @@ var styles = `.tina-tailwind {
|
|
|
112588
112582
|
.tina-tailwind .overflow-y-auto {
|
|
112589
112583
|
overflow-y: auto;
|
|
112590
112584
|
}
|
|
112591
|
-
.tina-tailwind .truncate {
|
|
112592
|
-
overflow: hidden;
|
|
112593
|
-
text-overflow: ellipsis;
|
|
112594
|
-
white-space: nowrap;
|
|
112595
|
-
}
|
|
112596
112585
|
.tina-tailwind .whitespace-normal {
|
|
112597
112586
|
white-space: normal;
|
|
112598
112587
|
}
|
|
@@ -112605,12 +112594,12 @@ var styles = `.tina-tailwind {
|
|
|
112605
112594
|
.tina-tailwind .rounded {
|
|
112606
112595
|
border-radius: 4px;
|
|
112607
112596
|
}
|
|
112608
|
-
.tina-tailwind .rounded-md {
|
|
112609
|
-
border-radius: 6px;
|
|
112610
|
-
}
|
|
112611
112597
|
.tina-tailwind .rounded-full {
|
|
112612
112598
|
border-radius: 9999px;
|
|
112613
112599
|
}
|
|
112600
|
+
.tina-tailwind .rounded-md {
|
|
112601
|
+
border-radius: 6px;
|
|
112602
|
+
}
|
|
112614
112603
|
.tina-tailwind .rounded-r-md {
|
|
112615
112604
|
border-top-right-radius: 6px;
|
|
112616
112605
|
border-bottom-right-radius: 6px;
|
|
@@ -112691,10 +112680,6 @@ var styles = `.tina-tailwind {
|
|
|
112691
112680
|
padding-top: 40px;
|
|
112692
112681
|
padding-bottom: 40px;
|
|
112693
112682
|
}
|
|
112694
|
-
.tina-tailwind .py-2 {
|
|
112695
|
-
padding-top: 8px;
|
|
112696
|
-
padding-bottom: 8px;
|
|
112697
|
-
}
|
|
112698
112683
|
.tina-tailwind .px-20 {
|
|
112699
112684
|
padding-left: 80px;
|
|
112700
112685
|
padding-right: 80px;
|
|
@@ -112707,6 +112692,10 @@ var styles = `.tina-tailwind {
|
|
|
112707
112692
|
padding-top: 4px;
|
|
112708
112693
|
padding-bottom: 4px;
|
|
112709
112694
|
}
|
|
112695
|
+
.tina-tailwind .py-2 {
|
|
112696
|
+
padding-top: 8px;
|
|
112697
|
+
padding-bottom: 8px;
|
|
112698
|
+
}
|
|
112710
112699
|
.tina-tailwind .py-5 {
|
|
112711
112700
|
padding-top: 20px;
|
|
112712
112701
|
padding-bottom: 20px;
|
|
@@ -112720,15 +112709,6 @@ var styles = `.tina-tailwind {
|
|
|
112720
112709
|
.tina-tailwind .pt-16 {
|
|
112721
112710
|
padding-top: 64px;
|
|
112722
112711
|
}
|
|
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
|
-
}
|
|
112732
112712
|
.tina-tailwind .pt-3 {
|
|
112733
112713
|
padding-top: 12px;
|
|
112734
112714
|
}
|
|
@@ -112808,18 +112788,10 @@ var styles = `.tina-tailwind {
|
|
|
112808
112788
|
--tw-text-opacity: 1;
|
|
112809
112789
|
color: rgb(113 108 127 / var(--tw-text-opacity));
|
|
112810
112790
|
}
|
|
112811
|
-
.tina-tailwind .text-gray-300 {
|
|
112812
|
-
--tw-text-opacity: 1;
|
|
112813
|
-
color: rgb(178 173 190 / var(--tw-text-opacity));
|
|
112814
|
-
}
|
|
112815
112791
|
.tina-tailwind .text-gray-400 {
|
|
112816
112792
|
--tw-text-opacity: 1;
|
|
112817
112793
|
color: rgb(145 140 158 / var(--tw-text-opacity));
|
|
112818
112794
|
}
|
|
112819
|
-
.tina-tailwind .text-blue-500 {
|
|
112820
|
-
--tw-text-opacity: 1;
|
|
112821
|
-
color: rgb(0 132 255 / var(--tw-text-opacity));
|
|
112822
|
-
}
|
|
112823
112795
|
.tina-tailwind .text-current {
|
|
112824
112796
|
color: currentColor;
|
|
112825
112797
|
}
|
|
@@ -112854,9 +112826,6 @@ var styles = `.tina-tailwind {
|
|
|
112854
112826
|
.tina-tailwind .opacity-90 {
|
|
112855
112827
|
opacity: .9;
|
|
112856
112828
|
}
|
|
112857
|
-
.tina-tailwind .opacity-20 {
|
|
112858
|
-
opacity: .2;
|
|
112859
|
-
}
|
|
112860
112829
|
.tina-tailwind .opacity-50 {
|
|
112861
112830
|
opacity: .5;
|
|
112862
112831
|
}
|
|
@@ -112873,11 +112842,6 @@ var styles = `.tina-tailwind {
|
|
|
112873
112842
|
--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);
|
|
112874
112843
|
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
112875
112844
|
}
|
|
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
|
-
}
|
|
112881
112845
|
.tina-tailwind .shadow {
|
|
112882
112846
|
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
112883
112847
|
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
|
|
@@ -112967,14 +112931,6 @@ var styles = `.tina-tailwind {
|
|
|
112967
112931
|
.tina-tailwind .hover\\:opacity-60:hover {
|
|
112968
112932
|
opacity: .6;
|
|
112969
112933
|
}
|
|
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
|
-
}
|
|
112978
112934
|
.tina-tailwind .focus\\:text-blue-400:focus {
|
|
112979
112935
|
--tw-text-opacity: 1;
|
|
112980
112936
|
color: rgb(34 150 254 / var(--tw-text-opacity));
|
|
@@ -113000,30 +112956,6 @@ var styles = `.tina-tailwind {
|
|
|
113000
112956
|
--tw-ring-opacity: 1;
|
|
113001
112957
|
--tw-ring-color: rgb(0 132 255 / var(--tw-ring-opacity));
|
|
113002
112958
|
}
|
|
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
|
-
}
|
|
113027
112959
|
`;
|
|
113028
112960
|
class ContentCreatorPlugin {
|
|
113029
112961
|
constructor(options) {
|
|
@@ -114804,34 +114736,6 @@ function HiChevronRight(props) {
|
|
|
114804
114736
|
}]
|
|
114805
114737
|
})(props);
|
|
114806
114738
|
}
|
|
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
|
-
}
|
|
114835
114739
|
const createDocument = async (cms, collection, template, mutationInfo, values2) => {
|
|
114836
114740
|
const api = new TinaAdminApi(cms);
|
|
114837
114741
|
const {
|
|
@@ -114887,25 +114791,6 @@ const CollectionCreatePage = () => {
|
|
|
114887
114791
|
})
|
|
114888
114792
|
});
|
|
114889
114793
|
};
|
|
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
|
-
};
|
|
114909
114794
|
const RenderForm$1 = ({
|
|
114910
114795
|
cms,
|
|
114911
114796
|
collection,
|
|
@@ -114957,21 +114842,11 @@ const RenderForm$1 = ({
|
|
|
114957
114842
|
},
|
|
114958
114843
|
id: "create-form",
|
|
114959
114844
|
label: "form",
|
|
114960
|
-
fields: [
|
|
114845
|
+
fields: [{
|
|
114961
114846
|
name: "filename",
|
|
114962
114847
|
label: "Filename",
|
|
114963
|
-
component:
|
|
114964
|
-
|
|
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,
|
|
114848
|
+
component: "text",
|
|
114849
|
+
disabled: (_b2 = (_a22 = template == null ? void 0 : template.ui) == null ? void 0 : _a22.filename) == null ? void 0 : _b2.disabled,
|
|
114975
114850
|
description: /* @__PURE__ */ jsxs("span", {
|
|
114976
114851
|
children: ["A unique filename for the content.", /* @__PURE__ */ jsx$1("br", {}), "Examples: ", /* @__PURE__ */ jsx$1("code", {
|
|
114977
114852
|
children: "My_Document"
|
|
@@ -114994,7 +114869,7 @@ const RenderForm$1 = ({
|
|
|
114994
114869
|
return "Must begin with a-z, A-Z, 0-9, or _ and contain only a-z, A-Z, 0-9, -, _, ., or /.";
|
|
114995
114870
|
}
|
|
114996
114871
|
}
|
|
114997
|
-
}],
|
|
114872
|
+
}, ...formInfo.fields],
|
|
114998
114873
|
onSubmit: async (values2) => {
|
|
114999
114874
|
try {
|
|
115000
114875
|
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.0-
|
|
3
|
+
"version": "0.0.0-20221006135801",
|
|
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.
|
|
40
|
+
"@tinacms/schema-tools": "0.1.6",
|
|
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.0.0-
|
|
58
|
+
"tinacms": "0.0.0-20221006135801",
|
|
59
59
|
"typescript": "^4.6.4",
|
|
60
60
|
"vite": "2.9.15",
|
|
61
61
|
"vite-node": "^0.23.4",
|