tinacms 0.68.3 → 0.68.6
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/CHANGELOG.md +34 -0
- package/dist/admin/api.d.ts +7 -9
- package/dist/admin/types.d.ts +1 -0
- package/dist/auth/TinaCloudProvider.d.ts +1 -1
- package/dist/client.d.ts +13 -0
- package/dist/client.es.js +43 -0
- package/dist/client.js +54 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +177 -33
- package/dist/index.js +177 -34
- package/dist/{client → internalClient}/formify.d.ts +0 -0
- package/dist/{client → internalClient}/index.d.ts +0 -0
- package/dist/style.css +87 -9
- package/dist/tina-cms.d.ts +42 -1
- package/dist/unifiedClient/index.d.ts +35 -0
- package/dist/utils/index.d.ts +2 -2
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# tinacms
|
|
2
2
|
|
|
3
|
+
## 0.68.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 2cc206b1a: Improve mobile nav behaviour
|
|
8
|
+
- 8998df207: fix: update tina client with the current branch from local storage
|
|
9
|
+
- Updated dependencies [58a7a00f7]
|
|
10
|
+
- Updated dependencies [2cc206b1a]
|
|
11
|
+
- Updated dependencies [aaadefd2d]
|
|
12
|
+
- @tinacms/toolkit@0.56.29
|
|
13
|
+
|
|
14
|
+
## 0.68.5
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 646cad8da: Adds support for using the generated client on the frontend
|
|
19
|
+
- f857616f6: Rename sdk to queries
|
|
20
|
+
- 6e2ed31a2: Added `isTitle` property to the schema that allows the title to be displayed in the CMS
|
|
21
|
+
- Updated dependencies [a196198bd]
|
|
22
|
+
- Updated dependencies [57a4a3789]
|
|
23
|
+
- Updated dependencies [6e2ed31a2]
|
|
24
|
+
- Updated dependencies [ba1499029]
|
|
25
|
+
- @tinacms/toolkit@0.56.28
|
|
26
|
+
- @tinacms/schema-tools@0.0.4
|
|
27
|
+
|
|
28
|
+
## 0.68.4
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- 7372f90ca: Adds a new client that can be used on the backend and frontend.
|
|
33
|
+
- Updated dependencies [d4f98d0fc]
|
|
34
|
+
- Updated dependencies [7e2272442]
|
|
35
|
+
- @tinacms/toolkit@0.56.27
|
|
36
|
+
|
|
3
37
|
## 0.68.3
|
|
4
38
|
|
|
5
39
|
### Patch Changes
|
package/dist/admin/api.d.ts
CHANGED
|
@@ -11,15 +11,13 @@ See the License for the specific language governing permissions and
|
|
|
11
11
|
limitations under the License.
|
|
12
12
|
*/
|
|
13
13
|
import type { TinaCMS } from '@tinacms/toolkit';
|
|
14
|
+
import type { TinaSchema } from '@tinacms/schema-tools';
|
|
15
|
+
import type { Client } from '../internalClient';
|
|
14
16
|
import type { Collection, DocumentForm } from './types';
|
|
15
17
|
export declare class TinaAdminApi {
|
|
16
|
-
api:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}) => any;
|
|
20
|
-
isAuthenticated: () => boolean;
|
|
21
|
-
};
|
|
22
|
-
schema: any;
|
|
18
|
+
api: Client;
|
|
19
|
+
useDataLayer: boolean;
|
|
20
|
+
schema: TinaSchema;
|
|
23
21
|
constructor(cms: TinaCMS);
|
|
24
22
|
isAuthenticated(): Promise<boolean>;
|
|
25
23
|
fetchCollections(): Promise<Collection[]>;
|
|
@@ -31,6 +29,6 @@ export declare class TinaAdminApi {
|
|
|
31
29
|
fetchDocument(collectionName: string, relativePath: string): Promise<{
|
|
32
30
|
document: DocumentForm;
|
|
33
31
|
}>;
|
|
34
|
-
createDocument(collectionName: string, relativePath: string, params: Object): Promise<
|
|
35
|
-
updateDocument(collectionName: string, relativePath: string, params: Object): Promise<
|
|
32
|
+
createDocument(collectionName: string, relativePath: string, params: Object): Promise<unknown>;
|
|
33
|
+
updateDocument(collectionName: string, relativePath: string, params: Object): Promise<unknown>;
|
|
36
34
|
}
|
package/dist/admin/types.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ limitations under the License.
|
|
|
12
12
|
*/
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import { TinaCMS, MediaStore } from '@tinacms/toolkit';
|
|
15
|
-
import { Client, TinaIOConfig } from '../
|
|
15
|
+
import { Client, TinaIOConfig } from '../internalClient';
|
|
16
16
|
import { CreateClientProps } from '../utils';
|
|
17
17
|
export interface TinaCloudMediaStoreClass {
|
|
18
18
|
new (client: Client): MediaStore;
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Copyright 2021 Forestry.io Holdings, Inc.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software
|
|
8
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
+
See the License for the specific language governing permissions and
|
|
11
|
+
limitations under the License.
|
|
12
|
+
*/
|
|
13
|
+
export * from './unifiedClient';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import fetchPonyfill from "fetch-ponyfill";
|
|
2
|
+
const { fetch, Headers } = fetchPonyfill();
|
|
3
|
+
class TinaClient {
|
|
4
|
+
constructor({ token, url, queries }) {
|
|
5
|
+
this.apiUrl = url;
|
|
6
|
+
this.readonlyToken = token;
|
|
7
|
+
if (queries) {
|
|
8
|
+
this.queries = queries(this);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
async request(args) {
|
|
12
|
+
const headers = new Headers();
|
|
13
|
+
if (this.readonlyToken) {
|
|
14
|
+
headers.append("X-API-KEY", this.readonlyToken);
|
|
15
|
+
}
|
|
16
|
+
headers.append("Content-Type", "application/json");
|
|
17
|
+
const bodyString = JSON.stringify({
|
|
18
|
+
query: args.query,
|
|
19
|
+
variables: (args == null ? void 0 : args.variables) || {}
|
|
20
|
+
});
|
|
21
|
+
const url = (args == null ? void 0 : args.url) || this.apiUrl;
|
|
22
|
+
const res = await fetch(url, {
|
|
23
|
+
method: "POST",
|
|
24
|
+
headers,
|
|
25
|
+
body: bodyString,
|
|
26
|
+
redirect: "follow"
|
|
27
|
+
});
|
|
28
|
+
const json = await res.json();
|
|
29
|
+
if (json.errors) {
|
|
30
|
+
throw new Error(`Unable to fetch, errors:
|
|
31
|
+
${json.errors.map((error) => error.message).join("\n")}`);
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
data: json == null ? void 0 : json.data,
|
|
35
|
+
query: args.query
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function createClient(args) {
|
|
40
|
+
const client = new TinaClient(args);
|
|
41
|
+
return client;
|
|
42
|
+
}
|
|
43
|
+
export { TinaClient, createClient };
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
(function(global, factory) {
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("fetch-ponyfill")) : typeof define === "function" && define.amd ? define(["exports", "fetch-ponyfill"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.tinacms = {}, global.NOOP));
|
|
3
|
+
})(this, function(exports2, fetchPonyfill) {
|
|
4
|
+
"use strict";
|
|
5
|
+
function _interopDefaultLegacy(e) {
|
|
6
|
+
return e && typeof e === "object" && "default" in e ? e : { "default": e };
|
|
7
|
+
}
|
|
8
|
+
var fetchPonyfill__default = /* @__PURE__ */ _interopDefaultLegacy(fetchPonyfill);
|
|
9
|
+
const { fetch, Headers } = fetchPonyfill__default["default"]();
|
|
10
|
+
class TinaClient {
|
|
11
|
+
constructor({ token, url, queries }) {
|
|
12
|
+
this.apiUrl = url;
|
|
13
|
+
this.readonlyToken = token;
|
|
14
|
+
if (queries) {
|
|
15
|
+
this.queries = queries(this);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
async request(args) {
|
|
19
|
+
const headers = new Headers();
|
|
20
|
+
if (this.readonlyToken) {
|
|
21
|
+
headers.append("X-API-KEY", this.readonlyToken);
|
|
22
|
+
}
|
|
23
|
+
headers.append("Content-Type", "application/json");
|
|
24
|
+
const bodyString = JSON.stringify({
|
|
25
|
+
query: args.query,
|
|
26
|
+
variables: (args == null ? void 0 : args.variables) || {}
|
|
27
|
+
});
|
|
28
|
+
const url = (args == null ? void 0 : args.url) || this.apiUrl;
|
|
29
|
+
const res = await fetch(url, {
|
|
30
|
+
method: "POST",
|
|
31
|
+
headers,
|
|
32
|
+
body: bodyString,
|
|
33
|
+
redirect: "follow"
|
|
34
|
+
});
|
|
35
|
+
const json = await res.json();
|
|
36
|
+
if (json.errors) {
|
|
37
|
+
throw new Error(`Unable to fetch, errors:
|
|
38
|
+
${json.errors.map((error) => error.message).join("\n")}`);
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
data: json == null ? void 0 : json.data,
|
|
42
|
+
query: args.query
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function createClient(args) {
|
|
47
|
+
const client = new TinaClient(args);
|
|
48
|
+
return client;
|
|
49
|
+
}
|
|
50
|
+
exports2.TinaClient = TinaClient;
|
|
51
|
+
exports2.createClient = createClient;
|
|
52
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
53
|
+
exports2[Symbol.toStringTag] = "Module";
|
|
54
|
+
});
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
10
10
|
See the License for the specific language governing permissions and
|
|
11
11
|
limitations under the License.
|
|
12
12
|
*/
|
|
13
|
-
export * from './
|
|
13
|
+
export * from './internalClient';
|
|
14
14
|
export * from './auth';
|
|
15
15
|
export * from './utils';
|
|
16
16
|
export * from './tina-cms';
|
package/dist/index.es.js
CHANGED
|
@@ -43,7 +43,8 @@ import styled from "styled-components";
|
|
|
43
43
|
import { setEditing, TinaDataContext, useEditState } from "@tinacms/sharedctx";
|
|
44
44
|
import UrlPattern from "url-pattern";
|
|
45
45
|
import { NavLink, useNavigate, useParams, Link, HashRouter, Routes, Route } from "react-router-dom";
|
|
46
|
-
import {
|
|
46
|
+
import { Transition, Menu } from "@headlessui/react";
|
|
47
|
+
import { useWindowWidth } from "@react-hook/window-size";
|
|
47
48
|
function popupWindow(url, title, window2, w, h) {
|
|
48
49
|
const y = window2.top.outerHeight / 2 + window2.top.screenY - h / 2;
|
|
49
50
|
const x = window2.top.outerWidth / 2 + window2.top.screenX - w / 2;
|
|
@@ -2423,6 +2424,7 @@ class TinaAdminApi {
|
|
|
2423
2424
|
constructor(cms) {
|
|
2424
2425
|
this.api = cms.api.tina;
|
|
2425
2426
|
this.schema = cms.api.tina.schema;
|
|
2427
|
+
this.useDataLayer = cms.flags.get("experimentalData");
|
|
2426
2428
|
}
|
|
2427
2429
|
async isAuthenticated() {
|
|
2428
2430
|
return await this.api.isAuthenticated();
|
|
@@ -2449,19 +2451,22 @@ class TinaAdminApi {
|
|
|
2449
2451
|
}
|
|
2450
2452
|
async fetchCollection(collectionName, includeDocuments) {
|
|
2451
2453
|
if (includeDocuments === true) {
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
+
if (this.useDataLayer) {
|
|
2455
|
+
const sort = this.schema.getIsTitleFieldName(collectionName);
|
|
2456
|
+
const response = await this.api.request(`#graphql
|
|
2457
|
+
query($collection: String!, $includeDocuments: Boolean!, $sort: String){
|
|
2454
2458
|
collection(collection: $collection){
|
|
2455
2459
|
name
|
|
2456
2460
|
label
|
|
2457
2461
|
format
|
|
2458
2462
|
templates
|
|
2459
|
-
documents @include(if: $includeDocuments) {
|
|
2463
|
+
documents(sort: $sort) @include(if: $includeDocuments) {
|
|
2460
2464
|
totalCount
|
|
2461
2465
|
edges {
|
|
2462
2466
|
node {
|
|
2463
2467
|
... on Document {
|
|
2464
2468
|
_sys {
|
|
2469
|
+
title
|
|
2465
2470
|
template
|
|
2466
2471
|
breadcrumbs
|
|
2467
2472
|
path
|
|
@@ -2475,8 +2480,39 @@ class TinaAdminApi {
|
|
|
2475
2480
|
}
|
|
2476
2481
|
}
|
|
2477
2482
|
}
|
|
2478
|
-
}`, { variables: { collection: collectionName, includeDocuments } });
|
|
2479
|
-
|
|
2483
|
+
}`, { variables: { collection: collectionName, includeDocuments, sort } });
|
|
2484
|
+
return response.collection;
|
|
2485
|
+
} else {
|
|
2486
|
+
const response = await this.api.request(`#graphql
|
|
2487
|
+
query($collection: String!, $includeDocuments: Boolean!){
|
|
2488
|
+
collection(collection: $collection){
|
|
2489
|
+
name
|
|
2490
|
+
label
|
|
2491
|
+
format
|
|
2492
|
+
templates
|
|
2493
|
+
documents @include(if: $includeDocuments) {
|
|
2494
|
+
totalCount
|
|
2495
|
+
edges {
|
|
2496
|
+
node {
|
|
2497
|
+
... on Document {
|
|
2498
|
+
_sys {
|
|
2499
|
+
# TODO: only include title if we need to
|
|
2500
|
+
template
|
|
2501
|
+
breadcrumbs
|
|
2502
|
+
path
|
|
2503
|
+
basename
|
|
2504
|
+
relativePath
|
|
2505
|
+
filename
|
|
2506
|
+
extension
|
|
2507
|
+
}
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2510
|
+
}
|
|
2511
|
+
}
|
|
2512
|
+
}
|
|
2513
|
+
}`, { variables: { collection: collectionName, includeDocuments } });
|
|
2514
|
+
return response.collection;
|
|
2515
|
+
}
|
|
2480
2516
|
} else {
|
|
2481
2517
|
try {
|
|
2482
2518
|
const collection = this.schema.getCollection(collectionName);
|
|
@@ -2604,7 +2640,9 @@ const TinaCloudProvider = (props) => {
|
|
|
2604
2640
|
sidebar: true
|
|
2605
2641
|
}), [props.cms]);
|
|
2606
2642
|
if (!cms.api.tina) {
|
|
2607
|
-
cms.registerApi("tina", createClient(props));
|
|
2643
|
+
cms.registerApi("tina", createClient(__spreadProps(__spreadValues({}, props), { branch: currentBranch })));
|
|
2644
|
+
} else {
|
|
2645
|
+
cms.api.tina.setBranch(currentBranch);
|
|
2608
2646
|
}
|
|
2609
2647
|
if (!cms.api.admin) {
|
|
2610
2648
|
cms.registerApi("admin", new TinaAdminApi(cms));
|
|
@@ -2673,7 +2711,7 @@ const TinaCloudProvider = (props) => {
|
|
|
2673
2711
|
}))));
|
|
2674
2712
|
};
|
|
2675
2713
|
const TinaCloudAuthWall = TinaCloudProvider;
|
|
2676
|
-
var styles = '*, ::before, ::after {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(0 132 255 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n.tina-tailwind .static {\n position: static;\n}\n.tina-tailwind .fixed {\n position: fixed;\n}\n.tina-tailwind .absolute {\n position: absolute;\n}\n.tina-tailwind .relative {\n position: relative;\n}\n.tina-tailwind .left-0 {\n left: 0px;\n}\n.tina-tailwind .right-0 {\n right: 0px;\n}\n.tina-tailwind .mx-auto {\n margin-left: auto;\n margin-right: auto;\n}\n.tina-tailwind .mr-2 {\n margin-right: 8px;\n}\n.tina-tailwind .mb-2 {\n margin-bottom: 8px;\n}\n.tina-tailwind .mb-1 {\n margin-bottom: 4px;\n}\n.tina-tailwind .-mt-0\\.5 {\n margin-top: -2px;\n}\n.tina-tailwind .-mt-0 {\n margin-top: -0px;\n}\n.tina-tailwind .ml-1 {\n margin-left: 4px;\n}\n.tina-tailwind .mt-2 {\n margin-top: 8px;\n}\n.tina-tailwind .mr-1\\.5 {\n margin-right: 6px;\n}\n.tina-tailwind .mr-1 {\n margin-right: 4px;\n}\n.tina-tailwind .block {\n display: block;\n}\n.tina-tailwind .inline-block {\n display: inline-block;\n}\n.tina-tailwind .inline {\n display: inline;\n}\n.tina-tailwind .flex {\n display: flex;\n}\n.tina-tailwind .inline-flex {\n display: inline-flex;\n}\n.tina-tailwind .table {\n display: table;\n}\n.tina-tailwind .h-screen {\n height: 100vh;\n}\n.tina-tailwind .h-auto {\n height: auto;\n}\n.tina-tailwind .h-full {\n height: 100%;\n}\n.tina-tailwind .h-6 {\n height: 24px;\n}\n.tina-tailwind .h-10 {\n height: 40px;\n}\n.tina-tailwind .h-5 {\n height: 20px;\n}\n.tina-tailwind .h-12 {\n height: 48px;\n}\n.tina-tailwind .w-full {\n width: 100%;\n}\n.tina-tailwind .w-10 {\n width: 40px;\n}\n.tina-tailwind .w-auto {\n width: auto;\n}\n.tina-tailwind .w-5 {\n width: 20px;\n}\n.tina-tailwind .w-56 {\n width: 224px;\n}\n.tina-tailwind .w-0 {\n width: 0px;\n}\n.tina-tailwind .w-6 {\n width: 24px;\n}\n.tina-tailwind .max-w-lg {\n max-width: 32rem;\n}\n.tina-tailwind .max-w-screen-xl {\n max-width: 1280px;\n}\n.tina-tailwind .max-w-form {\n max-width: 900px;\n}\n.tina-tailwind .max-w-full {\n max-width: 100%;\n}\n.tina-tailwind .flex-1 {\n flex: 1 1 0%;\n}\n.tina-tailwind .flex-shrink-0 {\n flex-shrink: 0;\n}\n.tina-tailwind .flex-grow-0 {\n flex-grow: 0;\n}\n.tina-tailwind .table-auto {\n table-layout: auto;\n}\n.tina-tailwind .origin-top-right {\n transform-origin: top right;\n}\n.tina-tailwind .scale-95 {\n --tw-scale-x: .95;\n --tw-scale-y: .95;\n 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));\n}\n.tina-tailwind .scale-100 {\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n 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));\n}\n.tina-tailwind .transform {\n 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));\n}\n.tina-tailwind .cursor-pointer {\n cursor: pointer;\n}\n.tina-tailwind .flex-col {\n flex-direction: column;\n}\n.tina-tailwind .items-end {\n align-items: flex-end;\n}\n.tina-tailwind .items-center {\n align-items: center;\n}\n.tina-tailwind .items-stretch {\n align-items: stretch;\n}\n.tina-tailwind .justify-end {\n justify-content: flex-end;\n}\n.tina-tailwind .justify-center {\n justify-content: center;\n}\n.tina-tailwind .justify-between {\n justify-content: space-between;\n}\n.tina-tailwind .gap-0\\.5 {\n gap: 2px;\n}\n.tina-tailwind .gap-0 {\n gap: 0px;\n}\n.tina-tailwind .gap-4 {\n gap: 16px;\n}\n.tina-tailwind .gap-3 {\n gap: 12px;\n}\n.tina-tailwind .divide-y > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-y-reverse: 0;\n border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));\n border-bottom-width: calc(1px * var(--tw-divide-y-reverse));\n}\n.tina-tailwind .divide-gray-150 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgb(230 227 239 / var(--tw-divide-opacity));\n}\n.tina-tailwind .overflow-hidden {\n overflow: hidden;\n}\n.tina-tailwind .overflow-y-auto {\n overflow-y: auto;\n}\n.tina-tailwind .whitespace-nowrap {\n white-space: nowrap;\n}\n.tina-tailwind .rounded-lg {\n border-radius: 8px;\n}\n.tina-tailwind .rounded-full {\n border-radius: 9999px;\n}\n.tina-tailwind .rounded-md {\n border-radius: 6px;\n}\n.tina-tailwind .border {\n border-width: 1px;\n}\n.tina-tailwind .border-b {\n border-bottom-width: 1px;\n}\n.tina-tailwind .border-gray-150 {\n --tw-border-opacity: 1;\n border-color: rgb(230 227 239 / var(--tw-border-opacity));\n}\n.tina-tailwind .border-gray-200 {\n --tw-border-opacity: 1;\n border-color: rgb(225 221 236 / var(--tw-border-opacity));\n}\n.tina-tailwind .bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n.tina-tailwind .bg-gray-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(246 246 249 / var(--tw-bg-opacity));\n}\n.tina-tailwind .bg-blue-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(0 132 255 / var(--tw-bg-opacity));\n}\n.tina-tailwind .bg-gradient-to-b {\n background-image: linear-gradient(to bottom, var(--tw-gradient-stops));\n}\n.tina-tailwind .from-blue-900 {\n --tw-gradient-from: #1D2C6C;\n --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgb(29 44 108 / 0));\n}\n.tina-tailwind .to-gray-900 {\n --tw-gradient-to: #252336;\n}\n.tina-tailwind .px-4 {\n padding-left: 16px;\n padding-right: 16px;\n}\n.tina-tailwind .py-6 {\n padding-top: 24px;\n padding-bottom: 24px;\n}\n.tina-tailwind .px-5 {\n padding-left: 20px;\n padding-right: 20px;\n}\n.tina-tailwind .py-4 {\n padding-top: 16px;\n padding-bottom: 16px;\n}\n.tina-tailwind .px-12 {\n padding-left: 48px;\n padding-right: 48px;\n}\n.tina-tailwind .py-10 {\n padding-top: 40px;\n padding-bottom: 40px;\n}\n.tina-tailwind .px-20 {\n padding-left: 80px;\n padding-right: 80px;\n}\n.tina-tailwind .px-6 {\n padding-left: 24px;\n padding-right: 24px;\n}\n.tina-tailwind .py-1 {\n padding-top: 4px;\n padding-bottom: 4px;\n}\n.tina-tailwind .py-2 {\n padding-top: 8px;\n padding-bottom: 8px;\n}\n.tina-tailwind .pt-4 {\n padding-top: 16px;\n}\n.tina-tailwind .pb-4 {\n padding-bottom: 16px;\n}\n.tina-tailwind .pt-18 {\n padding-top: 72px;\n}\n.tina-tailwind .text-left {\n text-align: left;\n}\n.tina-tailwind .text-center {\n text-align: center;\n}\n.tina-tailwind .font-sans {\n font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n}\n.tina-tailwind .text-2xl {\n font-size: 24px;\n line-height: 1.33;\n}\n.tina-tailwind .text-base {\n font-size: 16px;\n line-height: 1.5;\n}\n.tina-tailwind .text-sm {\n font-size: 14px;\n line-height: 1.43;\n}\n.tina-tailwind .text-xl {\n font-size: 20px;\n line-height: 1.4;\n}\n.tina-tailwind .text-md {\n font-size: 16px;\n line-height: 1.5;\n}\n.tina-tailwind .text-xs {\n font-size: 13px;\n line-height: 1.33;\n}\n.tina-tailwind .font-medium {\n font-weight: 500;\n}\n.tina-tailwind .uppercase {\n text-transform: uppercase;\n}\n.tina-tailwind .italic {\n font-style: italic;\n}\n.tina-tailwind .leading-normal {\n line-height: 1.5;\n}\n.tina-tailwind .leading-tight {\n line-height: 1.25;\n}\n.tina-tailwind .leading-5 {\n line-height: 20px;\n}\n.tina-tailwind .tracking-wide {\n letter-spacing: 0.025em;\n}\n.tina-tailwind .text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(86 81 101 / var(--tw-text-opacity));\n}\n.tina-tailwind .text-gray-700 {\n --tw-text-opacity: 1;\n color: rgb(67 62 82 / var(--tw-text-opacity));\n}\n.tina-tailwind .text-blue-600 {\n --tw-text-opacity: 1;\n color: rgb(5 116 228 / var(--tw-text-opacity));\n}\n.tina-tailwind .text-gray-500 {\n --tw-text-opacity: 1;\n color: rgb(113 108 127 / var(--tw-text-opacity));\n}\n.tina-tailwind .text-gray-400 {\n --tw-text-opacity: 1;\n color: rgb(145 140 158 / var(--tw-text-opacity));\n}\n.tina-tailwind .text-current {\n color: currentColor;\n}\n.tina-tailwind .text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n.tina-tailwind .text-gray-800 {\n --tw-text-opacity: 1;\n color: rgb(54 49 69 / var(--tw-text-opacity));\n}\n.tina-tailwind .text-gray-900 {\n --tw-text-opacity: 1;\n color: rgb(37 35 54 / var(--tw-text-opacity));\n}\n.tina-tailwind .text-red-500 {\n --tw-text-opacity: 1;\n color: rgb(239 68 68 / var(--tw-text-opacity));\n}\n.tina-tailwind .underline {\n text-decoration-line: underline;\n}\n.tina-tailwind .opacity-100 {\n opacity: 1;\n}\n.tina-tailwind .opacity-90 {\n opacity: .9;\n}\n.tina-tailwind .opacity-80 {\n opacity: .8;\n}\n.tina-tailwind .opacity-50 {\n opacity: .5;\n}\n.tina-tailwind .opacity-70 {\n opacity: .7;\n}\n.tina-tailwind .opacity-0 {\n opacity: 0;\n}\n.tina-tailwind .shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.tina-tailwind .shadow-2xl {\n --tw-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.tina-tailwind .shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.tina-tailwind .ring-1 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n.tina-tailwind .ring-black {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity));\n}\n.tina-tailwind .ring-opacity-5 {\n --tw-ring-opacity: .05;\n}\n.tina-tailwind .filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.tina-tailwind .transition-opacity {\n transition-property: opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.tina-tailwind .transition-colors {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.tina-tailwind .transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.tina-tailwind .transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.tina-tailwind .duration-300 {\n transition-duration: 300ms;\n}\n.tina-tailwind .duration-150 {\n transition-duration: 150ms;\n}\n.tina-tailwind .duration-100 {\n transition-duration: 100ms;\n}\n.tina-tailwind .duration-75 {\n transition-duration: 75ms;\n}\n.tina-tailwind .ease-out {\n transition-timing-function: cubic-bezier(0, 0, 0.2, 1);\n}\n.tina-tailwind .ease-in {\n transition-timing-function: cubic-bezier(0.4, 0, 1, 1);\n}\n.tina-tailwind .icon-parent svg {\n fill: currentColor;\n }\n\n.tina-tailwind {\n font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n font-size: 16px;\n line-height: 1.5;\n --tw-text-opacity: 1;\n color: rgb(86 81 101 / var(--tw-text-opacity));\n}\n\n.tina-tailwind .hover\\:bg-blue-600:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(5 116 228 / var(--tw-bg-opacity));\n}\n\n.tina-tailwind .hover\\:text-blue-600:hover {\n --tw-text-opacity: 1;\n color: rgb(5 116 228 / var(--tw-text-opacity));\n}\n\n.tina-tailwind .hover\\:text-blue-400:hover {\n --tw-text-opacity: 1;\n color: rgb(34 150 254 / var(--tw-text-opacity));\n}\n\n.tina-tailwind .hover\\:opacity-100:hover {\n opacity: 1;\n}\n\n.tina-tailwind .focus\\:text-blue-400:focus {\n --tw-text-opacity: 1;\n color: rgb(34 150 254 / var(--tw-text-opacity));\n}\n\n.tina-tailwind .focus\\:underline:focus {\n text-decoration-line: underline;\n}\n\n.tina-tailwind .focus\\:shadow-outline:focus {\n --tw-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);\n --tw-shadow-colored: 0 0 0 3px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.tina-tailwind .focus\\:outline-none:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n\n.tina-tailwind .focus\\:ring-2:focus {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n.tina-tailwind .focus\\:ring-blue-500:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(0 132 255 / var(--tw-ring-opacity));\n}\n';
|
|
2714
|
+
var styles = '*, ::before, ::after {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(0 132 255 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n.tina-tailwind .pointer-events-auto {\n pointer-events: auto;\n}\n.tina-tailwind .static {\n position: static;\n}\n.tina-tailwind .fixed {\n position: fixed;\n}\n.tina-tailwind .absolute {\n position: absolute;\n}\n.tina-tailwind .relative {\n position: relative;\n}\n.tina-tailwind .inset-0 {\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n}\n.tina-tailwind .left-0 {\n left: 0px;\n}\n.tina-tailwind .top-0 {\n top: 0px;\n}\n.tina-tailwind .top-8 {\n top: 32px;\n}\n.tina-tailwind .right-0 {\n right: 0px;\n}\n.tina-tailwind .top-10 {\n top: 40px;\n}\n.tina-tailwind .top-4 {\n top: 16px;\n}\n.tina-tailwind .z-overlay {\n z-index: 10600;\n}\n.tina-tailwind .z-menu {\n z-index: 9800;\n}\n.tina-tailwind .z-50 {\n z-index: 50;\n}\n.tina-tailwind .mx-auto {\n margin-left: auto;\n margin-right: auto;\n}\n.tina-tailwind .-ml-px {\n margin-left: -1px;\n}\n.tina-tailwind .mr-2 {\n margin-right: 8px;\n}\n.tina-tailwind .mb-2 {\n margin-bottom: 8px;\n}\n.tina-tailwind .mb-1 {\n margin-bottom: 4px;\n}\n.tina-tailwind .-mt-0\\.5 {\n margin-top: -2px;\n}\n.tina-tailwind .-mt-0 {\n margin-top: -0px;\n}\n.tina-tailwind .ml-1 {\n margin-left: 4px;\n}\n.tina-tailwind .mt-2 {\n margin-top: 8px;\n}\n.tina-tailwind .mr-1\\.5 {\n margin-right: 6px;\n}\n.tina-tailwind .mr-1 {\n margin-right: 4px;\n}\n.tina-tailwind .block {\n display: block;\n}\n.tina-tailwind .inline-block {\n display: inline-block;\n}\n.tina-tailwind .inline {\n display: inline;\n}\n.tina-tailwind .flex {\n display: flex;\n}\n.tina-tailwind .inline-flex {\n display: inline-flex;\n}\n.tina-tailwind .table {\n display: table;\n}\n.tina-tailwind .h-screen {\n height: 100vh;\n}\n.tina-tailwind .h-auto {\n height: auto;\n}\n.tina-tailwind .h-full {\n height: 100%;\n}\n.tina-tailwind .h-6 {\n height: 24px;\n}\n.tina-tailwind .h-7 {\n height: 28px;\n}\n.tina-tailwind .h-10 {\n height: 40px;\n}\n.tina-tailwind .h-5 {\n height: 20px;\n}\n.tina-tailwind .h-12 {\n height: 48px;\n}\n.tina-tailwind .w-full {\n width: 100%;\n}\n.tina-tailwind .w-10 {\n width: 40px;\n}\n.tina-tailwind .w-auto {\n width: auto;\n}\n.tina-tailwind .w-5 {\n width: 20px;\n}\n.tina-tailwind .w-56 {\n width: 224px;\n}\n.tina-tailwind .w-0 {\n width: 0px;\n}\n.tina-tailwind .w-6 {\n width: 24px;\n}\n.tina-tailwind .max-w-lg {\n max-width: 32rem;\n}\n.tina-tailwind .max-w-screen-xl {\n max-width: 1280px;\n}\n.tina-tailwind .max-w-form {\n max-width: 900px;\n}\n.tina-tailwind .max-w-full {\n max-width: 100%;\n}\n.tina-tailwind .flex-1 {\n flex: 1 1 0%;\n}\n.tina-tailwind .flex-shrink-0 {\n flex-shrink: 0;\n}\n.tina-tailwind .flex-grow-0 {\n flex-grow: 0;\n}\n.tina-tailwind .table-auto {\n table-layout: auto;\n}\n.tina-tailwind .origin-top-right {\n transform-origin: top right;\n}\n.tina-tailwind .-translate-x-full {\n --tw-translate-x: -100%;\n 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));\n}\n.tina-tailwind .translate-x-0 {\n --tw-translate-x: 0px;\n 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));\n}\n.tina-tailwind .translate-x-full {\n --tw-translate-x: 100%;\n 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));\n}\n.tina-tailwind .scale-95 {\n --tw-scale-x: .95;\n --tw-scale-y: .95;\n 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));\n}\n.tina-tailwind .scale-100 {\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n 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));\n}\n.tina-tailwind .transform {\n 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));\n}\n.tina-tailwind .cursor-pointer {\n cursor: pointer;\n}\n.tina-tailwind .flex-col {\n flex-direction: column;\n}\n.tina-tailwind .items-end {\n align-items: flex-end;\n}\n.tina-tailwind .items-center {\n align-items: center;\n}\n.tina-tailwind .items-stretch {\n align-items: stretch;\n}\n.tina-tailwind .justify-end {\n justify-content: flex-end;\n}\n.tina-tailwind .justify-center {\n justify-content: center;\n}\n.tina-tailwind .justify-between {\n justify-content: space-between;\n}\n.tina-tailwind .gap-0\\.5 {\n gap: 2px;\n}\n.tina-tailwind .gap-0 {\n gap: 0px;\n}\n.tina-tailwind .gap-4 {\n gap: 16px;\n}\n.tina-tailwind .gap-3 {\n gap: 12px;\n}\n.tina-tailwind .divide-y > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-y-reverse: 0;\n border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));\n border-bottom-width: calc(1px * var(--tw-divide-y-reverse));\n}\n.tina-tailwind .divide-gray-150 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgb(230 227 239 / var(--tw-divide-opacity));\n}\n.tina-tailwind .overflow-hidden {\n overflow: hidden;\n}\n.tina-tailwind .overflow-y-auto {\n overflow-y: auto;\n}\n.tina-tailwind .whitespace-nowrap {\n white-space: nowrap;\n}\n.tina-tailwind .rounded-lg {\n border-radius: 8px;\n}\n.tina-tailwind .rounded {\n border-radius: 4px;\n}\n.tina-tailwind .rounded-full {\n border-radius: 9999px;\n}\n.tina-tailwind .rounded-md {\n border-radius: 6px;\n}\n.tina-tailwind .rounded-r-md {\n border-top-right-radius: 6px;\n border-bottom-right-radius: 6px;\n}\n.tina-tailwind .border {\n border-width: 1px;\n}\n.tina-tailwind .border-b {\n border-bottom-width: 1px;\n}\n.tina-tailwind .border-gray-150 {\n --tw-border-opacity: 1;\n border-color: rgb(230 227 239 / var(--tw-border-opacity));\n}\n.tina-tailwind .border-gray-200 {\n --tw-border-opacity: 1;\n border-color: rgb(225 221 236 / var(--tw-border-opacity));\n}\n.tina-tailwind .bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n.tina-tailwind .bg-gray-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(246 246 249 / var(--tw-bg-opacity));\n}\n.tina-tailwind .bg-blue-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(0 132 255 / var(--tw-bg-opacity));\n}\n.tina-tailwind .bg-gradient-to-b {\n background-image: linear-gradient(to bottom, var(--tw-gradient-stops));\n}\n.tina-tailwind .bg-gradient-to-br {\n background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));\n}\n.tina-tailwind .from-blue-900 {\n --tw-gradient-from: #1D2C6C;\n --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgb(29 44 108 / 0));\n}\n.tina-tailwind .from-gray-800 {\n --tw-gradient-from: #363145;\n --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgb(54 49 69 / 0));\n}\n.tina-tailwind .via-gray-900 {\n --tw-gradient-stops: var(--tw-gradient-from), #252336, var(--tw-gradient-to, rgb(37 35 54 / 0));\n}\n.tina-tailwind .to-gray-900 {\n --tw-gradient-to: #252336;\n}\n.tina-tailwind .to-black {\n --tw-gradient-to: #000;\n}\n.tina-tailwind .px-4 {\n padding-left: 16px;\n padding-right: 16px;\n}\n.tina-tailwind .py-6 {\n padding-top: 24px;\n padding-bottom: 24px;\n}\n.tina-tailwind .px-5 {\n padding-left: 20px;\n padding-right: 20px;\n}\n.tina-tailwind .py-4 {\n padding-top: 16px;\n padding-bottom: 16px;\n}\n.tina-tailwind .px-12 {\n padding-left: 48px;\n padding-right: 48px;\n}\n.tina-tailwind .py-10 {\n padding-top: 40px;\n padding-bottom: 40px;\n}\n.tina-tailwind .px-20 {\n padding-left: 80px;\n padding-right: 80px;\n}\n.tina-tailwind .px-6 {\n padding-left: 24px;\n padding-right: 24px;\n}\n.tina-tailwind .py-1 {\n padding-top: 4px;\n padding-bottom: 4px;\n}\n.tina-tailwind .py-2 {\n padding-top: 8px;\n padding-bottom: 8px;\n}\n.tina-tailwind .py-5 {\n padding-top: 20px;\n padding-bottom: 20px;\n}\n.tina-tailwind .pt-4 {\n padding-top: 16px;\n}\n.tina-tailwind .pb-4 {\n padding-bottom: 16px;\n}\n.tina-tailwind .pt-18 {\n padding-top: 72px;\n}\n.tina-tailwind .pl-18 {\n padding-left: 72px;\n}\n.tina-tailwind .text-left {\n text-align: left;\n}\n.tina-tailwind .text-center {\n text-align: center;\n}\n.tina-tailwind .font-sans {\n font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n}\n.tina-tailwind .text-2xl {\n font-size: 24px;\n line-height: 1.33;\n}\n.tina-tailwind .text-base {\n font-size: 16px;\n line-height: 1.5;\n}\n.tina-tailwind .text-sm {\n font-size: 14px;\n line-height: 1.43;\n}\n.tina-tailwind .text-xl {\n font-size: 20px;\n line-height: 1.4;\n}\n.tina-tailwind .text-md {\n font-size: 16px;\n line-height: 1.5;\n}\n.tina-tailwind .text-xs {\n font-size: 13px;\n line-height: 1.33;\n}\n.tina-tailwind .font-medium {\n font-weight: 500;\n}\n.tina-tailwind .uppercase {\n text-transform: uppercase;\n}\n.tina-tailwind .italic {\n font-style: italic;\n}\n.tina-tailwind .leading-normal {\n line-height: 1.5;\n}\n.tina-tailwind .leading-tight {\n line-height: 1.25;\n}\n.tina-tailwind .leading-5 {\n line-height: 20px;\n}\n.tina-tailwind .tracking-wide {\n letter-spacing: 0.025em;\n}\n.tina-tailwind .text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(86 81 101 / var(--tw-text-opacity));\n}\n.tina-tailwind .text-gray-700 {\n --tw-text-opacity: 1;\n color: rgb(67 62 82 / var(--tw-text-opacity));\n}\n.tina-tailwind .text-blue-600 {\n --tw-text-opacity: 1;\n color: rgb(5 116 228 / var(--tw-text-opacity));\n}\n.tina-tailwind .text-gray-500 {\n --tw-text-opacity: 1;\n color: rgb(113 108 127 / var(--tw-text-opacity));\n}\n.tina-tailwind .text-gray-400 {\n --tw-text-opacity: 1;\n color: rgb(145 140 158 / var(--tw-text-opacity));\n}\n.tina-tailwind .text-current {\n color: currentColor;\n}\n.tina-tailwind .text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n.tina-tailwind .text-gray-800 {\n --tw-text-opacity: 1;\n color: rgb(54 49 69 / var(--tw-text-opacity));\n}\n.tina-tailwind .text-gray-900 {\n --tw-text-opacity: 1;\n color: rgb(37 35 54 / var(--tw-text-opacity));\n}\n.tina-tailwind .text-red-500 {\n --tw-text-opacity: 1;\n color: rgb(239 68 68 / var(--tw-text-opacity));\n}\n.tina-tailwind .underline {\n text-decoration-line: underline;\n}\n.tina-tailwind .opacity-100 {\n opacity: 1;\n}\n.tina-tailwind .opacity-0 {\n opacity: 0;\n}\n.tina-tailwind .opacity-80 {\n opacity: .8;\n}\n.tina-tailwind .opacity-90 {\n opacity: .9;\n}\n.tina-tailwind .opacity-50 {\n opacity: .5;\n}\n.tina-tailwind .opacity-70 {\n opacity: .7;\n}\n.tina-tailwind .shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.tina-tailwind .shadow-2xl {\n --tw-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.tina-tailwind .shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.tina-tailwind .ring-1 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n.tina-tailwind .ring-black {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity));\n}\n.tina-tailwind .ring-opacity-5 {\n --tw-ring-opacity: .05;\n}\n.tina-tailwind .filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.tina-tailwind .transition-opacity {\n transition-property: opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.tina-tailwind .transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.tina-tailwind .transition-colors {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.tina-tailwind .transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.tina-tailwind .duration-300 {\n transition-duration: 300ms;\n}\n.tina-tailwind .duration-200 {\n transition-duration: 200ms;\n}\n.tina-tailwind .duration-150 {\n transition-duration: 150ms;\n}\n.tina-tailwind .duration-100 {\n transition-duration: 100ms;\n}\n.tina-tailwind .duration-75 {\n transition-duration: 75ms;\n}\n.tina-tailwind .ease-out {\n transition-timing-function: cubic-bezier(0, 0, 0.2, 1);\n}\n.tina-tailwind .ease-in {\n transition-timing-function: cubic-bezier(0.4, 0, 1, 1);\n}\n.tina-tailwind .icon-parent svg {\n fill: currentColor;\n }\n\n.tina-tailwind {\n font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n font-size: 16px;\n line-height: 1.5;\n --tw-text-opacity: 1;\n color: rgb(86 81 101 / var(--tw-text-opacity));\n}\n\n.tina-tailwind .hover\\:bg-blue-600:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(5 116 228 / var(--tw-bg-opacity));\n}\n\n.tina-tailwind .hover\\:text-blue-600:hover {\n --tw-text-opacity: 1;\n color: rgb(5 116 228 / var(--tw-text-opacity));\n}\n\n.tina-tailwind .hover\\:text-blue-400:hover {\n --tw-text-opacity: 1;\n color: rgb(34 150 254 / var(--tw-text-opacity));\n}\n\n.tina-tailwind .hover\\:opacity-100:hover {\n opacity: 1;\n}\n\n.tina-tailwind .focus\\:text-blue-400:focus {\n --tw-text-opacity: 1;\n color: rgb(34 150 254 / var(--tw-text-opacity));\n}\n\n.tina-tailwind .focus\\:underline:focus {\n text-decoration-line: underline;\n}\n\n.tina-tailwind .focus\\:shadow-outline:focus {\n --tw-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);\n --tw-shadow-colored: 0 0 0 3px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.tina-tailwind .focus\\:outline-none:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n\n.tina-tailwind .focus\\:ring-2:focus {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n.tina-tailwind .focus\\:ring-blue-500:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(0 132 255 / var(--tw-ring-opacity));\n}\n';
|
|
2677
2715
|
class ContentCreatorPlugin {
|
|
2678
2716
|
constructor(options) {
|
|
2679
2717
|
this.__type = "content-creator";
|
|
@@ -2980,11 +3018,13 @@ const TinaCMSProvider2 = (_c) => {
|
|
|
2980
3018
|
"formifyCallback",
|
|
2981
3019
|
"schema"
|
|
2982
3020
|
]);
|
|
3021
|
+
var _a;
|
|
2983
3022
|
const validOldSetup = new Boolean(props == null ? void 0 : props.isLocalClient) || new Boolean(props == null ? void 0 : props.clientId) && new Boolean(props == null ? void 0 : props.branch);
|
|
2984
|
-
|
|
2985
|
-
|
|
3023
|
+
const apiURL = ((_a = props == null ? void 0 : props.client) == null ? void 0 : _a.apiUrl) || (props == null ? void 0 : props.apiURL);
|
|
3024
|
+
if (!apiURL && !validOldSetup) {
|
|
3025
|
+
throw new Error(`Must provide apiUrl or a client to the TinaWrapper component`);
|
|
2986
3026
|
}
|
|
2987
|
-
const { branch, clientId, isLocalClient } =
|
|
3027
|
+
const { branch, clientId, isLocalClient } = apiURL ? parseURL(apiURL) : {
|
|
2988
3028
|
branch: props.branch,
|
|
2989
3029
|
clientId: props.clientId,
|
|
2990
3030
|
isLocalClient: props.isLocalClient
|
|
@@ -3336,13 +3376,40 @@ const useGetCollections = (cms) => {
|
|
|
3336
3376
|
}, [cms]);
|
|
3337
3377
|
return { collections, loading, error };
|
|
3338
3378
|
};
|
|
3379
|
+
function IoMdClose(props) {
|
|
3380
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 512 512" }, "child": [{ "tag": "path", "attr": { "d": "M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z" } }] })(props);
|
|
3381
|
+
}
|
|
3382
|
+
function BiEdit(props) {
|
|
3383
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "m7 17.013 4.413-.015 9.632-9.54c.378-.378.586-.88.586-1.414s-.208-1.036-.586-1.414l-1.586-1.586c-.756-.756-2.075-.752-2.825-.003L7 12.583v4.43zM18.045 4.458l1.589 1.583-1.597 1.582-1.586-1.585 1.594-1.58zM9 13.417l6.03-5.973 1.586 1.586-6.029 5.971L9 15.006v-1.589z" } }, { "tag": "path", "attr": { "d": "M5 21h14c1.103 0 2-.897 2-2v-8.668l-2 2V19H8.158c-.026 0-.053.01-.079.01-.033 0-.066-.009-.1-.01H5V5h6.847l2-2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2z" } }] })(props);
|
|
3384
|
+
}
|
|
3385
|
+
function BiLogIn(props) {
|
|
3386
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "m13 16 5-4-5-4v3H4v2h9z" } }, { "tag": "path", "attr": { "d": "M20 3h-9c-1.103 0-2 .897-2 2v4h2V5h9v14h-9v-4H9v4c0 1.103.897 2 2 2h9c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2z" } }] })(props);
|
|
3387
|
+
}
|
|
3388
|
+
function BiLogOut(props) {
|
|
3389
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M16 13v-2H7V8l-5 4 5 4v-3z" } }, { "tag": "path", "attr": { "d": "M20 3h-9c-1.103 0-2 .897-2 2v4h2V5h9v14h-9v-4H9v4c0 1.103.897 2 2 2h9c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2z" } }] })(props);
|
|
3390
|
+
}
|
|
3391
|
+
function BiMenu(props) {
|
|
3392
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" } }] })(props);
|
|
3393
|
+
}
|
|
3394
|
+
function BiPlus(props) {
|
|
3395
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M19 11h-6V5h-2v6H5v2h6v6h2v-6h6z" } }] })(props);
|
|
3396
|
+
}
|
|
3397
|
+
function BiTrash(props) {
|
|
3398
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M5 20a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8h2V6h-4V4a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v2H3v2h2zM9 4h6v2H9zM8 8h9v12H7V8z" } }, { "tag": "path", "attr": { "d": "M9 10h2v8H9zm4 0h2v8h-2z" } }] })(props);
|
|
3399
|
+
}
|
|
3339
3400
|
const slugify = (text) => {
|
|
3340
3401
|
return text.toString().toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "_").replace(/^-+|-+$/g, "");
|
|
3341
3402
|
};
|
|
3342
3403
|
const Sidebar = ({ cms }) => {
|
|
3404
|
+
var _a, _b;
|
|
3343
3405
|
const collectionsInfo = useGetCollections(cms);
|
|
3344
3406
|
const screens = cms.plugins.getType("screen").all();
|
|
3345
|
-
|
|
3407
|
+
const [menuIsOpen, setMenuIsOpen] = React.useState(false);
|
|
3408
|
+
const isLocalMode = (_b = (_a = cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode;
|
|
3409
|
+
const navBreakpoint = 1e3;
|
|
3410
|
+
const windowWidth = useWindowWidth();
|
|
3411
|
+
const renderDesktopNav = windowWidth > navBreakpoint;
|
|
3412
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, renderDesktopNav && /* @__PURE__ */ React.createElement(Nav, {
|
|
3346
3413
|
sidebarWidth: 360,
|
|
3347
3414
|
showCollections: true,
|
|
3348
3415
|
collectionsInfo,
|
|
@@ -3358,7 +3425,76 @@ const Sidebar = ({ cms }) => {
|
|
|
3358
3425
|
to: `collections/${collection.name}`,
|
|
3359
3426
|
Icon: ImFilesEmpty
|
|
3360
3427
|
})
|
|
3361
|
-
})
|
|
3428
|
+
}), !renderDesktopNav && /* @__PURE__ */ React.createElement(Transition, {
|
|
3429
|
+
show: menuIsOpen
|
|
3430
|
+
}, /* @__PURE__ */ React.createElement(Transition.Child, {
|
|
3431
|
+
as: React.Fragment,
|
|
3432
|
+
enter: "transform transition-all ease-out duration-300",
|
|
3433
|
+
enterFrom: "opacity-0 -translate-x-full",
|
|
3434
|
+
enterTo: "opacity-100 translate-x-0",
|
|
3435
|
+
leave: "transform transition-all ease-in duration-200",
|
|
3436
|
+
leaveFrom: "opacity-100 translate-x-0",
|
|
3437
|
+
leaveTo: "opacity-0 -translate-x-full"
|
|
3438
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
3439
|
+
className: "fixed left-0 top-0 z-overlay h-full transform"
|
|
3440
|
+
}, /* @__PURE__ */ React.createElement(Nav, {
|
|
3441
|
+
className: "rounded-r-md",
|
|
3442
|
+
sidebarWidth: 360,
|
|
3443
|
+
showCollections: true,
|
|
3444
|
+
collectionsInfo,
|
|
3445
|
+
screens,
|
|
3446
|
+
contentCreators: [],
|
|
3447
|
+
RenderNavSite: ({ view }) => /* @__PURE__ */ React.createElement(SidebarLink, {
|
|
3448
|
+
label: view.name,
|
|
3449
|
+
to: `screens/${slugify(view.name)}`,
|
|
3450
|
+
Icon: view.Icon ? view.Icon : ImFilesEmpty,
|
|
3451
|
+
onClick: () => {
|
|
3452
|
+
setMenuIsOpen(false);
|
|
3453
|
+
}
|
|
3454
|
+
}),
|
|
3455
|
+
RenderNavCollection: ({ collection }) => /* @__PURE__ */ React.createElement(SidebarLink, {
|
|
3456
|
+
label: collection.label ? collection.label : collection.name,
|
|
3457
|
+
to: `collections/${collection.name}`,
|
|
3458
|
+
Icon: ImFilesEmpty,
|
|
3459
|
+
onClick: () => {
|
|
3460
|
+
setMenuIsOpen(false);
|
|
3461
|
+
}
|
|
3462
|
+
})
|
|
3463
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
3464
|
+
className: "absolute top-8 right-0 transform translate-x-full overflow-hidden"
|
|
3465
|
+
}, /* @__PURE__ */ React.createElement(Button, {
|
|
3466
|
+
rounded: "right",
|
|
3467
|
+
variant: "secondary",
|
|
3468
|
+
onClick: () => {
|
|
3469
|
+
setMenuIsOpen(false);
|
|
3470
|
+
},
|
|
3471
|
+
className: `transition-opacity duration-150 ease-out`
|
|
3472
|
+
}, /* @__PURE__ */ React.createElement(IoMdClose, {
|
|
3473
|
+
className: "h-6 w-auto"
|
|
3474
|
+
})))))), /* @__PURE__ */ React.createElement(Transition.Child, {
|
|
3475
|
+
as: React.Fragment,
|
|
3476
|
+
enter: "ease-out duration-300",
|
|
3477
|
+
enterFrom: "opacity-0",
|
|
3478
|
+
enterTo: "opacity-80",
|
|
3479
|
+
entered: "opacity-80",
|
|
3480
|
+
leave: "ease-in duration-200",
|
|
3481
|
+
leaveFrom: "opacity-80",
|
|
3482
|
+
leaveTo: "opacity-0"
|
|
3483
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
3484
|
+
onClick: () => {
|
|
3485
|
+
setMenuIsOpen(false);
|
|
3486
|
+
},
|
|
3487
|
+
className: "fixed z-menu inset-0 bg-gradient-to-br from-gray-800 via-gray-900 to-black"
|
|
3488
|
+
}))), !renderDesktopNav && /* @__PURE__ */ React.createElement(Button, {
|
|
3489
|
+
rounded: "right",
|
|
3490
|
+
variant: "secondary",
|
|
3491
|
+
onClick: () => {
|
|
3492
|
+
setMenuIsOpen(true);
|
|
3493
|
+
},
|
|
3494
|
+
className: `pointer-events-auto -ml-px absolute left-0 z-50 ${isLocalMode ? `top-10` : `top-4`}`
|
|
3495
|
+
}, /* @__PURE__ */ React.createElement(BiMenu, {
|
|
3496
|
+
className: "h-7 w-auto"
|
|
3497
|
+
})));
|
|
3362
3498
|
};
|
|
3363
3499
|
const SidebarLink = (props) => {
|
|
3364
3500
|
const { to, label, Icon } = props;
|
|
@@ -3366,6 +3502,8 @@ const SidebarLink = (props) => {
|
|
|
3366
3502
|
className: ({ isActive }) => {
|
|
3367
3503
|
return `text-base tracking-wide ${isActive ? "text-blue-600" : "text-gray-500"} hover:text-blue-600 flex items-center opacity-90 hover:opacity-100`;
|
|
3368
3504
|
},
|
|
3505
|
+
onClick: props.onClick ? props.onClick : () => {
|
|
3506
|
+
},
|
|
3369
3507
|
to
|
|
3370
3508
|
}, /* @__PURE__ */ React.createElement(Icon, {
|
|
3371
3509
|
className: "mr-2 h-6 opacity-80 w-auto"
|
|
@@ -3379,21 +3517,6 @@ const GetCMS = ({ children }) => {
|
|
|
3379
3517
|
return null;
|
|
3380
3518
|
}
|
|
3381
3519
|
};
|
|
3382
|
-
function BiEdit(props) {
|
|
3383
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "m7 17.013 4.413-.015 9.632-9.54c.378-.378.586-.88.586-1.414s-.208-1.036-.586-1.414l-1.586-1.586c-.756-.756-2.075-.752-2.825-.003L7 12.583v4.43zM18.045 4.458l1.589 1.583-1.597 1.582-1.586-1.585 1.594-1.58zM9 13.417l6.03-5.973 1.586 1.586-6.029 5.971L9 15.006v-1.589z" } }, { "tag": "path", "attr": { "d": "M5 21h14c1.103 0 2-.897 2-2v-8.668l-2 2V19H8.158c-.026 0-.053.01-.079.01-.033 0-.066-.009-.1-.01H5V5h6.847l2-2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2z" } }] })(props);
|
|
3384
|
-
}
|
|
3385
|
-
function BiLogIn(props) {
|
|
3386
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "m13 16 5-4-5-4v3H4v2h9z" } }, { "tag": "path", "attr": { "d": "M20 3h-9c-1.103 0-2 .897-2 2v4h2V5h9v14h-9v-4H9v4c0 1.103.897 2 2 2h9c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2z" } }] })(props);
|
|
3387
|
-
}
|
|
3388
|
-
function BiLogOut(props) {
|
|
3389
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M16 13v-2H7V8l-5 4 5 4v-3z" } }, { "tag": "path", "attr": { "d": "M20 3h-9c-1.103 0-2 .897-2 2v4h2V5h9v14h-9v-4H9v4c0 1.103.897 2 2 2h9c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2z" } }] })(props);
|
|
3390
|
-
}
|
|
3391
|
-
function BiPlus(props) {
|
|
3392
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M19 11h-6V5h-2v6H5v2h6v6h2v-6h6z" } }] })(props);
|
|
3393
|
-
}
|
|
3394
|
-
function BiTrash(props) {
|
|
3395
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M5 20a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8h2V6h-4V4a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v2H3v2h2zM9 4h6v2H9zM8 8h9v12H7V8z" } }, { "tag": "path", "attr": { "d": "M9 10h2v8H9zm4 0h2v8h-2z" } }] })(props);
|
|
3396
|
-
}
|
|
3397
3520
|
function MdOutlineArrowBack(props) {
|
|
3398
3521
|
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "d": "M0 0h24v24H0V0z" } }, { "tag": "path", "attr": { "d": "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" } }] })(props);
|
|
3399
3522
|
}
|
|
@@ -3744,6 +3867,8 @@ const CollectionListPage = () => {
|
|
|
3744
3867
|
}, /* @__PURE__ */ React.createElement("tbody", {
|
|
3745
3868
|
className: "divide-y divide-gray-150"
|
|
3746
3869
|
}, documents.map((document) => {
|
|
3870
|
+
var _a2;
|
|
3871
|
+
const hasTitle = Boolean(document.node._sys.title);
|
|
3747
3872
|
const subfolders = document.node._sys.breadcrumbs.slice(0, -1).join("/");
|
|
3748
3873
|
return /* @__PURE__ */ React.createElement("tr", {
|
|
3749
3874
|
key: `document-${document.node._sys.relativePath}`,
|
|
@@ -3759,11 +3884,17 @@ const CollectionListPage = () => {
|
|
|
3759
3884
|
className: "inline-block h-6 w-auto opacity-70"
|
|
3760
3885
|
}), /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("span", {
|
|
3761
3886
|
className: "block text-xs text-gray-400 mb-1 uppercase"
|
|
3762
|
-
}, "Filename"), /* @__PURE__ */ React.createElement("span", {
|
|
3887
|
+
}, hasTitle ? "Title" : "Filename"), /* @__PURE__ */ React.createElement("span", {
|
|
3763
3888
|
className: "h-5 leading-5 block whitespace-nowrap"
|
|
3764
3889
|
}, subfolders && /* @__PURE__ */ React.createElement("span", {
|
|
3765
3890
|
className: "text-xs text-gray-400"
|
|
3766
|
-
}, `${subfolders}/`), /* @__PURE__ */ React.createElement("span", null, document.node._sys.filename))))), /* @__PURE__ */ React.createElement("td", {
|
|
3891
|
+
}, `${subfolders}/`), /* @__PURE__ */ React.createElement("span", null, hasTitle ? (_a2 = document.node._sys) == null ? void 0 : _a2.title : document.node._sys.filename))))), hasTitle && /* @__PURE__ */ React.createElement("td", {
|
|
3892
|
+
className: "px-6 py-4 whitespace-nowrap"
|
|
3893
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
3894
|
+
className: "block text-xs text-gray-400 mb-1 uppercase"
|
|
3895
|
+
}, "Filename"), /* @__PURE__ */ React.createElement("span", {
|
|
3896
|
+
className: "h-5 leading-5 block text-sm font-medium text-gray-900"
|
|
3897
|
+
}, document.node._sys.filename)), /* @__PURE__ */ React.createElement("td", {
|
|
3767
3898
|
className: "px-6 py-4 whitespace-nowrap"
|
|
3768
3899
|
}, /* @__PURE__ */ React.createElement("span", {
|
|
3769
3900
|
className: "block text-xs text-gray-400 mb-1 uppercase"
|
|
@@ -3923,8 +4054,12 @@ const RenderForm$1 = ({ cms, collection, templateName, mutationInfo }) => {
|
|
|
3923
4054
|
}
|
|
3924
4055
|
});
|
|
3925
4056
|
}, [cms, collection, mutationInfo]);
|
|
4057
|
+
const navBreakpoint = 1e3;
|
|
4058
|
+
const windowWidth = useWindowWidth();
|
|
4059
|
+
const renderNavToggle = windowWidth < navBreakpoint + 1;
|
|
4060
|
+
const headerPadding = renderNavToggle ? "px-20" : "px-6";
|
|
3926
4061
|
return /* @__PURE__ */ React.createElement(PageWrapper, null, /* @__PURE__ */ React.createElement(React.Fragment, null, ((_b = (_a = cms == null ? void 0 : cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode) && /* @__PURE__ */ React.createElement(LocalWarning, null), /* @__PURE__ */ React.createElement("div", {
|
|
3927
|
-
className:
|
|
4062
|
+
className: `py-4 border-b border-gray-200 bg-white ${headerPadding}`
|
|
3928
4063
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
3929
4064
|
className: "max-w-form mx-auto"
|
|
3930
4065
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
@@ -4067,8 +4202,12 @@ const RenderForm = ({
|
|
|
4067
4202
|
}
|
|
4068
4203
|
});
|
|
4069
4204
|
}, [cms, document, relativePath, collection, mutationInfo]);
|
|
4205
|
+
const navBreakpoint = 1e3;
|
|
4206
|
+
const windowWidth = useWindowWidth();
|
|
4207
|
+
const renderNavToggle = windowWidth < navBreakpoint + 1;
|
|
4208
|
+
const headerPadding = renderNavToggle ? "px-20" : "px-6";
|
|
4070
4209
|
return /* @__PURE__ */ React.createElement(PageWrapper, null, /* @__PURE__ */ React.createElement(React.Fragment, null, ((_b = (_a = cms == null ? void 0 : cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode) && /* @__PURE__ */ React.createElement(LocalWarning, null), /* @__PURE__ */ React.createElement("div", {
|
|
4071
|
-
className:
|
|
4210
|
+
className: `py-4 border-b border-gray-200 bg-white ${headerPadding}`
|
|
4072
4211
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
4073
4212
|
className: "max-w-form mx-auto"
|
|
4074
4213
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
@@ -4091,13 +4230,18 @@ const RenderForm = ({
|
|
|
4091
4230
|
};
|
|
4092
4231
|
const ScreenPage = () => {
|
|
4093
4232
|
const { screenName } = useParams();
|
|
4233
|
+
const navBreakpoint = 1e3;
|
|
4234
|
+
const windowWidth = useWindowWidth();
|
|
4235
|
+
const renderNavToggle = windowWidth < navBreakpoint + 1;
|
|
4094
4236
|
return /* @__PURE__ */ React.createElement(GetCMS, null, (cms) => {
|
|
4095
4237
|
var _a, _b;
|
|
4096
4238
|
const screens = cms.plugins.getType("screen").all();
|
|
4097
4239
|
const selectedScreen = screens.find(({ name }) => slugify(name) === screenName);
|
|
4098
4240
|
return /* @__PURE__ */ React.createElement("div", {
|
|
4099
4241
|
className: "relative w-full h-full flex flex-col items-stretch justify-between"
|
|
4100
|
-
}, ((_b = (_a = cms == null ? void 0 : cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode) && /* @__PURE__ */ React.createElement(LocalWarning, null), /* @__PURE__ */ React.createElement("div", {
|
|
4242
|
+
}, ((_b = (_a = cms == null ? void 0 : cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode) && /* @__PURE__ */ React.createElement(LocalWarning, null), renderNavToggle && /* @__PURE__ */ React.createElement("div", {
|
|
4243
|
+
className: `py-5 border-b border-gray-200 bg-white pl-18`
|
|
4244
|
+
}, selectedScreen.name), /* @__PURE__ */ React.createElement("div", {
|
|
4101
4245
|
className: "flex-1 overflow-y-auto relative flex flex-col items-stretch justify-between"
|
|
4102
4246
|
}, /* @__PURE__ */ React.createElement(selectedScreen.Component, {
|
|
4103
4247
|
close: () => {
|