tinacms 0.69.7 → 0.69.8
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/client.es.js +0 -3
- package/dist/client.js +0 -3
- package/dist/index.es.js +47 -14
- package/dist/index.js +46 -13
- package/dist/style.css +6 -3
- package/dist/utils/index.d.ts +2 -1
- package/package.json +4 -5
package/dist/client.es.js
CHANGED
|
@@ -24,9 +24,6 @@ class TinaClient {
|
|
|
24
24
|
if (!branch || !clientId) {
|
|
25
25
|
throw new Error(`Invalid URL format provided. Expected: https://${TINA_HOST}/content/<ClientID>/github/<Branch> but but received ${url2}`);
|
|
26
26
|
}
|
|
27
|
-
if (params.host !== TINA_HOST) {
|
|
28
|
-
throw new Error(`The only supported hosts are ${TINA_HOST} or localhost, but received ${params.host}.`);
|
|
29
|
-
}
|
|
30
27
|
return {
|
|
31
28
|
host: params.host,
|
|
32
29
|
clientId,
|
package/dist/client.js
CHANGED
|
@@ -31,9 +31,6 @@
|
|
|
31
31
|
if (!branch || !clientId) {
|
|
32
32
|
throw new Error(`Invalid URL format provided. Expected: https://${TINA_HOST}/content/<ClientID>/github/<Branch> but but received ${url2}`);
|
|
33
33
|
}
|
|
34
|
-
if (params.host !== TINA_HOST) {
|
|
35
|
-
throw new Error(`The only supported hosts are ${TINA_HOST} or localhost, but received ${params.host}.`);
|
|
36
|
-
}
|
|
37
34
|
return {
|
|
38
35
|
host: params.host,
|
|
39
36
|
clientId,
|
package/dist/index.es.js
CHANGED
|
@@ -9,7 +9,7 @@ import { resolveForm, TinaSchema, addNamespaceToSchema, validateSchema } from "@
|
|
|
9
9
|
import gql$1 from "graphql-tag";
|
|
10
10
|
import * as yup from "yup";
|
|
11
11
|
import styled from "styled-components";
|
|
12
|
-
import { setEditing, TinaDataContext, useEditState } from "@tinacms/sharedctx";
|
|
12
|
+
import { setEditing, TinaDataContext, EditContext, useEditState } from "@tinacms/sharedctx";
|
|
13
13
|
import UrlPattern from "url-pattern";
|
|
14
14
|
import { NavLink, useNavigate, useParams, useLocation, Link, HashRouter, Routes, Route } from "react-router-dom";
|
|
15
15
|
import { Transition, Menu } from "@headlessui/react";
|
|
@@ -352,9 +352,10 @@ const createClient = ({
|
|
|
352
352
|
isLocalClient = true,
|
|
353
353
|
branch,
|
|
354
354
|
tinaioConfig,
|
|
355
|
-
schema
|
|
355
|
+
schema,
|
|
356
|
+
apiUrl
|
|
356
357
|
}) => {
|
|
357
|
-
return isLocalClient ? new LocalClient({ schema }) : new Client({
|
|
358
|
+
return isLocalClient ? new LocalClient({ customContentApiUrl: apiUrl, schema }) : new Client({
|
|
358
359
|
clientId: clientId || "",
|
|
359
360
|
branch: branch || "main",
|
|
360
361
|
tokenStorage: "LOCAL_STORAGE",
|
|
@@ -2544,7 +2545,7 @@ class TinaAdminApi {
|
|
|
2544
2545
|
collection: collectionName,
|
|
2545
2546
|
includeDocuments,
|
|
2546
2547
|
sort,
|
|
2547
|
-
limit:
|
|
2548
|
+
limit: 50,
|
|
2548
2549
|
after
|
|
2549
2550
|
}
|
|
2550
2551
|
}) : await this.api.request(`#graphql
|
|
@@ -2585,7 +2586,7 @@ class TinaAdminApi {
|
|
|
2585
2586
|
collection: collectionName,
|
|
2586
2587
|
includeDocuments,
|
|
2587
2588
|
sort,
|
|
2588
|
-
limit:
|
|
2589
|
+
limit: 50,
|
|
2589
2590
|
after
|
|
2590
2591
|
}
|
|
2591
2592
|
});
|
|
@@ -2714,7 +2715,9 @@ const TinaCloudProvider = (props) => {
|
|
|
2714
2715
|
useTinaAuthRedirect();
|
|
2715
2716
|
const cms = React.useMemo(() => props.cms || new TinaCMS({
|
|
2716
2717
|
enabled: true,
|
|
2717
|
-
sidebar: true
|
|
2718
|
+
sidebar: true,
|
|
2719
|
+
isLocalClient: props.isLocalClient,
|
|
2720
|
+
clientId: props.clientId
|
|
2718
2721
|
}), [props.cms]);
|
|
2719
2722
|
if (!cms.api.tina) {
|
|
2720
2723
|
cms.registerApi("tina", createClient({ ...props, branch: currentBranch }));
|
|
@@ -3169,6 +3172,9 @@ var styles = `.tina-tailwind {
|
|
|
3169
3172
|
.tina-tailwind .mr-2 {
|
|
3170
3173
|
margin-right: 8px;
|
|
3171
3174
|
}
|
|
3175
|
+
.tina-tailwind .ml-1 {
|
|
3176
|
+
margin-left: 4px;
|
|
3177
|
+
}
|
|
3172
3178
|
.tina-tailwind .mb-2 {
|
|
3173
3179
|
margin-bottom: 8px;
|
|
3174
3180
|
}
|
|
@@ -3181,9 +3187,6 @@ var styles = `.tina-tailwind {
|
|
|
3181
3187
|
.tina-tailwind .-mt-0 {
|
|
3182
3188
|
margin-top: -0px;
|
|
3183
3189
|
}
|
|
3184
|
-
.tina-tailwind .ml-1 {
|
|
3185
|
-
margin-left: 4px;
|
|
3186
|
-
}
|
|
3187
3190
|
.tina-tailwind .mt-2 {
|
|
3188
3191
|
margin-top: 8px;
|
|
3189
3192
|
}
|
|
@@ -3708,6 +3711,9 @@ var styles = `.tina-tailwind {
|
|
|
3708
3711
|
.tina-tailwind .hover\\:opacity-100:hover {
|
|
3709
3712
|
opacity: 1;
|
|
3710
3713
|
}
|
|
3714
|
+
.tina-tailwind .hover\\:opacity-60:hover {
|
|
3715
|
+
opacity: .6;
|
|
3716
|
+
}
|
|
3711
3717
|
.tina-tailwind .focus\\:text-blue-400:focus {
|
|
3712
3718
|
--tw-text-opacity: 1;
|
|
3713
3719
|
color: rgb(34 150 254 / var(--tw-text-opacity));
|
|
@@ -3925,7 +3931,6 @@ function useTina({
|
|
|
3925
3931
|
isLoading
|
|
3926
3932
|
};
|
|
3927
3933
|
}
|
|
3928
|
-
const TINA_HOST = "content.tinajs.io";
|
|
3929
3934
|
const parseURL = (url) => {
|
|
3930
3935
|
if (url.includes("localhost")) {
|
|
3931
3936
|
return { branch: null, isLocalClient: true, clientId: null };
|
|
@@ -3940,9 +3945,6 @@ const parseURL = (url) => {
|
|
|
3940
3945
|
if (!branch || !clientId) {
|
|
3941
3946
|
throw new Error(`Invalid URL format provided. Expected: https://content.tinajs.io/content/<ClientID>/github/<Branch> but but received ${url}`);
|
|
3942
3947
|
}
|
|
3943
|
-
if (params.host !== TINA_HOST) {
|
|
3944
|
-
throw new Error(`The only supported hosts are ${TINA_HOST} or localhost, but received ${params.host}.`);
|
|
3945
|
-
}
|
|
3946
3948
|
return {
|
|
3947
3949
|
branch,
|
|
3948
3950
|
clientId,
|
|
@@ -4058,7 +4060,8 @@ const TinaCMSProvider2 = ({
|
|
|
4058
4060
|
isLocalClient,
|
|
4059
4061
|
cmsCallback: props.cmsCallback,
|
|
4060
4062
|
mediaStore: props.mediaStore,
|
|
4061
|
-
|
|
4063
|
+
apiUrl: apiURL,
|
|
4064
|
+
schema: { ...schema, config: { ...schema.config, ...props } }
|
|
4062
4065
|
}, /* @__PURE__ */ React.createElement("style", null, styles), /* @__PURE__ */ React.createElement(ErrorBoundary, null, /* @__PURE__ */ React.createElement(DocumentCreator, {
|
|
4063
4066
|
documentCreatorCallback
|
|
4064
4067
|
}), /* @__PURE__ */ React.createElement(TinaDataProvider, {
|
|
@@ -4120,6 +4123,7 @@ const FormRegistrar = ({
|
|
|
4120
4123
|
onPayloadStateChange
|
|
4121
4124
|
}) => {
|
|
4122
4125
|
const cms = useCMS();
|
|
4126
|
+
const { setFormsRegistering } = React.useContext(EditContext);
|
|
4123
4127
|
const [payload, isLoading] = useGraphqlForms({
|
|
4124
4128
|
query: request == null ? void 0 : request.query,
|
|
4125
4129
|
variables: request == null ? void 0 : request.variables,
|
|
@@ -4133,6 +4137,7 @@ const FormRegistrar = ({
|
|
|
4133
4137
|
});
|
|
4134
4138
|
React.useEffect(() => {
|
|
4135
4139
|
onPayloadStateChange({ payload, isLoading });
|
|
4140
|
+
setFormsRegistering && setFormsRegistering(isLoading);
|
|
4136
4141
|
}, [JSON.stringify(payload), isLoading]);
|
|
4137
4142
|
return isLoading ? /* @__PURE__ */ React.createElement(Loader, null, /* @__PURE__ */ React.createElement(React.Fragment, null)) : null;
|
|
4138
4143
|
};
|
|
@@ -4424,6 +4429,7 @@ const Sidebar = ({ cms }) => {
|
|
|
4424
4429
|
var _a, _b;
|
|
4425
4430
|
const collectionsInfo = useGetCollections(cms);
|
|
4426
4431
|
const screens = cms.plugins.getType("screen").all();
|
|
4432
|
+
const cloudConfigs = cms.plugins.getType("cloud-config").all();
|
|
4427
4433
|
const [menuIsOpen, setMenuIsOpen] = React.useState(false);
|
|
4428
4434
|
const isLocalMode = (_b = (_a = cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode;
|
|
4429
4435
|
const navBreakpoint = 1e3;
|
|
@@ -4434,12 +4440,16 @@ const Sidebar = ({ cms }) => {
|
|
|
4434
4440
|
showCollections: true,
|
|
4435
4441
|
collectionsInfo,
|
|
4436
4442
|
screens,
|
|
4443
|
+
cloudConfigs,
|
|
4437
4444
|
contentCreators: [],
|
|
4438
4445
|
RenderNavSite: ({ view }) => /* @__PURE__ */ React.createElement(SidebarLink, {
|
|
4439
4446
|
label: view.name,
|
|
4440
4447
|
to: `/screens/${slugify(view.name)}`,
|
|
4441
4448
|
Icon: view.Icon ? view.Icon : ImFilesEmpty
|
|
4442
4449
|
}),
|
|
4450
|
+
RenderNavCloud: ({ config }) => /* @__PURE__ */ React.createElement(SidebarCloudLink, {
|
|
4451
|
+
config
|
|
4452
|
+
}),
|
|
4443
4453
|
RenderNavCollection: ({ collection }) => /* @__PURE__ */ React.createElement(SidebarLink, {
|
|
4444
4454
|
label: collection.label ? collection.label : collection.name,
|
|
4445
4455
|
to: `/collections/${collection.name}`,
|
|
@@ -4463,6 +4473,7 @@ const Sidebar = ({ cms }) => {
|
|
|
4463
4473
|
showCollections: true,
|
|
4464
4474
|
collectionsInfo,
|
|
4465
4475
|
screens,
|
|
4476
|
+
cloudConfigs,
|
|
4466
4477
|
contentCreators: [],
|
|
4467
4478
|
RenderNavSite: ({ view }) => /* @__PURE__ */ React.createElement(SidebarLink, {
|
|
4468
4479
|
label: view.name,
|
|
@@ -4472,6 +4483,9 @@ const Sidebar = ({ cms }) => {
|
|
|
4472
4483
|
setMenuIsOpen(false);
|
|
4473
4484
|
}
|
|
4474
4485
|
}),
|
|
4486
|
+
RenderNavCloud: ({ config }) => /* @__PURE__ */ React.createElement(SidebarCloudLink, {
|
|
4487
|
+
config
|
|
4488
|
+
}),
|
|
4475
4489
|
RenderNavCollection: ({ collection }) => /* @__PURE__ */ React.createElement(SidebarLink, {
|
|
4476
4490
|
label: collection.label ? collection.label : collection.name,
|
|
4477
4491
|
to: `/collections/${collection.name}`,
|
|
@@ -4529,6 +4543,25 @@ const SidebarLink = (props) => {
|
|
|
4529
4543
|
className: "mr-2 h-6 opacity-80 w-auto"
|
|
4530
4544
|
}), " ", label);
|
|
4531
4545
|
};
|
|
4546
|
+
const SidebarCloudLink = ({ config }) => {
|
|
4547
|
+
if (config.text) {
|
|
4548
|
+
return /* @__PURE__ */ React.createElement("span", {
|
|
4549
|
+
className: "text-base tracking-wide text-gray-500 flex items-center opacity-90"
|
|
4550
|
+
}, config.text, " ", /* @__PURE__ */ React.createElement("a", {
|
|
4551
|
+
target: "_blank",
|
|
4552
|
+
className: "ml-1 text-blue-600 hover:opacity-60",
|
|
4553
|
+
href: config.link.href
|
|
4554
|
+
}, config.link.text));
|
|
4555
|
+
}
|
|
4556
|
+
return /* @__PURE__ */ React.createElement("span", {
|
|
4557
|
+
className: "text-base tracking-wide text-gray-500 hover:text-blue-600 flex items-center opacity-90 hover:opacity-100"
|
|
4558
|
+
}, /* @__PURE__ */ React.createElement(config.Icon, {
|
|
4559
|
+
className: "mr-2 h-6 opacity-80 w-auto"
|
|
4560
|
+
}), /* @__PURE__ */ React.createElement("a", {
|
|
4561
|
+
target: "_blank",
|
|
4562
|
+
href: config.link.href
|
|
4563
|
+
}, config.link.text));
|
|
4564
|
+
};
|
|
4532
4565
|
const GetCMS = ({ children }) => {
|
|
4533
4566
|
try {
|
|
4534
4567
|
const cms = useCMS();
|
package/dist/index.js
CHANGED
|
@@ -370,9 +370,10 @@
|
|
|
370
370
|
isLocalClient = true,
|
|
371
371
|
branch,
|
|
372
372
|
tinaioConfig,
|
|
373
|
-
schema
|
|
373
|
+
schema,
|
|
374
|
+
apiUrl
|
|
374
375
|
}) => {
|
|
375
|
-
return isLocalClient ? new LocalClient({ schema }) : new Client({
|
|
376
|
+
return isLocalClient ? new LocalClient({ customContentApiUrl: apiUrl, schema }) : new Client({
|
|
376
377
|
clientId: clientId || "",
|
|
377
378
|
branch: branch || "main",
|
|
378
379
|
tokenStorage: "LOCAL_STORAGE",
|
|
@@ -2562,7 +2563,7 @@ mutation addPendingDocumentMutation(
|
|
|
2562
2563
|
collection: collectionName,
|
|
2563
2564
|
includeDocuments,
|
|
2564
2565
|
sort,
|
|
2565
|
-
limit:
|
|
2566
|
+
limit: 50,
|
|
2566
2567
|
after
|
|
2567
2568
|
}
|
|
2568
2569
|
}) : await this.api.request(`#graphql
|
|
@@ -2603,7 +2604,7 @@ mutation addPendingDocumentMutation(
|
|
|
2603
2604
|
collection: collectionName,
|
|
2604
2605
|
includeDocuments,
|
|
2605
2606
|
sort,
|
|
2606
|
-
limit:
|
|
2607
|
+
limit: 50,
|
|
2607
2608
|
after
|
|
2608
2609
|
}
|
|
2609
2610
|
});
|
|
@@ -2732,7 +2733,9 @@ mutation addPendingDocumentMutation(
|
|
|
2732
2733
|
useTinaAuthRedirect();
|
|
2733
2734
|
const cms = React__default["default"].useMemo(() => props.cms || new toolkit.TinaCMS({
|
|
2734
2735
|
enabled: true,
|
|
2735
|
-
sidebar: true
|
|
2736
|
+
sidebar: true,
|
|
2737
|
+
isLocalClient: props.isLocalClient,
|
|
2738
|
+
clientId: props.clientId
|
|
2736
2739
|
}), [props.cms]);
|
|
2737
2740
|
if (!cms.api.tina) {
|
|
2738
2741
|
cms.registerApi("tina", createClient({ ...props, branch: currentBranch }));
|
|
@@ -3187,6 +3190,9 @@ mutation addPendingDocumentMutation(
|
|
|
3187
3190
|
.tina-tailwind .mr-2 {
|
|
3188
3191
|
margin-right: 8px;
|
|
3189
3192
|
}
|
|
3193
|
+
.tina-tailwind .ml-1 {
|
|
3194
|
+
margin-left: 4px;
|
|
3195
|
+
}
|
|
3190
3196
|
.tina-tailwind .mb-2 {
|
|
3191
3197
|
margin-bottom: 8px;
|
|
3192
3198
|
}
|
|
@@ -3199,9 +3205,6 @@ mutation addPendingDocumentMutation(
|
|
|
3199
3205
|
.tina-tailwind .-mt-0 {
|
|
3200
3206
|
margin-top: -0px;
|
|
3201
3207
|
}
|
|
3202
|
-
.tina-tailwind .ml-1 {
|
|
3203
|
-
margin-left: 4px;
|
|
3204
|
-
}
|
|
3205
3208
|
.tina-tailwind .mt-2 {
|
|
3206
3209
|
margin-top: 8px;
|
|
3207
3210
|
}
|
|
@@ -3726,6 +3729,9 @@ mutation addPendingDocumentMutation(
|
|
|
3726
3729
|
.tina-tailwind .hover\\:opacity-100:hover {
|
|
3727
3730
|
opacity: 1;
|
|
3728
3731
|
}
|
|
3732
|
+
.tina-tailwind .hover\\:opacity-60:hover {
|
|
3733
|
+
opacity: .6;
|
|
3734
|
+
}
|
|
3729
3735
|
.tina-tailwind .focus\\:text-blue-400:focus {
|
|
3730
3736
|
--tw-text-opacity: 1;
|
|
3731
3737
|
color: rgb(34 150 254 / var(--tw-text-opacity));
|
|
@@ -3943,7 +3949,6 @@ mutation addPendingDocumentMutation(
|
|
|
3943
3949
|
isLoading
|
|
3944
3950
|
};
|
|
3945
3951
|
}
|
|
3946
|
-
const TINA_HOST = "content.tinajs.io";
|
|
3947
3952
|
const parseURL = (url) => {
|
|
3948
3953
|
if (url.includes("localhost")) {
|
|
3949
3954
|
return { branch: null, isLocalClient: true, clientId: null };
|
|
@@ -3958,9 +3963,6 @@ mutation addPendingDocumentMutation(
|
|
|
3958
3963
|
if (!branch || !clientId) {
|
|
3959
3964
|
throw new Error(`Invalid URL format provided. Expected: https://content.tinajs.io/content/<ClientID>/github/<Branch> but but received ${url}`);
|
|
3960
3965
|
}
|
|
3961
|
-
if (params.host !== TINA_HOST) {
|
|
3962
|
-
throw new Error(`The only supported hosts are ${TINA_HOST} or localhost, but received ${params.host}.`);
|
|
3963
|
-
}
|
|
3964
3966
|
return {
|
|
3965
3967
|
branch,
|
|
3966
3968
|
clientId,
|
|
@@ -4076,7 +4078,8 @@ mutation addPendingDocumentMutation(
|
|
|
4076
4078
|
isLocalClient,
|
|
4077
4079
|
cmsCallback: props.cmsCallback,
|
|
4078
4080
|
mediaStore: props.mediaStore,
|
|
4079
|
-
|
|
4081
|
+
apiUrl: apiURL,
|
|
4082
|
+
schema: { ...schema, config: { ...schema.config, ...props } }
|
|
4080
4083
|
}, /* @__PURE__ */ React__default["default"].createElement("style", null, styles), /* @__PURE__ */ React__default["default"].createElement(ErrorBoundary, null, /* @__PURE__ */ React__default["default"].createElement(DocumentCreator, {
|
|
4081
4084
|
documentCreatorCallback
|
|
4082
4085
|
}), /* @__PURE__ */ React__default["default"].createElement(TinaDataProvider, {
|
|
@@ -4138,6 +4141,7 @@ mutation addPendingDocumentMutation(
|
|
|
4138
4141
|
onPayloadStateChange
|
|
4139
4142
|
}) => {
|
|
4140
4143
|
const cms = toolkit.useCMS();
|
|
4144
|
+
const { setFormsRegistering } = React__default["default"].useContext(sharedctx.EditContext);
|
|
4141
4145
|
const [payload, isLoading] = useGraphqlForms({
|
|
4142
4146
|
query: request == null ? void 0 : request.query,
|
|
4143
4147
|
variables: request == null ? void 0 : request.variables,
|
|
@@ -4151,6 +4155,7 @@ mutation addPendingDocumentMutation(
|
|
|
4151
4155
|
});
|
|
4152
4156
|
React__default["default"].useEffect(() => {
|
|
4153
4157
|
onPayloadStateChange({ payload, isLoading });
|
|
4158
|
+
setFormsRegistering && setFormsRegistering(isLoading);
|
|
4154
4159
|
}, [JSON.stringify(payload), isLoading]);
|
|
4155
4160
|
return isLoading ? /* @__PURE__ */ React__default["default"].createElement(Loader, null, /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null)) : null;
|
|
4156
4161
|
};
|
|
@@ -4442,6 +4447,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
4442
4447
|
var _a, _b;
|
|
4443
4448
|
const collectionsInfo = useGetCollections(cms);
|
|
4444
4449
|
const screens = cms.plugins.getType("screen").all();
|
|
4450
|
+
const cloudConfigs = cms.plugins.getType("cloud-config").all();
|
|
4445
4451
|
const [menuIsOpen, setMenuIsOpen] = React__default["default"].useState(false);
|
|
4446
4452
|
const isLocalMode = (_b = (_a = cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode;
|
|
4447
4453
|
const navBreakpoint = 1e3;
|
|
@@ -4452,12 +4458,16 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
4452
4458
|
showCollections: true,
|
|
4453
4459
|
collectionsInfo,
|
|
4454
4460
|
screens,
|
|
4461
|
+
cloudConfigs,
|
|
4455
4462
|
contentCreators: [],
|
|
4456
4463
|
RenderNavSite: ({ view }) => /* @__PURE__ */ React__default["default"].createElement(SidebarLink, {
|
|
4457
4464
|
label: view.name,
|
|
4458
4465
|
to: `/screens/${slugify(view.name)}`,
|
|
4459
4466
|
Icon: view.Icon ? view.Icon : ImFilesEmpty
|
|
4460
4467
|
}),
|
|
4468
|
+
RenderNavCloud: ({ config }) => /* @__PURE__ */ React__default["default"].createElement(SidebarCloudLink, {
|
|
4469
|
+
config
|
|
4470
|
+
}),
|
|
4461
4471
|
RenderNavCollection: ({ collection }) => /* @__PURE__ */ React__default["default"].createElement(SidebarLink, {
|
|
4462
4472
|
label: collection.label ? collection.label : collection.name,
|
|
4463
4473
|
to: `/collections/${collection.name}`,
|
|
@@ -4481,6 +4491,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
4481
4491
|
showCollections: true,
|
|
4482
4492
|
collectionsInfo,
|
|
4483
4493
|
screens,
|
|
4494
|
+
cloudConfigs,
|
|
4484
4495
|
contentCreators: [],
|
|
4485
4496
|
RenderNavSite: ({ view }) => /* @__PURE__ */ React__default["default"].createElement(SidebarLink, {
|
|
4486
4497
|
label: view.name,
|
|
@@ -4490,6 +4501,9 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
4490
4501
|
setMenuIsOpen(false);
|
|
4491
4502
|
}
|
|
4492
4503
|
}),
|
|
4504
|
+
RenderNavCloud: ({ config }) => /* @__PURE__ */ React__default["default"].createElement(SidebarCloudLink, {
|
|
4505
|
+
config
|
|
4506
|
+
}),
|
|
4493
4507
|
RenderNavCollection: ({ collection }) => /* @__PURE__ */ React__default["default"].createElement(SidebarLink, {
|
|
4494
4508
|
label: collection.label ? collection.label : collection.name,
|
|
4495
4509
|
to: `/collections/${collection.name}`,
|
|
@@ -4547,6 +4561,25 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
4547
4561
|
className: "mr-2 h-6 opacity-80 w-auto"
|
|
4548
4562
|
}), " ", label);
|
|
4549
4563
|
};
|
|
4564
|
+
const SidebarCloudLink = ({ config }) => {
|
|
4565
|
+
if (config.text) {
|
|
4566
|
+
return /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
4567
|
+
className: "text-base tracking-wide text-gray-500 flex items-center opacity-90"
|
|
4568
|
+
}, config.text, " ", /* @__PURE__ */ React__default["default"].createElement("a", {
|
|
4569
|
+
target: "_blank",
|
|
4570
|
+
className: "ml-1 text-blue-600 hover:opacity-60",
|
|
4571
|
+
href: config.link.href
|
|
4572
|
+
}, config.link.text));
|
|
4573
|
+
}
|
|
4574
|
+
return /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
4575
|
+
className: "text-base tracking-wide text-gray-500 hover:text-blue-600 flex items-center opacity-90 hover:opacity-100"
|
|
4576
|
+
}, /* @__PURE__ */ React__default["default"].createElement(config.Icon, {
|
|
4577
|
+
className: "mr-2 h-6 opacity-80 w-auto"
|
|
4578
|
+
}), /* @__PURE__ */ React__default["default"].createElement("a", {
|
|
4579
|
+
target: "_blank",
|
|
4580
|
+
href: config.link.href
|
|
4581
|
+
}, config.link.text));
|
|
4582
|
+
};
|
|
4550
4583
|
const GetCMS = ({ children }) => {
|
|
4551
4584
|
try {
|
|
4552
4585
|
const cms = toolkit.useCMS();
|
package/dist/style.css
CHANGED
|
@@ -372,6 +372,9 @@
|
|
|
372
372
|
.tina-tailwind .mr-2 {
|
|
373
373
|
margin-right: 8px;
|
|
374
374
|
}
|
|
375
|
+
.tina-tailwind .ml-1 {
|
|
376
|
+
margin-left: 4px;
|
|
377
|
+
}
|
|
375
378
|
.tina-tailwind .mb-2 {
|
|
376
379
|
margin-bottom: 8px;
|
|
377
380
|
}
|
|
@@ -384,9 +387,6 @@
|
|
|
384
387
|
.tina-tailwind .-mt-0 {
|
|
385
388
|
margin-top: -0px;
|
|
386
389
|
}
|
|
387
|
-
.tina-tailwind .ml-1 {
|
|
388
|
-
margin-left: 4px;
|
|
389
|
-
}
|
|
390
390
|
.tina-tailwind .mt-2 {
|
|
391
391
|
margin-top: 8px;
|
|
392
392
|
}
|
|
@@ -911,6 +911,9 @@
|
|
|
911
911
|
.tina-tailwind .hover\:opacity-100:hover {
|
|
912
912
|
opacity: 1;
|
|
913
913
|
}
|
|
914
|
+
.tina-tailwind .hover\:opacity-60:hover {
|
|
915
|
+
opacity: .6;
|
|
916
|
+
}
|
|
914
917
|
.tina-tailwind .focus\:text-blue-400:focus {
|
|
915
918
|
--tw-text-opacity: 1;
|
|
916
919
|
color: rgb(34 150 254 / var(--tw-text-opacity));
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -22,7 +22,8 @@ export interface CreateClientProps {
|
|
|
22
22
|
repo?: string;
|
|
23
23
|
branch?: string;
|
|
24
24
|
schema?: TinaCloudSchema<false>;
|
|
25
|
+
apiUrl?: string;
|
|
25
26
|
}
|
|
26
|
-
export declare const createClient: ({ clientId, isLocalClient, branch, tinaioConfig, schema, }: CreateClientProps) => Client;
|
|
27
|
+
export declare const createClient: ({ clientId, isLocalClient, branch, tinaioConfig, schema, apiUrl, }: CreateClientProps) => Client;
|
|
27
28
|
export declare function assertShape<T extends unknown>(value: unknown, yupSchema: (args: typeof yup) => yup.AnySchema, errorMessage?: string): asserts value is T;
|
|
28
29
|
export declare function safeAssertShape<T extends unknown>(value: unknown, yupSchema: (args: typeof yup) => yup.AnySchema): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinacms",
|
|
3
|
-
"version": "0.69.
|
|
3
|
+
"version": "0.69.8",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "./dist/index.es.js",
|
|
6
6
|
"exports": {
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"@headlessui/react": "^1.5.0",
|
|
55
55
|
"@heroicons/react": "^1.0.4",
|
|
56
56
|
"@react-hook/window-size": "^3.0.7",
|
|
57
|
-
"@tinacms/schema-tools": "0.1.
|
|
58
|
-
"@tinacms/sharedctx": "0.1.
|
|
59
|
-
"@tinacms/toolkit": "0.57.
|
|
57
|
+
"@tinacms/schema-tools": "0.1.4",
|
|
58
|
+
"@tinacms/sharedctx": "0.1.3",
|
|
59
|
+
"@tinacms/toolkit": "0.57.5",
|
|
60
60
|
"crypto-js": "^4.0.0",
|
|
61
61
|
"fetch-ponyfill": "^7.1.0",
|
|
62
62
|
"final-form": "4.20.1",
|
|
@@ -64,7 +64,6 @@
|
|
|
64
64
|
"graphql-tag": "^2.11.0",
|
|
65
65
|
"lodash.set": "^4.3.2",
|
|
66
66
|
"prism-react-renderer": "^1.3.5",
|
|
67
|
-
"prism": "^4.1.2",
|
|
68
67
|
"react-icons": "^4.3.1",
|
|
69
68
|
"react-router-dom": "6",
|
|
70
69
|
"url-pattern": "^1.0.3",
|