tinacms 0.66.3 → 0.66.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/dist/index.js CHANGED
@@ -30,8 +30,8 @@ var __objRest = (source, exclude) => {
30
30
  return target;
31
31
  };
32
32
  (function(global, factory) {
33
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@tinacms/toolkit"), require("graphql"), require("lodash.set"), require("graphql-tag"), require("react"), require("styled-components"), require("yup"), require("@tinacms/sharedctx"), require("final-form"), require("url-pattern"), require("react-router-dom"), require("@headlessui/react")) : typeof define === "function" && define.amd ? define(["exports", "@tinacms/toolkit", "graphql", "lodash.set", "graphql-tag", "react", "styled-components", "yup", "@tinacms/sharedctx", "final-form", "url-pattern", "react-router-dom", "@headlessui/react"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.tinacms = {}, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP));
34
- })(this, function(exports2, toolkit, graphql, set, gql$1, React, styled, yup, sharedctx, finalForm, UrlPattern, reactRouterDom, react) {
33
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@tinacms/toolkit"), require("graphql"), require("lodash.set"), require("react"), require("graphql-tag"), require("styled-components"), require("yup"), require("@tinacms/sharedctx"), require("final-form"), require("url-pattern"), require("react-router-dom"), require("@headlessui/react")) : typeof define === "function" && define.amd ? define(["exports", "@tinacms/toolkit", "graphql", "lodash.set", "react", "graphql-tag", "styled-components", "yup", "@tinacms/sharedctx", "final-form", "url-pattern", "react-router-dom", "@headlessui/react"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.tinacms = {}, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP, global.NOOP));
34
+ })(this, function(exports2, toolkit, G, set, React, gql$1, styled, yup, sharedctx, finalForm, UrlPattern, reactRouterDom, react) {
35
35
  "use strict";
36
36
  function _interopDefaultLegacy(e) {
37
37
  return e && typeof e === "object" && "default" in e ? e : { "default": e };
@@ -56,9 +56,10 @@ var __objRest = (source, exclude) => {
56
56
  n["default"] = e;
57
57
  return Object.freeze(n);
58
58
  }
59
+ var G__namespace = /* @__PURE__ */ _interopNamespace(G);
59
60
  var set__default = /* @__PURE__ */ _interopDefaultLegacy(set);
60
- var gql__default = /* @__PURE__ */ _interopDefaultLegacy(gql$1);
61
61
  var React__default = /* @__PURE__ */ _interopDefaultLegacy(React);
62
+ var gql__default = /* @__PURE__ */ _interopDefaultLegacy(gql$1);
62
63
  var styled__default = /* @__PURE__ */ _interopDefaultLegacy(styled);
63
64
  var yup__namespace = /* @__PURE__ */ _interopNamespace(yup);
64
65
  var UrlPattern__default = /* @__PURE__ */ _interopDefaultLegacy(UrlPattern);
@@ -88,35 +89,35 @@ var __objRest = (source, exclude) => {
88
89
  authTab = popupWindow(`${frontendUrl}/signin?clientId=${clientId}&origin=${origin}`, "_blank", window, 1e3, 700);
89
90
  });
90
91
  };
91
- const formify = (query, schema) => {
92
- const typeInfo = new graphql.TypeInfo(schema);
92
+ const formify$1 = (query, schema) => {
93
+ const typeInfo = new G.TypeInfo(schema);
93
94
  const pathsToPopulate = [];
94
95
  const visitor = {
95
- leave(node, key, parent, path, ancestors) {
96
+ leave(node2, key, parent, path, ancestors) {
96
97
  const type = typeInfo.getType();
97
98
  if (type) {
98
- const namedType = graphql.getNamedType(type);
99
- if (namedType instanceof graphql.GraphQLObjectType) {
99
+ const namedType = G.getNamedType(type);
100
+ if (namedType instanceof G.GraphQLObjectType) {
100
101
  const hasNodeInterface = !!namedType.getInterfaces().find((i) => i.name === "Node");
101
102
  if (hasNodeInterface) {
102
103
  if (typeof path[path.length - 1] === "number") {
103
104
  assertIsObjectType(namedType);
104
105
  const valuesNode = namedType.getFields().values;
105
- const namedValuesNode = graphql.getNamedType(valuesNode.type);
106
+ const namedValuesNode = G.getNamedType(valuesNode.type);
106
107
  const pathForValues = [...path];
107
108
  pathForValues.push("selectionSet");
108
109
  pathForValues.push("selections");
109
110
  const valuesAst = buildValuesForType(namedValuesNode);
110
111
  pathForValues.push(100);
111
112
  const formNode = namedType.getFields().form;
112
- const namedFormNode = graphql.getNamedType(formNode.type);
113
+ const namedFormNode = G.getNamedType(formNode.type);
113
114
  const pathForForm = [...path];
114
115
  pathForForm.push("selectionSet");
115
116
  pathForForm.push("selections");
116
117
  const formAst = buildFormForType(namedFormNode);
117
118
  pathForForm.push(101);
118
119
  const sysNode = namedType.getFields().sys;
119
- const namedSysNode = graphql.getNamedType(sysNode.type);
120
+ const namedSysNode = G.getNamedType(sysNode.type);
120
121
  const pathForSys = [...path];
121
122
  pathForSys.push("selectionSet");
122
123
  pathForSys.push("selections");
@@ -145,7 +146,7 @@ var __objRest = (source, exclude) => {
145
146
  }
146
147
  }
147
148
  };
148
- graphql.visit(query, graphql.visitWithTypeInfo(typeInfo, visitor));
149
+ G.visit(query, G.visitWithTypeInfo(typeInfo, visitor));
149
150
  const topLevelPaths = pathsToPopulate.filter((p, i) => {
150
151
  const otherPaths = pathsToPopulate.filter((_, index) => index !== i);
151
152
  const isChildOfOtherPaths = otherPaths.some((op) => {
@@ -254,8 +255,8 @@ var __objRest = (source, exclude) => {
254
255
  kind: "SelectionSet",
255
256
  selections: [
256
257
  ...Object.values(type.getFields()).map((field) => {
257
- const namedType = graphql.getNamedType(field.type);
258
- if (graphql.isLeafType(namedType)) {
258
+ const namedType = G.getNamedType(field.type);
259
+ if (G.isLeafType(namedType)) {
259
260
  return {
260
261
  kind: "Field",
261
262
  name: {
@@ -263,7 +264,7 @@ var __objRest = (source, exclude) => {
263
264
  value: field.name
264
265
  }
265
266
  };
266
- } else if (namedType instanceof graphql.GraphQLUnionType) {
267
+ } else if (namedType instanceof G.GraphQLUnionType) {
267
268
  return {
268
269
  kind: "Field",
269
270
  name: {
@@ -277,7 +278,7 @@ var __objRest = (source, exclude) => {
277
278
  ]
278
279
  }
279
280
  };
280
- } else if (namedType instanceof graphql.GraphQLObjectType) {
281
+ } else if (namedType instanceof G.GraphQLObjectType) {
281
282
  return {
282
283
  kind: "Field",
283
284
  name: {
@@ -306,7 +307,7 @@ var __objRest = (source, exclude) => {
306
307
  const result = callback(fields);
307
308
  if (!result.continue) {
308
309
  if (fields.every((field) => {
309
- return !graphql.isScalarType(graphql.getNamedType(field.type));
310
+ return !G.isScalarType(G.getNamedType(field.type));
310
311
  })) {
311
312
  return [
312
313
  {
@@ -319,7 +320,7 @@ var __objRest = (source, exclude) => {
319
320
  ];
320
321
  }
321
322
  return buildSelectionsFields(result.filteredFields.filter((field) => {
322
- if (graphql.isScalarType(graphql.getNamedType(field.type))) {
323
+ if (G.isScalarType(G.getNamedType(field.type))) {
323
324
  return true;
324
325
  }
325
326
  return false;
@@ -329,8 +330,8 @@ var __objRest = (source, exclude) => {
329
330
  }
330
331
  }
331
332
  return filteredFields.map((field) => {
332
- const namedType = graphql.getNamedType(field.type);
333
- if (graphql.isLeafType(namedType)) {
333
+ const namedType = G.getNamedType(field.type);
334
+ if (G.isLeafType(namedType)) {
334
335
  return {
335
336
  kind: "Field",
336
337
  name: {
@@ -338,7 +339,7 @@ var __objRest = (source, exclude) => {
338
339
  value: field.name
339
340
  }
340
341
  };
341
- } else if (namedType instanceof graphql.GraphQLUnionType) {
342
+ } else if (namedType instanceof G.GraphQLUnionType) {
342
343
  return {
343
344
  kind: "Field",
344
345
  name: {
@@ -352,7 +353,7 @@ var __objRest = (source, exclude) => {
352
353
  ]
353
354
  }
354
355
  };
355
- } else if (namedType instanceof graphql.GraphQLObjectType) {
356
+ } else if (namedType instanceof G.GraphQLObjectType) {
356
357
  return {
357
358
  kind: "Field",
358
359
  name: {
@@ -382,19 +383,448 @@ var __objRest = (source, exclude) => {
382
383
  });
383
384
  };
384
385
  function assertIsObjectType(type) {
385
- if (type instanceof graphql.GraphQLObjectType)
386
+ if (type instanceof G.GraphQLObjectType)
386
387
  ;
387
388
  else {
388
389
  throw new Error(`Expected an instance of GraphQLObjectType for type ${type.name}`);
389
390
  }
390
391
  }
391
392
  function assertIsUnionType(type) {
392
- if (type instanceof graphql.GraphQLUnionType)
393
+ if (type instanceof G.GraphQLUnionType)
393
394
  ;
394
395
  else {
395
396
  throw new Error(`Expected an instance of GraphQLUnionType for type ${type.name}`);
396
397
  }
397
398
  }
399
+ const isNodeField = (type) => {
400
+ if (G__namespace.isUnionType(type)) {
401
+ return type.getTypes().every((type2) => {
402
+ return type2.getInterfaces().find((intfc) => intfc.name === "Node");
403
+ });
404
+ } else if (G__namespace.isObjectType(type)) {
405
+ return !!type.getInterfaces().find((intfc) => intfc.name === "Node");
406
+ } else if (G__namespace.isInterfaceType(type)) {
407
+ if (type.name === "Node") {
408
+ return true;
409
+ }
410
+ } else {
411
+ throw new Error(`Expected GraphQLObjectType or GraphQLUnionType for isNodeField check`);
412
+ }
413
+ };
414
+ const isConnectionField = (type) => {
415
+ if (G__namespace.isObjectType(type)) {
416
+ return !!type.getInterfaces().find((intfc) => intfc.name === "Connection");
417
+ } else {
418
+ throw new Error(`Expected GraphQLObjectType for isCollectionField check`);
419
+ }
420
+ };
421
+ const getObjectField = (object, selectionNode) => {
422
+ return object.getFields()[selectionNode.name.value];
423
+ };
424
+ const getSelectedUnionType = (unionType, selectionNode) => {
425
+ return unionType.getTypes().find((type) => type.name === selectionNode.typeCondition.name.value);
426
+ };
427
+ function ensureNodeField(field) {
428
+ if (!isNodeField(field)) {
429
+ throw new Error(`Expected field to implement Node interface`);
430
+ }
431
+ }
432
+ function ensureUnionType(type) {
433
+ if (!G__namespace.isUnionType(type)) {
434
+ throw new Error(`Expected type to be GraphQLUnionType`);
435
+ }
436
+ }
437
+ function ensureObjectType(type) {
438
+ if (!G__namespace.isObjectType(type)) {
439
+ console.log(type);
440
+ throw new Error(`Expected type to be GraphQLObjectType`);
441
+ }
442
+ }
443
+ function ensureOperationDefinition(type) {
444
+ if (type.kind !== "OperationDefinition") {
445
+ throw new Error(`Expected top-level definition to be an OperationDefinition node, ensure your query has been optimized before calling formify`);
446
+ }
447
+ }
448
+ function getNameAndAlias(fieldNode, list) {
449
+ return {
450
+ name: fieldNode.name.value,
451
+ alias: fieldNode.alias ? fieldNode.alias.value : fieldNode.name.value,
452
+ list: !!list
453
+ };
454
+ }
455
+ const node = G__namespace.parse(`
456
+ query Sample {
457
+ _internalSys: sys {
458
+ path
459
+ collection {
460
+ name
461
+ }
462
+ }
463
+ form
464
+ values
465
+ }`);
466
+ const metaFields = node.definitions[0].selectionSet.selections;
467
+ const NOOP = "This is either an error or is not yet supported";
468
+ const UNEXPECTED = "Formify encountered an unexpected error, please contact support";
469
+ const DATA_NODE_NAME = "data";
470
+ const EDGES_NODE_NAME = "edges";
471
+ const NODE_NAME = "node";
472
+ const COLLECTION_FIELD_NAME = "getCollection";
473
+ const COLLECTIONS_FIELD_NAME = "getCollections";
474
+ const COLLECTIONS_DOCUMENTS_NAME = "documents";
475
+ class FormifyError extends Error {
476
+ constructor(code, details) {
477
+ let message;
478
+ switch (code) {
479
+ case "NOOP":
480
+ message = NOOP;
481
+ break;
482
+ case "UNEXPECTED":
483
+ message = UNEXPECTED;
484
+ break;
485
+ default:
486
+ message = "";
487
+ break;
488
+ }
489
+ super(`${message} ${details || ""}`);
490
+ this.name = "FormifyError";
491
+ }
492
+ }
493
+ const formify = async ({
494
+ schema,
495
+ query,
496
+ getOptimizedQuery
497
+ }) => {
498
+ const nodes = [];
499
+ const documentNode = G__namespace.parse(query);
500
+ const visitor2 = {
501
+ OperationDefinition: (node2) => {
502
+ if (!node2.name) {
503
+ return __spreadProps(__spreadValues({}, node2), {
504
+ name: {
505
+ kind: "Name",
506
+ value: `QueryOperation`
507
+ }
508
+ });
509
+ }
510
+ return node2;
511
+ }
512
+ };
513
+ const documentNodeWithName = G.visit(documentNode, visitor2);
514
+ const optimizedQuery = await getOptimizedQuery(documentNodeWithName);
515
+ const typeInfo = new G__namespace.TypeInfo(schema);
516
+ const formifyConnection = ({
517
+ namedFieldType,
518
+ selectionNode,
519
+ path
520
+ }) => {
521
+ ensureObjectType(namedFieldType);
522
+ return __spreadProps(__spreadValues({}, selectionNode), {
523
+ selectionSet: {
524
+ kind: "SelectionSet",
525
+ selections: selectionNode.selectionSet.selections.map((selectionNode2) => {
526
+ switch (selectionNode2.kind) {
527
+ case "Field":
528
+ if (selectionNode2.name.value === EDGES_NODE_NAME) {
529
+ const edgeField = namedFieldType.getFields()[EDGES_NODE_NAME];
530
+ const edgeType = G__namespace.getNamedType(edgeField.type);
531
+ ensureObjectType(edgeType);
532
+ return __spreadProps(__spreadValues({}, selectionNode2), {
533
+ selectionSet: {
534
+ kind: "SelectionSet",
535
+ selections: selectionNode2.selectionSet.selections.map((subSelectionNode) => {
536
+ switch (subSelectionNode.kind) {
537
+ case "Field":
538
+ if (subSelectionNode.name.value === NODE_NAME) {
539
+ const nodeField = edgeType.getFields()[NODE_NAME];
540
+ return formifyNode({
541
+ fieldOrInlineFragmentNode: subSelectionNode,
542
+ parentType: nodeField.type,
543
+ path: [
544
+ ...path,
545
+ getNameAndAlias(selectionNode2),
546
+ getNameAndAlias(subSelectionNode, true)
547
+ ]
548
+ });
549
+ } else {
550
+ return subSelectionNode;
551
+ }
552
+ default:
553
+ throw new FormifyError("NOOP");
554
+ }
555
+ })
556
+ }
557
+ });
558
+ }
559
+ return selectionNode2;
560
+ default:
561
+ throw new FormifyError("UNEXPECTED");
562
+ }
563
+ })
564
+ }
565
+ });
566
+ };
567
+ function formifyNode({
568
+ fieldOrInlineFragmentNode,
569
+ parentType,
570
+ path
571
+ }) {
572
+ let extraFields = [];
573
+ const namedParentType = G__namespace.getNamedType(parentType);
574
+ const formifiedNode = __spreadProps(__spreadValues({}, fieldOrInlineFragmentNode), {
575
+ selectionSet: {
576
+ kind: "SelectionSet",
577
+ selections: [
578
+ ...fieldOrInlineFragmentNode.selectionSet.selections.map((selectionNode) => {
579
+ switch (selectionNode.kind) {
580
+ case "InlineFragment":
581
+ if (G__namespace.isInterfaceType(namedParentType)) {
582
+ const type2 = schema.getImplementations(namedParentType).objects[selectionNode.typeCondition.name.value];
583
+ return formifyNode({
584
+ fieldOrInlineFragmentNode: selectionNode,
585
+ parentType: type2,
586
+ path
587
+ });
588
+ }
589
+ ensureUnionType(namedParentType);
590
+ const type = getSelectedUnionType(namedParentType, selectionNode);
591
+ return formifyNode({
592
+ fieldOrInlineFragmentNode: selectionNode,
593
+ parentType: type,
594
+ path
595
+ });
596
+ case "Field":
597
+ if (selectionNode.name.value === DATA_NODE_NAME) {
598
+ extraFields = metaFields;
599
+ if (G__namespace.isObjectType(namedParentType)) {
600
+ const field = getObjectField(namedParentType, selectionNode);
601
+ const namedType = G__namespace.getNamedType(field.type);
602
+ ensureObjectType(namedType);
603
+ return __spreadProps(__spreadValues({}, selectionNode), {
604
+ selectionSet: {
605
+ kind: "SelectionSet",
606
+ selections: [
607
+ ...selectionNode.selectionSet.selections.map((subSelectionNode) => {
608
+ switch (subSelectionNode.kind) {
609
+ case "Field":
610
+ const subSelectionField = getObjectField(namedType, subSelectionNode);
611
+ if (!subSelectionField) {
612
+ return subSelectionNode;
613
+ }
614
+ return formifyField({
615
+ fieldNode: subSelectionNode,
616
+ parentType: field.type,
617
+ path: [
618
+ ...path,
619
+ getNameAndAlias(subSelectionNode, G__namespace.isListType(subSelectionField.type))
620
+ ]
621
+ });
622
+ default:
623
+ throw new FormifyError("UNEXPECTED", `selection ${subSelectionNode.kind}`);
624
+ }
625
+ })
626
+ ]
627
+ }
628
+ });
629
+ }
630
+ return selectionNode;
631
+ }
632
+ return selectionNode;
633
+ default:
634
+ throw new FormifyError("UNEXPECTED");
635
+ }
636
+ }),
637
+ ...extraFields
638
+ ]
639
+ }
640
+ });
641
+ return formifiedNode;
642
+ }
643
+ const formifyField = ({
644
+ fieldNode,
645
+ parentType,
646
+ path
647
+ }) => {
648
+ const namedParentType = G__namespace.getNamedType(parentType);
649
+ ensureObjectType(namedParentType);
650
+ const field = getObjectField(namedParentType, fieldNode);
651
+ if (!field) {
652
+ if (fieldNode.name.value === "__typename") {
653
+ return fieldNode;
654
+ } else {
655
+ throw new FormifyError("UNEXPECTED", `field with no associated type ${fieldNode.name.value}`);
656
+ }
657
+ }
658
+ const namedType = G__namespace.getNamedType(field.type);
659
+ if (G__namespace.isScalarType(namedType)) {
660
+ return fieldNode;
661
+ }
662
+ return __spreadProps(__spreadValues({}, fieldNode), {
663
+ selectionSet: {
664
+ kind: "SelectionSet",
665
+ selections: [
666
+ ...fieldNode.selectionSet.selections.map((selectionNode) => {
667
+ switch (selectionNode.kind) {
668
+ case "Field":
669
+ if (selectionNode.name.value === "__typename") {
670
+ return selectionNode;
671
+ }
672
+ ensureObjectType(namedType);
673
+ const field2 = getObjectField(namedType, selectionNode);
674
+ if (!field2) {
675
+ return fieldNode;
676
+ }
677
+ if (G__namespace.isScalarType(G__namespace.getNamedType(field2.type))) {
678
+ return selectionNode;
679
+ }
680
+ return __spreadProps(__spreadValues({}, selectionNode), {
681
+ selectionSet: {
682
+ kind: "SelectionSet",
683
+ selections: selectionNode.selectionSet.selections.map((selectionNode2) => {
684
+ switch (selectionNode2.kind) {
685
+ case "Field":
686
+ if (selectionNode2.name.value === "__typename") {
687
+ return selectionNode2;
688
+ }
689
+ return formifyField({
690
+ fieldNode: selectionNode2,
691
+ parentType: field2.type,
692
+ path
693
+ });
694
+ case "InlineFragment":
695
+ const namedType2 = G__namespace.getNamedType(field2.type);
696
+ ensureNodeField(namedType2);
697
+ return formifyNode({
698
+ fieldOrInlineFragmentNode: selectionNode2,
699
+ parentType: field2.type,
700
+ path
701
+ });
702
+ default:
703
+ throw new FormifyError("UNEXPECTED", `selection ${selectionNode2.kind}`);
704
+ }
705
+ })
706
+ }
707
+ });
708
+ case "InlineFragment":
709
+ ensureUnionType(namedType);
710
+ if (isNodeField(namedType)) {
711
+ const parentType2 = getSelectedUnionType(namedType, selectionNode);
712
+ return formifyNode({
713
+ fieldOrInlineFragmentNode: selectionNode,
714
+ parentType: parentType2,
715
+ path
716
+ });
717
+ }
718
+ return __spreadProps(__spreadValues({}, selectionNode), {
719
+ selectionSet: {
720
+ kind: "SelectionSet",
721
+ selections: selectionNode.selectionSet.selections.map((subSelectionNode) => {
722
+ switch (subSelectionNode.kind) {
723
+ case "Field":
724
+ const parentType2 = getSelectedUnionType(namedType, selectionNode);
725
+ return formifyField({
726
+ fieldNode: subSelectionNode,
727
+ parentType: parentType2,
728
+ path
729
+ });
730
+ default:
731
+ throw new FormifyError("UNEXPECTED", `selection ${subSelectionNode.kind}`);
732
+ }
733
+ })
734
+ }
735
+ });
736
+ default:
737
+ throw new FormifyError("UNEXPECTED", `selection ${selectionNode.kind}`);
738
+ }
739
+ })
740
+ ]
741
+ }
742
+ });
743
+ };
744
+ const formifiedQuery = {
745
+ kind: "Document",
746
+ definitions: optimizedQuery.definitions.map((definition) => {
747
+ typeInfo.enter(definition);
748
+ ensureOperationDefinition(definition);
749
+ const type = typeInfo.getType();
750
+ const namedType = G__namespace.getNamedType(type);
751
+ ensureObjectType(namedType);
752
+ return __spreadProps(__spreadValues({}, definition), {
753
+ selectionSet: {
754
+ kind: "SelectionSet",
755
+ selections: definition.selectionSet.selections.map((selectionNode) => {
756
+ switch (selectionNode.kind) {
757
+ case "Field":
758
+ const parentType = type;
759
+ const namedParentType = G__namespace.getNamedType(parentType);
760
+ ensureObjectType(namedParentType);
761
+ const field = getObjectField(namedParentType, selectionNode);
762
+ const namedFieldType = G__namespace.getNamedType(field.type);
763
+ if (isNodeField(namedFieldType)) {
764
+ return formifyNode({
765
+ fieldOrInlineFragmentNode: selectionNode,
766
+ parentType: field.type,
767
+ path: [getNameAndAlias(selectionNode)]
768
+ });
769
+ } else if (isConnectionField(namedFieldType)) {
770
+ return formifyConnection({
771
+ namedFieldType,
772
+ selectionNode,
773
+ path: [getNameAndAlias(selectionNode)]
774
+ });
775
+ }
776
+ if (selectionNode.name.value === COLLECTION_FIELD_NAME || selectionNode.name.value === COLLECTIONS_FIELD_NAME) {
777
+ return __spreadProps(__spreadValues({}, selectionNode), {
778
+ selectionSet: {
779
+ kind: "SelectionSet",
780
+ selections: selectionNode.selectionSet.selections.map((selectionNode2) => {
781
+ switch (selectionNode2.kind) {
782
+ case "Field":
783
+ if (selectionNode2.name.value === COLLECTIONS_DOCUMENTS_NAME) {
784
+ ensureObjectType(namedFieldType);
785
+ const n = namedFieldType.getFields()[COLLECTIONS_DOCUMENTS_NAME];
786
+ const docType = G__namespace.getNamedType(n.type);
787
+ return formifyConnection({
788
+ namedFieldType: docType,
789
+ selectionNode: selectionNode2,
790
+ path: [getNameAndAlias(selectionNode2)]
791
+ });
792
+ }
793
+ return selectionNode2;
794
+ default:
795
+ throw new FormifyError("NOOP");
796
+ }
797
+ })
798
+ }
799
+ });
800
+ }
801
+ throw new FormifyError("NOOP");
802
+ default:
803
+ throw new FormifyError("UNEXPECTED");
804
+ }
805
+ })
806
+ }
807
+ });
808
+ })
809
+ };
810
+ nodes.map((node2) => {
811
+ const namePath = [];
812
+ const aliasPath = [];
813
+ node2.path.forEach((p) => {
814
+ namePath.push(p.name);
815
+ aliasPath.push(p.alias);
816
+ if (p.list) {
817
+ namePath.push("NUM");
818
+ aliasPath.push("NUM");
819
+ }
820
+ });
821
+ JSON.stringify({
822
+ namePath: namePath.join("."),
823
+ aliasPath: aliasPath.join(".")
824
+ }, null, 2);
825
+ });
826
+ return { formifiedQuery, nodes };
827
+ };
398
828
  const captureBranchName = /^refs\/heads\/(.*)/;
399
829
  const parseRefForBranchName = (ref) => {
400
830
  const matches = ref.match(captureBranchName);
@@ -435,13 +865,21 @@ mutation addPendingDocumentMutation(
435
865
  };
436
866
  this.getSchema = async () => {
437
867
  if (!this.schema) {
438
- const data = await this.request(graphql.getIntrospectionQuery(), {
868
+ const data = await this.request(G.getIntrospectionQuery(), {
439
869
  variables: {}
440
870
  });
441
- this.schema = graphql.buildClientSchema(data);
871
+ this.schema = G.buildClientSchema(data);
442
872
  }
443
873
  return this.schema;
444
874
  };
875
+ this.getOptimizedQuery = async (documentNode) => {
876
+ const data = await this.request(`query GetOptimizedQuery($queryString: String!) {
877
+ getOptimizedQuery(queryString: $queryString)
878
+ }`, {
879
+ variables: { queryString: G.print(documentNode) }
880
+ });
881
+ return G.parse(data.getOptimizedQuery);
882
+ };
445
883
  this.options = options;
446
884
  this.setBranch(options.branch);
447
885
  this.events.subscribe("branch:change", ({ branchName }) => {
@@ -501,10 +939,23 @@ mutation addPendingDocumentMutation(
501
939
  this.contentApiBase = ((_c = this.options.tinaioConfig) == null ? void 0 : _c.contentApiUrlOverride) || `https://content.tinajs.io`;
502
940
  this.contentApiUrl = this.options.customContentApiUrl || `${this.contentApiBase}/content/${this.options.clientId}/github/${encodedBranch}`;
503
941
  }
504
- async requestWithForm(query, { variables }) {
942
+ async requestWithForm(query, {
943
+ variables,
944
+ useUnstableFormify
945
+ }) {
505
946
  const schema = await this.getSchema();
506
- const formifiedQuery = formify(query(gql__default["default"]), schema);
507
- return this.request(graphql.print(formifiedQuery), { variables });
947
+ let formifiedQuery;
948
+ if (useUnstableFormify) {
949
+ const res = await formify({
950
+ schema,
951
+ query: G.print(query(gql__default["default"])),
952
+ getOptimizedQuery: this.getOptimizedQuery
953
+ });
954
+ formifiedQuery = res.formifiedQuery;
955
+ } else {
956
+ formifiedQuery = formify$1(query(gql__default["default"]), schema);
957
+ }
958
+ return this.request(G.print(formifiedQuery), { variables });
508
959
  }
509
960
  async request(query, { variables }) {
510
961
  const res = await fetch(this.contentApiUrl, {
@@ -514,7 +965,7 @@ mutation addPendingDocumentMutation(
514
965
  Authorization: "Bearer " + (await this.getToken()).id_token
515
966
  },
516
967
  body: JSON.stringify({
517
- query: typeof query === "function" ? graphql.print(query(gql__default["default"])) : query,
968
+ query: typeof query === "function" ? G.print(query(gql__default["default"])) : query,
518
969
  variables
519
970
  })
520
971
  });
@@ -539,7 +990,7 @@ mutation addPendingDocumentMutation(
539
990
  async getRefreshedToken(tokens) {
540
991
  const { access_token, id_token, refresh_token } = JSON.parse(tokens);
541
992
  const { exp, iss, client_id } = this.parseJwt(access_token);
542
- if (Date.now() / 1e3 >= exp) {
993
+ if (Date.now() / 1e3 >= exp - 120) {
543
994
  const refreshResponse = await fetch(iss, {
544
995
  method: "POST",
545
996
  headers: {
@@ -897,6 +1348,9 @@ mutation addPendingDocumentMutation(
897
1348
  if (!cms.api.tina) {
898
1349
  cms.registerApi("tina", createClient(props));
899
1350
  }
1351
+ if (!cms.api.admin) {
1352
+ cms.registerApi("admin", new TinaAdminApi(cms));
1353
+ }
900
1354
  const setupMedia = async () => {
901
1355
  var _a;
902
1356
  if (props.mediaStore) {
@@ -921,11 +1375,6 @@ mutation addPendingDocumentMutation(
921
1375
  return newBranch;
922
1376
  };
923
1377
  setupMedia();
924
- React__default["default"].useMemo(() => {
925
- if (cms.flags.get("tina-admin") === true) {
926
- cms.registerApi("admin", new TinaAdminApi(cms));
927
- }
928
- }, [cms, cms.flags.get("tina-admin")]);
929
1378
  const [branchingEnabled, setBranchingEnabled] = React__default["default"].useState(() => cms.flags.get("branch-switcher"));
930
1379
  React__default["default"].useEffect(() => {
931
1380
  cms.events.subscribe("flag:set", ({ key, value }) => {
@@ -1034,7 +1483,8 @@ mutation addPendingDocumentMutation(
1034
1483
  const formIds = [];
1035
1484
  setIsLoading(true);
1036
1485
  cms.api.tina.requestWithForm((gql2) => gql2(query), {
1037
- variables
1486
+ variables,
1487
+ useUnstableFormify: cms.flags.get("use-unstable-formify")
1038
1488
  }).then((payload) => {
1039
1489
  cms.plugins.remove(new toolkit.FormMetaPlugin({ name: "tina-admin-link" }));
1040
1490
  setData(payload);
@@ -1405,1330 +1855,7 @@ mutation addPendingDocumentMutation(
1405
1855
  };
1406
1856
  }, [plugin]);
1407
1857
  };
1408
- var styles = `/**
1409
- Use a better box model (opinionated).
1410
- */
1411
-
1412
- .tina-tailwind *,
1413
- .tina-tailwind ::before,
1414
- .tina-tailwind ::after {
1415
- box-sizing: border-box;
1416
- }
1417
-
1418
- /**
1419
- Use a more readable tab size (opinionated).
1420
- */
1421
-
1422
- .tina-tailwind html {
1423
- -moz-tab-size: 4;
1424
- tab-size: 4;
1425
- }
1426
-
1427
- /**
1428
- 1. Correct the line height in all browsers.
1429
- 2. Prevent adjustments of font size after orientation changes in iOS.
1430
- */
1431
-
1432
- .tina-tailwind html {
1433
- line-height: 1.15; /* 1 */
1434
- -webkit-text-size-adjust: 100%; /* 2 */
1435
- }
1436
-
1437
- /**
1438
- Remove the margin in all browsers.
1439
- */
1440
-
1441
- .tina-tailwind body {
1442
- margin: 0;
1443
- }
1444
-
1445
- /**
1446
- Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)
1447
- */
1448
-
1449
- .tina-tailwind body {
1450
- font-family:
1451
- system-ui,
1452
- -apple-system, /* Firefox supports this but not yet \`system-ui\` */
1453
- 'Segoe UI',
1454
- Roboto,
1455
- Helvetica,
1456
- Arial,
1457
- sans-serif,
1458
- 'Apple Color Emoji',
1459
- 'Segoe UI Emoji';
1460
- }
1461
-
1462
- /**
1463
- 1. Add the correct height in Firefox.
1464
- 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
1465
- */
1466
-
1467
- .tina-tailwind hr {
1468
- height: 0; /* 1 */
1469
- color: inherit; /* 2 */
1470
- }
1471
-
1472
- /**
1473
- Add the correct text decoration in Chrome, Edge, and Safari.
1474
- */
1475
-
1476
- .tina-tailwind abbr[title] {
1477
- text-decoration: underline dotted;
1478
- }
1479
-
1480
- /**
1481
- Add the correct font weight in Edge and Safari.
1482
- */
1483
-
1484
- .tina-tailwind b,
1485
- .tina-tailwind strong {
1486
- font-weight: bolder;
1487
- }
1488
-
1489
- /**
1490
- 1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)
1491
- 2. Correct the odd 'em' font sizing in all browsers.
1492
- */
1493
-
1494
- .tina-tailwind code,
1495
- .tina-tailwind kbd,
1496
- .tina-tailwind samp,
1497
- .tina-tailwind pre {
1498
- font-family:
1499
- ui-monospace,
1500
- SFMono-Regular,
1501
- Consolas,
1502
- 'Liberation Mono',
1503
- Menlo,
1504
- monospace; /* 1 */
1505
- font-size: 1em; /* 2 */
1506
- }
1507
-
1508
- /**
1509
- Add the correct font size in all browsers.
1510
- */
1511
-
1512
- .tina-tailwind small {
1513
- font-size: 80%;
1514
- }
1515
-
1516
- /**
1517
- Prevent 'sub' and 'sup' elements from affecting the line height in all browsers.
1518
- */
1519
-
1520
- .tina-tailwind sub,
1521
- .tina-tailwind sup {
1522
- font-size: 75%;
1523
- line-height: 0;
1524
- position: relative;
1525
- vertical-align: baseline;
1526
- }
1527
-
1528
- /*
1529
- Text-level semantics
1530
- ====================
1531
- */
1532
-
1533
- .tina-tailwind sub {
1534
- bottom: -0.25em;
1535
- }
1536
-
1537
- /*
1538
- Grouping content
1539
- ================
1540
- */
1541
-
1542
- .tina-tailwind sup {
1543
- top: -0.5em;
1544
- }
1545
-
1546
- /**
1547
- 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
1548
- 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
1549
- */
1550
-
1551
- .tina-tailwind table {
1552
- text-indent: 0; /* 1 */
1553
- border-color: inherit; /* 2 */
1554
- }
1555
-
1556
- /**
1557
- 1. Change the font styles in all browsers.
1558
- 2. Remove the margin in Firefox and Safari.
1559
- */
1560
-
1561
- .tina-tailwind button,
1562
- .tina-tailwind input,
1563
- .tina-tailwind optgroup,
1564
- .tina-tailwind select,
1565
- .tina-tailwind textarea {
1566
- font-family: inherit; /* 1 */
1567
- font-size: 100%; /* 1 */
1568
- line-height: 1.15; /* 1 */
1569
- margin: 0; /* 2 */
1570
- }
1571
-
1572
- /**
1573
- Remove the inheritance of text transform in Edge and Firefox.
1574
- 1. Remove the inheritance of text transform in Firefox.
1575
- */
1576
-
1577
- .tina-tailwind button,
1578
- .tina-tailwind select { /* 1 */
1579
- text-transform: none;
1580
- }
1581
-
1582
- /**
1583
- Correct the inability to style clickable types in iOS and Safari.
1584
- */
1585
-
1586
- .tina-tailwind button,
1587
- .tina-tailwind [type='button'],
1588
- .tina-tailwind [type='reset'],
1589
- .tina-tailwind [type='submit'] {
1590
- -webkit-appearance: button;
1591
- }
1592
-
1593
- /**
1594
- Remove the inner border and padding in Firefox.
1595
- */
1596
-
1597
- .tina-tailwind ::-moz-focus-inner {
1598
- border-style: none;
1599
- padding: 0;
1600
- }
1601
-
1602
- /**
1603
- Restore the focus styles unset by the previous rule.
1604
- */
1605
-
1606
- .tina-tailwind :-moz-focusring {
1607
- outline: 1px dotted ButtonText;
1608
- }
1609
-
1610
- /**
1611
- Remove the additional ':invalid' styles in Firefox.
1612
- See: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737
1613
- */
1614
-
1615
- .tina-tailwind :-moz-ui-invalid {
1616
- box-shadow: none;
1617
- }
1618
-
1619
- /**
1620
- Remove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.
1621
- */
1622
-
1623
- .tina-tailwind legend {
1624
- padding: 0;
1625
- }
1626
-
1627
- /**
1628
- Add the correct vertical alignment in Chrome and Firefox.
1629
- */
1630
-
1631
- .tina-tailwind progress {
1632
- vertical-align: baseline;
1633
- }
1634
-
1635
- /**
1636
- Correct the cursor style of increment and decrement buttons in Safari.
1637
- */
1638
-
1639
- .tina-tailwind ::-webkit-inner-spin-button,
1640
- .tina-tailwind ::-webkit-outer-spin-button {
1641
- height: auto;
1642
- }
1643
-
1644
- /**
1645
- 1. Correct the odd appearance in Chrome and Safari.
1646
- 2. Correct the outline style in Safari.
1647
- */
1648
-
1649
- .tina-tailwind [type='search'] {
1650
- -webkit-appearance: textfield; /* 1 */
1651
- outline-offset: -2px; /* 2 */
1652
- }
1653
-
1654
- /**
1655
- Remove the inner padding in Chrome and Safari on macOS.
1656
- */
1657
-
1658
- .tina-tailwind ::-webkit-search-decoration {
1659
- -webkit-appearance: none;
1660
- }
1661
-
1662
- /**
1663
- 1. Correct the inability to style clickable types in iOS and Safari.
1664
- 2. Change font properties to 'inherit' in Safari.
1665
- */
1666
-
1667
- .tina-tailwind ::-webkit-file-upload-button {
1668
- -webkit-appearance: button; /* 1 */
1669
- font: inherit; /* 2 */
1670
- }
1671
-
1672
- /*
1673
- Add the correct display in Chrome and Safari.
1674
- */
1675
-
1676
- .tina-tailwind summary {
1677
- display: list-item;
1678
- }
1679
-
1680
- /**
1681
- * Removes the default spacing and border for appropriate elements.
1682
- */
1683
-
1684
- .tina-tailwind blockquote,
1685
- .tina-tailwind dl,
1686
- .tina-tailwind dd,
1687
- .tina-tailwind h1,
1688
- .tina-tailwind h2,
1689
- .tina-tailwind h3,
1690
- .tina-tailwind h4,
1691
- .tina-tailwind h5,
1692
- .tina-tailwind h6,
1693
- .tina-tailwind hr,
1694
- .tina-tailwind figure,
1695
- .tina-tailwind p,
1696
- .tina-tailwind pre {
1697
- margin: 0;
1698
- }
1699
-
1700
- /**
1701
- * Manually forked from SUIT CSS Base: https://github.com/suitcss/base
1702
- * A thin layer on top of normalize.css that provides a starting point more
1703
- * suitable for web applications.
1704
- */
1705
-
1706
- .tina-tailwind button {
1707
- background-color: transparent;
1708
- background-image: none;
1709
- }
1710
-
1711
- /*
1712
- Interactive
1713
- ===========
1714
- */
1715
-
1716
- .tina-tailwind fieldset {
1717
- margin: 0;
1718
- padding: 0;
1719
- }
1720
-
1721
- /*
1722
- Forms
1723
- =====
1724
- */
1725
-
1726
- .tina-tailwind ol,
1727
- .tina-tailwind ul {
1728
- list-style: none;
1729
- margin: 0;
1730
- padding: 0;
1731
- }
1732
-
1733
- /**
1734
- * 1. Use the user's configured \`sans\` font-family (with Tailwind's default
1735
- * sans-serif font stack as a fallback) as a sane default.
1736
- * 2. Use Tailwind's default "normal" line-height so the user isn't forced
1737
- * to override it to ensure consistency even when using the default theme.
1738
- */
1739
-
1740
- .tina-tailwind html {
1741
- 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"; /* 1 */
1742
- line-height: 1.5; /* 2 */
1743
- }
1744
-
1745
- /**
1746
- * Inherit font-family and line-height from \`html\` so users can set them as
1747
- * a class directly on the \`html\` element.
1748
- */
1749
-
1750
- .tina-tailwind body {
1751
- font-family: inherit;
1752
- line-height: inherit;
1753
- }
1754
-
1755
- /**
1756
- * 1. Prevent padding and border from affecting element width.
1757
- *
1758
- * We used to set this in the html element and inherit from
1759
- * the parent element for everything else. This caused issues
1760
- * in shadow-dom-enhanced elements like <details> where the content
1761
- * is wrapped by a div with box-sizing set to \`content-box\`.
1762
- *
1763
- * https://github.com/mozdevs/cssremedy/issues/4
1764
- *
1765
- *
1766
- * 2. Allow adding a border to an element by just adding a border-width.
1767
- *
1768
- * By default, the way the browser specifies that an element should have no
1769
- * border is by setting it's border-style to \`none\` in the user-agent
1770
- * stylesheet.
1771
- *
1772
- * In order to easily add borders to elements by just setting the \`border-width\`
1773
- * property, we change the default border-style for all elements to \`solid\`, and
1774
- * use border-width to hide them instead. This way our \`border\` utilities only
1775
- * need to set the \`border-width\` property instead of the entire \`border\`
1776
- * shorthand, making our border utilities much more straightforward to compose.
1777
- *
1778
- * https://github.com/tailwindcss/tailwindcss/pull/116
1779
- */
1780
-
1781
- .tina-tailwind *,
1782
- .tina-tailwind ::before,
1783
- .tina-tailwind ::after {
1784
- box-sizing: border-box; /* 1 */
1785
- border-width: 0; /* 2 */
1786
- border-style: solid; /* 2 */
1787
- border-color: currentColor; /* 2 */
1788
- }
1789
-
1790
- /*
1791
- * Ensure horizontal rules are visible by default
1792
- */
1793
-
1794
- .tina-tailwind hr {
1795
- border-top-width: 1px;
1796
- }
1797
-
1798
- /**
1799
- * Undo the \`border-style: none\` reset that Normalize applies to images so that
1800
- * our \`border-{width}\` utilities have the expected effect.
1801
- *
1802
- * The Normalize reset is unnecessary for us since we default the border-width
1803
- * to 0 on all elements.
1804
- *
1805
- * https://github.com/tailwindcss/tailwindcss/issues/362
1806
- */
1807
-
1808
- .tina-tailwind img {
1809
- border-style: solid;
1810
- }
1811
-
1812
- /**
1813
- * Tailwind custom reset styles
1814
- */
1815
-
1816
- .tina-tailwind textarea {
1817
- resize: vertical;
1818
- }
1819
-
1820
- /*
1821
- Tabular data
1822
- ============
1823
- */
1824
-
1825
- .tina-tailwind input::placeholder,
1826
- .tina-tailwind textarea::placeholder {
1827
- opacity: 1;
1828
- color: #918c9e;
1829
- }
1830
-
1831
- /*
1832
- Sections
1833
- ========
1834
- */
1835
-
1836
- .tina-tailwind button,
1837
- .tina-tailwind [role="button"] {
1838
- cursor: pointer;
1839
- }
1840
-
1841
- /**
1842
- * Override legacy focus reset from Normalize with modern Firefox focus styles.
1843
- *
1844
- * This is actually an improvement over the new defaults in Firefox in our testing,
1845
- * as it triggers the better focus styles even for links, which still use a dotted
1846
- * outline in Firefox by default.
1847
- */
1848
-
1849
- .tina-tailwind :-moz-focusring {
1850
- outline: auto;
1851
- }
1852
-
1853
- /*
1854
- Document
1855
- ========
1856
- */
1857
-
1858
- .tina-tailwind table {
1859
- border-collapse: collapse;
1860
- }
1861
-
1862
- /*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
1863
-
1864
- .tina-tailwind h1,
1865
- .tina-tailwind h2,
1866
- .tina-tailwind h3,
1867
- .tina-tailwind h4,
1868
- .tina-tailwind h5,
1869
- .tina-tailwind h6 {
1870
- font-size: inherit;
1871
- font-weight: inherit;
1872
- }
1873
-
1874
- /**
1875
- * Reset links to optimize for opt-in styling instead of
1876
- * opt-out.
1877
- */
1878
-
1879
- .tina-tailwind a {
1880
- color: inherit;
1881
- text-decoration: inherit;
1882
- }
1883
-
1884
- /**
1885
- * Reset form element properties that are easy to forget to
1886
- * style explicitly so you don't inadvertently introduce
1887
- * styles that deviate from your design system. These styles
1888
- * supplement a partial reset that is already applied by
1889
- * normalize.css.
1890
- */
1891
-
1892
- .tina-tailwind button,
1893
- .tina-tailwind input,
1894
- .tina-tailwind optgroup,
1895
- .tina-tailwind select,
1896
- .tina-tailwind textarea {
1897
- padding: 0;
1898
- line-height: inherit;
1899
- color: inherit;
1900
- }
1901
-
1902
- /**
1903
- * Use the configured 'mono' font family for elements that
1904
- * are expected to be rendered with a monospace font, falling
1905
- * back to the system monospace stack if there is no configured
1906
- * 'mono' font family.
1907
- */
1908
-
1909
- .tina-tailwind pre,
1910
- .tina-tailwind code,
1911
- .tina-tailwind kbd,
1912
- .tina-tailwind samp {
1913
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
1914
- }
1915
-
1916
- /**
1917
- * 1. Make replaced elements \`display: block\` by default as that's
1918
- * the behavior you want almost all of the time. Inspired by
1919
- * CSS Remedy, with \`svg\` added as well.
1920
- *
1921
- * https://github.com/mozdevs/cssremedy/issues/14
1922
- *
1923
- * 2. Add \`vertical-align: middle\` to align replaced elements more
1924
- * sensibly by default when overriding \`display\` by adding a
1925
- * utility like \`inline\`.
1926
- *
1927
- * This can trigger a poorly considered linting error in some
1928
- * tools but is included by design.
1929
- *
1930
- * https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210
1931
- */
1932
-
1933
- .tina-tailwind img,
1934
- .tina-tailwind svg,
1935
- .tina-tailwind video,
1936
- .tina-tailwind canvas,
1937
- .tina-tailwind audio,
1938
- .tina-tailwind iframe,
1939
- .tina-tailwind embed,
1940
- .tina-tailwind object {
1941
- display: block; /* 1 */
1942
- vertical-align: middle; /* 2 */
1943
- }
1944
-
1945
- /**
1946
- * Constrain images and videos to the parent width and preserve
1947
- * their intrinsic aspect ratio.
1948
- *
1949
- * https://github.com/mozdevs/cssremedy/issues/14
1950
- */
1951
-
1952
- .tina-tailwind img,
1953
- .tina-tailwind video {
1954
- max-width: 100%;
1955
- height: auto;
1956
- }
1957
-
1958
- /**
1959
- * Ensure the default browser behavior of the \`hidden\` attribute.
1960
- */
1961
-
1962
- .tina-tailwind [hidden] {
1963
- display: none;
1964
- }
1965
-
1966
- /*! tailwindcss v2.2.19 | MIT License | https://tailwindcss.com
1967
- */
1968
-
1969
- .tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {
1970
- --tw-translate-x: 0;
1971
- --tw-translate-y: 0;
1972
- --tw-rotate: 0;
1973
- --tw-skew-x: 0;
1974
- --tw-skew-y: 0;
1975
- --tw-scale-x: 1;
1976
- --tw-scale-y: 1;
1977
- --tw-transform: translateX(var(--tw-translate-x)) translateY(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));
1978
- }
1979
-
1980
- .tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {
1981
- --tw-border-opacity: 1;
1982
- border-color: rgba(225, 221, 236, var(--tw-border-opacity));
1983
- }
1984
-
1985
- .tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {
1986
- --tw-ring-offset-shadow: 0 0 #0000;
1987
- --tw-ring-shadow: 0 0 #0000;
1988
- --tw-shadow: 0 0 #0000;
1989
- }
1990
-
1991
- .tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {
1992
- --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
1993
- --tw-ring-offset-width: 0px;
1994
- --tw-ring-offset-color: #fff;
1995
- --tw-ring-color: rgba(0, 132, 255, 0.5);
1996
- --tw-ring-offset-shadow: 0 0 #0000;
1997
- --tw-ring-shadow: 0 0 #0000;
1998
- --tw-shadow: 0 0 #0000;
1999
- }
2000
-
2001
- .tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {
2002
- --tw-blur: var(--tw-empty,/*!*/ /*!*/);
2003
- --tw-brightness: var(--tw-empty,/*!*/ /*!*/);
2004
- --tw-contrast: var(--tw-empty,/*!*/ /*!*/);
2005
- --tw-grayscale: var(--tw-empty,/*!*/ /*!*/);
2006
- --tw-hue-rotate: var(--tw-empty,/*!*/ /*!*/);
2007
- --tw-invert: var(--tw-empty,/*!*/ /*!*/);
2008
- --tw-saturate: var(--tw-empty,/*!*/ /*!*/);
2009
- --tw-sepia: var(--tw-empty,/*!*/ /*!*/);
2010
- --tw-drop-shadow: var(--tw-empty,/*!*/ /*!*/);
2011
- --tw-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);
2012
- }
2013
-
2014
- .tina-tailwind .static {
2015
- position: static !important;
2016
- }
2017
-
2018
- .tina-tailwind .fixed {
2019
- position: fixed !important;
2020
- }
2021
-
2022
- .tina-tailwind .absolute {
2023
- position: absolute !important;
2024
- }
2025
-
2026
- .tina-tailwind .relative {
2027
- position: relative !important;
2028
- }
2029
-
2030
- .tina-tailwind .left-0 {
2031
- left: 0px !important;
2032
- }
2033
-
2034
- .tina-tailwind .right-0 {
2035
- right: 0px !important;
2036
- }
2037
-
2038
- .tina-tailwind .bottom-2 {
2039
- bottom: 8px !important;
2040
- }
2041
-
2042
- .tina-tailwind .right-5 {
2043
- right: 20px !important;
2044
- }
2045
-
2046
- .tina-tailwind .z-50 {
2047
- z-index: 50 !important;
2048
- }
2049
-
2050
- .tina-tailwind .mx-auto {
2051
- margin-left: auto !important;
2052
- margin-right: auto !important;
2053
- }
2054
-
2055
- .tina-tailwind .mr-2 {
2056
- margin-right: 8px !important;
2057
- }
2058
-
2059
- .tina-tailwind .mb-2 {
2060
- margin-bottom: 8px !important;
2061
- }
2062
-
2063
- .tina-tailwind .mb-1 {
2064
- margin-bottom: 4px !important;
2065
- }
2066
-
2067
- .tina-tailwind .-mt-0\\.5 {
2068
- margin-top: -2px !important;
2069
- }
2070
-
2071
- .tina-tailwind .-mt-0 {
2072
- margin-top: 0px !important;
2073
- }
2074
-
2075
- .tina-tailwind .ml-1 {
2076
- margin-left: 4px !important;
2077
- }
2078
-
2079
- .tina-tailwind .mt-2 {
2080
- margin-top: 8px !important;
2081
- }
2082
-
2083
- .tina-tailwind .mr-1\\.5 {
2084
- margin-right: 6px !important;
2085
- }
2086
-
2087
- .tina-tailwind .mr-1 {
2088
- margin-right: 4px !important;
2089
- }
2090
-
2091
- .tina-tailwind .block {
2092
- display: block !important;
2093
- }
2094
-
2095
- .tina-tailwind .inline-block {
2096
- display: inline-block !important;
2097
- }
2098
-
2099
- .tina-tailwind .flex {
2100
- display: flex !important;
2101
- }
2102
-
2103
- .tina-tailwind .inline-flex {
2104
- display: inline-flex !important;
2105
- }
2106
-
2107
- .tina-tailwind .table {
2108
- display: table !important;
2109
- }
2110
-
2111
- .tina-tailwind .h-screen {
2112
- height: 100vh !important;
2113
- }
2114
-
2115
- .tina-tailwind .h-auto {
2116
- height: auto !important;
2117
- }
2118
-
2119
- .tina-tailwind .h-full {
2120
- height: 100% !important;
2121
- }
2122
-
2123
- .tina-tailwind .h-6 {
2124
- height: 24px !important;
2125
- }
2126
-
2127
- .tina-tailwind .h-10 {
2128
- height: 40px !important;
2129
- }
2130
-
2131
- .tina-tailwind .h-5 {
2132
- height: 20px !important;
2133
- }
2134
-
2135
- .tina-tailwind .w-full {
2136
- width: 100% !important;
2137
- }
2138
-
2139
- .tina-tailwind .w-10 {
2140
- width: 40px !important;
2141
- }
2142
-
2143
- .tina-tailwind .w-auto {
2144
- width: auto !important;
2145
- }
2146
-
2147
- .tina-tailwind .w-5 {
2148
- width: 20px !important;
2149
- }
2150
-
2151
- .tina-tailwind .w-56 {
2152
- width: 224px !important;
2153
- }
2154
-
2155
- .tina-tailwind .w-0 {
2156
- width: 0px !important;
2157
- }
2158
-
2159
- .tina-tailwind .w-6 {
2160
- width: 24px !important;
2161
- }
2162
-
2163
- .tina-tailwind .max-w-lg {
2164
- max-width: 32rem !important;
2165
- }
2166
-
2167
- .tina-tailwind .max-w-screen-xl {
2168
- max-width: 1280px !important;
2169
- }
2170
-
2171
- .tina-tailwind .max-w-form {
2172
- max-width: 900px !important;
2173
- }
2174
-
2175
- .tina-tailwind .max-w-full {
2176
- max-width: 100% !important;
2177
- }
2178
-
2179
- .tina-tailwind .flex-1 {
2180
- flex: 1 1 0% !important;
2181
- }
2182
-
2183
- .tina-tailwind .table-auto {
2184
- table-layout: auto !important;
2185
- }
2186
-
2187
- .tina-tailwind .origin-top-right {
2188
- transform-origin: top right !important;
2189
- }
2190
-
2191
- .tina-tailwind .translate-y-full {
2192
- --tw-translate-y: 100% !important;
2193
- transform: var(--tw-transform) !important;
2194
- }
2195
-
2196
- .tina-tailwind .-translate-y-2 {
2197
- --tw-translate-y: -8px !important;
2198
- transform: var(--tw-transform) !important;
2199
- }
2200
-
2201
- .tina-tailwind .translate-y-0 {
2202
- --tw-translate-y: 0px !important;
2203
- transform: var(--tw-transform) !important;
2204
- }
2205
-
2206
- .tina-tailwind .scale-95 {
2207
- --tw-scale-x: .95 !important;
2208
- --tw-scale-y: .95 !important;
2209
- transform: var(--tw-transform) !important;
2210
- }
2211
-
2212
- .tina-tailwind .scale-100 {
2213
- --tw-scale-x: 1 !important;
2214
- --tw-scale-y: 1 !important;
2215
- transform: var(--tw-transform) !important;
2216
- }
2217
-
2218
- .tina-tailwind .transform {
2219
- transform: var(--tw-transform) !important;
2220
- }
2221
-
2222
- .tina-tailwind .flex-col {
2223
- flex-direction: column !important;
2224
- }
2225
-
2226
- .tina-tailwind .items-end {
2227
- align-items: flex-end !important;
2228
- }
2229
-
2230
- .tina-tailwind .items-center {
2231
- align-items: center !important;
2232
- }
2233
-
2234
- .tina-tailwind .items-stretch {
2235
- align-items: stretch !important;
2236
- }
2237
-
2238
- .tina-tailwind .justify-center {
2239
- justify-content: center !important;
2240
- }
2241
-
2242
- .tina-tailwind .justify-between {
2243
- justify-content: space-between !important;
2244
- }
2245
-
2246
- .tina-tailwind .gap-0\\.5 {
2247
- gap: 2px !important;
2248
- }
2249
-
2250
- .tina-tailwind .gap-0 {
2251
- gap: 0px !important;
2252
- }
2253
-
2254
- .tina-tailwind .gap-4 {
2255
- gap: 16px !important;
2256
- }
2257
-
2258
- .tina-tailwind .gap-3 {
2259
- gap: 12px !important;
2260
- }
2261
-
2262
- .tina-tailwind .divide-y > :not([hidden]) ~ :not([hidden]) {
2263
- --tw-divide-y-reverse: 0 !important;
2264
- border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse))) !important;
2265
- border-bottom-width: calc(1px * var(--tw-divide-y-reverse)) !important;
2266
- }
2267
-
2268
- .tina-tailwind .overflow-hidden {
2269
- overflow: hidden !important;
2270
- }
2271
-
2272
- .tina-tailwind .overflow-y-auto {
2273
- overflow-y: auto !important;
2274
- }
2275
-
2276
- .tina-tailwind .whitespace-nowrap {
2277
- white-space: nowrap !important;
2278
- }
2279
-
2280
- .tina-tailwind .rounded-lg {
2281
- border-radius: 8px !important;
2282
- }
2283
-
2284
- .tina-tailwind .rounded-full {
2285
- border-radius: 9999px !important;
2286
- }
2287
-
2288
- .tina-tailwind .rounded-md {
2289
- border-radius: 6px !important;
2290
- }
2291
-
2292
- .tina-tailwind .border {
2293
- border-width: 1px !important;
2294
- }
2295
-
2296
- .tina-tailwind .border-b {
2297
- border-bottom-width: 1px !important;
2298
- }
2299
-
2300
- .tina-tailwind .border-gray-200 {
2301
- --tw-border-opacity: 1 !important;
2302
- border-color: rgba(225, 221, 236, var(--tw-border-opacity)) !important;
2303
- }
2304
-
2305
- .tina-tailwind .border-transparent {
2306
- border-color: transparent !important;
2307
- }
2308
-
2309
- .tina-tailwind .bg-white {
2310
- --tw-bg-opacity: 1 !important;
2311
- background-color: rgba(255, 255, 255, var(--tw-bg-opacity)) !important;
2312
- }
2313
-
2314
- .tina-tailwind .bg-gray-50 {
2315
- --tw-bg-opacity: 1 !important;
2316
- background-color: rgba(246, 246, 249, var(--tw-bg-opacity)) !important;
2317
- }
2318
-
2319
- .tina-tailwind .bg-blue-500 {
2320
- --tw-bg-opacity: 1 !important;
2321
- background-color: rgba(0, 132, 255, var(--tw-bg-opacity)) !important;
2322
- }
2323
-
2324
- .tina-tailwind .bg-gradient-to-b {
2325
- background-image: linear-gradient(to bottom, var(--tw-gradient-stops)) !important;
2326
- }
2327
-
2328
- .tina-tailwind .from-blue-900 {
2329
- --tw-gradient-from: #1D2C6C !important;
2330
- --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(29, 44, 108, 0)) !important;
2331
- }
2332
-
2333
- .tina-tailwind .to-gray-900 {
2334
- --tw-gradient-to: #252336 !important;
2335
- }
2336
-
2337
- .tina-tailwind .px-4 {
2338
- padding-left: 16px !important;
2339
- padding-right: 16px !important;
2340
- }
2341
-
2342
- .tina-tailwind .py-6 {
2343
- padding-top: 24px !important;
2344
- padding-bottom: 24px !important;
2345
- }
2346
-
2347
- .tina-tailwind .px-5 {
2348
- padding-left: 20px !important;
2349
- padding-right: 20px !important;
2350
- }
2351
-
2352
- .tina-tailwind .py-4 {
2353
- padding-top: 16px !important;
2354
- padding-bottom: 16px !important;
2355
- }
2356
-
2357
- .tina-tailwind .px-12 {
2358
- padding-left: 48px !important;
2359
- padding-right: 48px !important;
2360
- }
2361
-
2362
- .tina-tailwind .py-10 {
2363
- padding-top: 40px !important;
2364
- padding-bottom: 40px !important;
2365
- }
2366
-
2367
- .tina-tailwind .px-20 {
2368
- padding-left: 80px !important;
2369
- padding-right: 80px !important;
2370
- }
2371
-
2372
- .tina-tailwind .px-6 {
2373
- padding-left: 24px !important;
2374
- padding-right: 24px !important;
2375
- }
2376
-
2377
- .tina-tailwind .py-1 {
2378
- padding-top: 4px !important;
2379
- padding-bottom: 4px !important;
2380
- }
2381
-
2382
- .tina-tailwind .py-2 {
2383
- padding-top: 8px !important;
2384
- padding-bottom: 8px !important;
2385
- }
2386
-
2387
- .tina-tailwind .py-3 {
2388
- padding-top: 12px !important;
2389
- padding-bottom: 12px !important;
2390
- }
2391
-
2392
- .tina-tailwind .px-8 {
2393
- padding-left: 32px !important;
2394
- padding-right: 32px !important;
2395
- }
2396
-
2397
- .tina-tailwind .pb-4 {
2398
- padding-bottom: 16px !important;
2399
- }
2400
-
2401
- .tina-tailwind .pt-18 {
2402
- padding-top: 72px !important;
2403
- }
2404
-
2405
- .tina-tailwind .text-left {
2406
- text-align: left !important;
2407
- }
2408
-
2409
- .tina-tailwind .text-center {
2410
- text-align: center !important;
2411
- }
2412
-
2413
- .tina-tailwind .font-sans {
2414
- 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" !important;
2415
- }
2416
-
2417
- .tina-tailwind .text-2xl {
2418
- font-size: 24px !important;
2419
- line-height: 1.33 !important;
2420
- }
2421
-
2422
- .tina-tailwind .text-base {
2423
- font-size: 16px !important;
2424
- line-height: 1.5 !important;
2425
- }
2426
-
2427
- .tina-tailwind .text-sm {
2428
- font-size: 14px !important;
2429
- line-height: 1.43 !important;
2430
- }
2431
-
2432
- .tina-tailwind .text-xl {
2433
- font-size: 20px !important;
2434
- line-height: 1.4 !important;
2435
- }
2436
-
2437
- .tina-tailwind .text-md {
2438
- font-size: 16px !important;
2439
- line-height: 1.5 !important;
2440
- }
2441
-
2442
- .tina-tailwind .text-xs {
2443
- font-size: 13px !important;
2444
- line-height: 1.33 !important;
2445
- }
2446
-
2447
- .tina-tailwind .font-medium {
2448
- font-weight: 500 !important;
2449
- }
2450
-
2451
- .tina-tailwind .uppercase {
2452
- text-transform: uppercase !important;
2453
- }
2454
-
2455
- .tina-tailwind .italic {
2456
- font-style: italic !important;
2457
- }
2458
-
2459
- .tina-tailwind .leading-normal {
2460
- line-height: 1.5 !important;
2461
- }
2462
-
2463
- .tina-tailwind .leading-tight {
2464
- line-height: 1.25 !important;
2465
- }
2466
-
2467
- .tina-tailwind .leading-5 {
2468
- line-height: 20px !important;
2469
- }
2470
-
2471
- .tina-tailwind .leading-4 {
2472
- line-height: 16px !important;
2473
- }
2474
-
2475
- .tina-tailwind .tracking-wide {
2476
- letter-spacing: 0.025em !important;
2477
- }
2478
-
2479
- .tina-tailwind .text-gray-700 {
2480
- --tw-text-opacity: 1 !important;
2481
- color: rgba(67, 62, 82, var(--tw-text-opacity)) !important;
2482
- }
2483
-
2484
- .tina-tailwind .text-blue-600 {
2485
- --tw-text-opacity: 1 !important;
2486
- color: rgba(5, 116, 228, var(--tw-text-opacity)) !important;
2487
- }
2488
-
2489
- .tina-tailwind .text-gray-500 {
2490
- --tw-text-opacity: 1 !important;
2491
- color: rgba(113, 108, 127, var(--tw-text-opacity)) !important;
2492
- }
2493
-
2494
- .tina-tailwind .text-gray-400 {
2495
- --tw-text-opacity: 1 !important;
2496
- color: rgba(145, 140, 158, var(--tw-text-opacity)) !important;
2497
- }
2498
-
2499
- .tina-tailwind .text-current {
2500
- color: currentColor !important;
2501
- }
2502
-
2503
- .tina-tailwind .text-white {
2504
- --tw-text-opacity: 1 !important;
2505
- color: rgba(255, 255, 255, var(--tw-text-opacity)) !important;
2506
- }
2507
-
2508
- .tina-tailwind .text-gray-600 {
2509
- --tw-text-opacity: 1 !important;
2510
- color: rgba(86, 81, 101, var(--tw-text-opacity)) !important;
2511
- }
2512
-
2513
- .tina-tailwind .text-gray-800 {
2514
- --tw-text-opacity: 1 !important;
2515
- color: rgba(54, 49, 69, var(--tw-text-opacity)) !important;
2516
- }
2517
-
2518
- .tina-tailwind .text-gray-900 {
2519
- --tw-text-opacity: 1 !important;
2520
- color: rgba(37, 35, 54, var(--tw-text-opacity)) !important;
2521
- }
2522
-
2523
- .tina-tailwind .text-blue-500 {
2524
- --tw-text-opacity: 1 !important;
2525
- color: rgba(0, 132, 255, var(--tw-text-opacity)) !important;
2526
- }
2527
-
2528
- .tina-tailwind .text-blue-400 {
2529
- --tw-text-opacity: 1 !important;
2530
- color: rgba(34, 150, 254, var(--tw-text-opacity)) !important;
2531
- }
2532
-
2533
- .tina-tailwind .underline {
2534
- text-decoration: underline !important;
2535
- }
2536
-
2537
- .tina-tailwind .opacity-100 {
2538
- opacity: 1 !important;
2539
- }
2540
-
2541
- .tina-tailwind .opacity-90 {
2542
- opacity: .9 !important;
2543
- }
2544
-
2545
- .tina-tailwind .opacity-80 {
2546
- opacity: .8 !important;
2547
- }
2548
-
2549
- .tina-tailwind .opacity-50 {
2550
- opacity: .5 !important;
2551
- }
2552
-
2553
- .tina-tailwind .opacity-70 {
2554
- opacity: .7 !important;
2555
- }
2556
-
2557
- .tina-tailwind .opacity-0 {
2558
- opacity: 0 !important;
2559
- }
2560
-
2561
- .tina-tailwind .shadow-lg {
2562
- --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
2563
- box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;
2564
- }
2565
-
2566
- .tina-tailwind .shadow-2xl {
2567
- --tw-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
2568
- box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;
2569
- }
2570
-
2571
- .tina-tailwind .shadow {
2572
- --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
2573
- box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;
2574
- }
2575
-
2576
- .tina-tailwind .shadow-sm {
2577
- --tw-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
2578
- box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;
2579
- }
2580
-
2581
- .tina-tailwind .ring-1 {
2582
- --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;
2583
- --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;
2584
- box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000) !important;
2585
- }
2586
-
2587
- .tina-tailwind .ring-black {
2588
- --tw-ring-opacity: 1 !important;
2589
- --tw-ring-color: rgba(0, 0, 0, var(--tw-ring-opacity)) !important;
2590
- }
2591
-
2592
- .tina-tailwind .ring-opacity-5 {
2593
- --tw-ring-opacity: .05 !important;
2594
- }
2595
-
2596
- .tina-tailwind .filter {
2597
- filter: var(--tw-filter) !important;
2598
- }
2599
-
2600
- .tina-tailwind .transition-opacity {
2601
- transition-property: opacity !important;
2602
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
2603
- transition-duration: 150ms !important;
2604
- }
2605
-
2606
- .tina-tailwind .transition-colors {
2607
- transition-property: background-color, border-color, color, fill, stroke !important;
2608
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
2609
- transition-duration: 150ms !important;
2610
- }
2611
-
2612
- .tina-tailwind .transition-all {
2613
- transition-property: all !important;
2614
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
2615
- transition-duration: 150ms !important;
2616
- }
2617
-
2618
- .tina-tailwind .transition {
2619
- transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter !important;
2620
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
2621
- transition-duration: 150ms !important;
2622
- }
2623
-
2624
- .tina-tailwind .duration-300 {
2625
- transition-duration: 300ms !important;
2626
- }
2627
-
2628
- .tina-tailwind .duration-150 {
2629
- transition-duration: 150ms !important;
2630
- }
2631
-
2632
- .tina-tailwind .duration-100 {
2633
- transition-duration: 100ms !important;
2634
- }
2635
-
2636
- .tina-tailwind .duration-75 {
2637
- transition-duration: 75ms !important;
2638
- }
2639
-
2640
- .tina-tailwind .ease-out {
2641
- transition-timing-function: cubic-bezier(0, 0, 0.2, 1) !important;
2642
- }
2643
-
2644
- .tina-tailwind .ease-in {
2645
- transition-timing-function: cubic-bezier(0.4, 0, 1, 1) !important;
2646
- }
2647
-
2648
- .tina-tailwind .ease-in-out {
2649
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
2650
- }
2651
-
2652
- .tina-tailwind .icon-parent svg {
2653
- fill: currentColor !important;
2654
- }
2655
-
2656
- .tina-tailwind {
2657
- 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";
2658
- --tw-text-opacity: 1;
2659
- color: rgba(86, 81, 101, var(--tw-text-opacity));
2660
- }
2661
-
2662
- .first\\:pt-3:first-child {
2663
- padding-top: 12px !important;
2664
- }
2665
-
2666
- .last\\:pb-3:last-child {
2667
- padding-bottom: 12px !important;
2668
- }
2669
-
2670
- .hover\\:bg-blue-600:hover {
2671
- --tw-bg-opacity: 1 !important;
2672
- background-color: rgba(5, 116, 228, var(--tw-bg-opacity)) !important;
2673
- }
2674
-
2675
- .hover\\:bg-gray-50:hover {
2676
- --tw-bg-opacity: 1 !important;
2677
- background-color: rgba(246, 246, 249, var(--tw-bg-opacity)) !important;
2678
- }
2679
-
2680
- .hover\\:text-blue-600:hover {
2681
- --tw-text-opacity: 1 !important;
2682
- color: rgba(5, 116, 228, var(--tw-text-opacity)) !important;
2683
- }
2684
-
2685
- .hover\\:text-blue-400:hover {
2686
- --tw-text-opacity: 1 !important;
2687
- color: rgba(34, 150, 254, var(--tw-text-opacity)) !important;
2688
- }
2689
-
2690
- .hover\\:opacity-100:hover {
2691
- opacity: 1 !important;
2692
- }
2693
-
2694
- .hover\\:opacity-80:hover {
2695
- opacity: .8 !important;
2696
- }
2697
-
2698
- .focus\\:text-blue-400:focus {
2699
- --tw-text-opacity: 1 !important;
2700
- color: rgba(34, 150, 254, var(--tw-text-opacity)) !important;
2701
- }
2702
-
2703
- .focus\\:underline:focus {
2704
- text-decoration: underline !important;
2705
- }
2706
-
2707
- .focus\\:shadow-outline:focus {
2708
- --tw-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5) !important;
2709
- box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;
2710
- }
2711
-
2712
- .focus\\:outline-none:focus {
2713
- outline: 2px solid transparent !important;
2714
- outline-offset: 2px !important;
2715
- }
2716
-
2717
- .focus\\:ring-2:focus {
2718
- --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;
2719
- --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;
2720
- box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000) !important;
2721
- }
2722
-
2723
- .focus\\:ring-blue-500:focus {
2724
- --tw-ring-opacity: 1 !important;
2725
- --tw-ring-color: rgba(0, 132, 255, var(--tw-ring-opacity)) !important;
2726
- }
2727
-
2728
- .group:hover .group-hover\\:opacity-100 {
2729
- opacity: 1 !important;
2730
- }
2731
- `;
1858
+ 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-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-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-600 {\n --tw-text-opacity: 1;\n color: rgb(86 81 101 / 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 .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';
2732
1859
  function useTina({
2733
1860
  query,
2734
1861
  variables,
@@ -3136,10 +2263,10 @@ This will work when developing locally but NOT when deployed to production.
3136
2263
  return t;
3137
2264
  };
3138
2265
  function Tree2Element(tree) {
3139
- return tree && tree.map(function(node, i) {
3140
- return React__default["default"].createElement(node.tag, __assign({
2266
+ return tree && tree.map(function(node2, i) {
2267
+ return React__default["default"].createElement(node2.tag, __assign({
3141
2268
  key: i
3142
- }, node.attr), Tree2Element(node.child));
2269
+ }, node2.attr), Tree2Element(node2.child));
3143
2270
  });
3144
2271
  }
3145
2272
  function GenIcon(data) {
@@ -3181,41 +2308,37 @@ This will work when developing locally but NOT when deployed to production.
3181
2308
  }
3182
2309
  const useGetCollections = (cms) => {
3183
2310
  const api = new TinaAdminApi(cms);
3184
- const [info, setInfo] = React.useState({ collections: [], loading: true, error: false });
2311
+ const [collections, setCollections] = React.useState([]);
2312
+ const [loading, setLoading] = React.useState(true);
2313
+ const [error, setError] = React.useState(void 0);
3185
2314
  React.useEffect(() => {
3186
2315
  const fetchCollections = async () => {
3187
- const response = await api.fetchCollections();
3188
- setInfo({
3189
- collections: response.getCollections,
3190
- loading: false,
3191
- error: false
3192
- });
2316
+ try {
2317
+ const response = await api.fetchCollections();
2318
+ setCollections(response.getCollections);
2319
+ } catch (error2) {
2320
+ cms.alerts.error(`[${error2.name}] GetCollections failed: ${error2.message}`, 30 * 1e3);
2321
+ console.error(error2);
2322
+ setCollections([]);
2323
+ setError(error2);
2324
+ }
2325
+ setLoading(false);
3193
2326
  };
2327
+ setLoading(true);
3194
2328
  fetchCollections();
3195
2329
  }, [cms]);
3196
- return info;
3197
- };
3198
- const GetCollections = ({ cms, children }) => {
3199
- const { collections, loading, error } = useGetCollections(cms);
3200
- if (!collections)
3201
- return null;
3202
- return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, children(collections, loading, error));
2330
+ return { collections, loading, error };
3203
2331
  };
3204
2332
  const slugify = (text) => {
3205
2333
  return text.toString().toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "_").replace(/^-+|-+$/g, "");
3206
2334
  };
3207
2335
  const Sidebar = ({ cms }) => {
2336
+ const collectionsInfo = useGetCollections(cms);
3208
2337
  const screens = cms.plugins.getType("screen").all();
3209
- return /* @__PURE__ */ React__default["default"].createElement(GetCollections, {
3210
- cms
3211
- }, (collections, loading, error) => /* @__PURE__ */ React__default["default"].createElement(toolkit.Nav, {
2338
+ return /* @__PURE__ */ React__default["default"].createElement(toolkit.Nav, {
3212
2339
  sidebarWidth: 360,
3213
2340
  showCollections: true,
3214
- collectionsInfo: {
3215
- collections,
3216
- loading,
3217
- error
3218
- },
2341
+ collectionsInfo,
3219
2342
  screens,
3220
2343
  contentCreators: [],
3221
2344
  RenderNavSite: ({ view }) => /* @__PURE__ */ React__default["default"].createElement(SidebarLink, {
@@ -3228,7 +2351,7 @@ This will work when developing locally but NOT when deployed to production.
3228
2351
  to: `collections/${collection.name}`,
3229
2352
  Icon: ImFilesEmpty
3230
2353
  })
3231
- }));
2354
+ });
3232
2355
  };
3233
2356
  const SidebarLink = (props) => {
3234
2357
  const { to, label, Icon } = props;
@@ -3252,9 +2375,6 @@ This will work when developing locally but NOT when deployed to production.
3252
2375
  function BiEdit(props) {
3253
2376
  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);
3254
2377
  }
3255
- function BiExit(props) {
3256
- return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M19.002 3h-14c-1.103 0-2 .897-2 2v4h2V5h14v14h-14v-4h-2v4c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5c0-1.103-.898-2-2-2z" } }, { "tag": "path", "attr": { "d": "m11 16 5-4-5-4v3.001H3v2h8z" } }] })(props);
3257
- }
3258
2378
  function BiLogIn(props) {
3259
2379
  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);
3260
2380
  }
@@ -3288,8 +2408,8 @@ This will work when developing locally but NOT when deployed to production.
3288
2408
  d: "M18.6466 14.5553C19.9018 13.5141 20.458 7.36086 21.0014 5.14903C21.5447 2.9372 23.7919 3.04938 23.7919 3.04938C23.7919 3.04938 23.2085 4.06764 23.4464 4.82751C23.6844 5.58738 25.3145 6.26662 25.3145 6.26662L24.9629 7.19622C24.9629 7.19622 24.2288 7.10204 23.7919 7.9785C23.355 8.85496 24.3392 17.4442 24.3392 17.4442C24.3392 17.4442 21.4469 22.7275 21.4469 24.9206C21.4469 27.1136 22.4819 28.9515 22.4819 28.9515H21.0296C21.0296 28.9515 18.899 26.4086 18.462 25.1378C18.0251 23.8669 18.1998 22.596 18.1998 22.596C18.1998 22.596 15.8839 22.4646 13.8303 22.596C11.7767 22.7275 10.4072 24.498 10.16 25.4884C9.91287 26.4787 9.81048 28.9515 9.81048 28.9515H8.66211C7.96315 26.7882 7.40803 26.0129 7.70918 24.9206C8.54334 21.8949 8.37949 20.1788 8.18635 19.4145C7.99321 18.6501 6.68552 17.983 6.68552 17.983C7.32609 16.6741 7.97996 16.0452 10.7926 15.9796C13.6052 15.914 17.3915 15.5965 18.6466 14.5553Z"
3289
2409
  }), /* @__PURE__ */ React__default["default"].createElement("path", {
3290
2410
  d: "M11.1268 24.7939C11.1268 24.7939 11.4236 27.5481 13.0001 28.9516H14.3511C13.0001 27.4166 12.8527 23.4155 12.8527 23.4155C12.1656 23.6399 11.3045 24.3846 11.1268 24.7939Z"
3291
- })), /* @__PURE__ */ React__default["default"].createElement("span", null, "Tina Admin"))), message && /* @__PURE__ */ React__default["default"].createElement("div", {
3292
- className: "px-5 py-4 "
2411
+ })), /* @__PURE__ */ React__default["default"].createElement("span", null, "Tina"))), message && /* @__PURE__ */ React__default["default"].createElement("div", {
2412
+ className: "px-5 pt-4"
3293
2413
  }, /* @__PURE__ */ React__default["default"].createElement("p", {
3294
2414
  className: "text-base font-sans leading-normal"
3295
2415
  }, message)), /* @__PURE__ */ React__default["default"].createElement("div", {
@@ -3299,38 +2419,52 @@ This will work when developing locally but NOT when deployed to production.
3299
2419
  const LoginPage = () => {
3300
2420
  const { setEdit } = sharedctx.useEditState();
3301
2421
  const login = () => setEdit(true);
3302
- return /* @__PURE__ */ React__default["default"].createElement(AuthTemplate, null, /* @__PURE__ */ React__default["default"].createElement("a", {
3303
- href: "/",
3304
- className: "flex-1 text-center inline-flex justify-center items-center px-8 py-3 shadow-sm text-sm leading-4 font-medium rounded-full text-gray-600 border border-gray-150 hover:opacity-80 hover:bg-gray-50 focus:outline-none focus:shadow-outline-blue transition duration-150 ease-out"
2422
+ return /* @__PURE__ */ React__default["default"].createElement(AuthTemplate, null, /* @__PURE__ */ React__default["default"].createElement("div", {
2423
+ className: "flex w-full flex-1 gap-4 items-center justify-end"
2424
+ }, /* @__PURE__ */ React__default["default"].createElement(toolkit.Button, {
2425
+ onClick: () => {
2426
+ window.location.href = "/";
2427
+ },
2428
+ variant: "white",
2429
+ size: "custom",
2430
+ className: "text-base h-12 px-6 flex-shrink-0 flex-grow-0"
3305
2431
  }, /* @__PURE__ */ React__default["default"].createElement(MdOutlineArrowBack, {
3306
2432
  className: "w-6 h-auto mr-1.5 opacity-80"
3307
- }), " Back to site"), /* @__PURE__ */ React__default["default"].createElement("button", {
3308
- type: "submit",
2433
+ }), " Back To Site"), /* @__PURE__ */ React__default["default"].createElement(toolkit.Button, {
3309
2434
  onClick: () => login(),
3310
- className: "flex-1 justify-center text-center inline-flex items-center px-8 py-3 shadow-sm border border-transparent text-sm leading-4 font-medium rounded-full text-white hover:opacity-80 focus:outline-none focus:shadow-outline-blue transition duration-150 ease-out",
3311
- style: { background: "#0084FF" }
2435
+ variant: "primary",
2436
+ size: "custom",
2437
+ className: "text-base h-12 px-6 flex-1",
2438
+ type: "submit"
3312
2439
  }, /* @__PURE__ */ React__default["default"].createElement(BiLogIn, {
3313
- className: "w-6 h-auto mr-1.5 opacity-80"
3314
- }), " Enter edit-mode"));
2440
+ className: "w-6 h-auto mr-2 opacity-80"
2441
+ }), " Edit With Tina")));
3315
2442
  };
3316
2443
  const logout = () => {
3317
2444
  sharedctx.setEditing(false);
3318
2445
  window.location.href = "/";
3319
2446
  };
3320
2447
  const LogoutPage = () => {
3321
- return /* @__PURE__ */ React__default["default"].createElement(AuthTemplate, null, /* @__PURE__ */ React__default["default"].createElement("a", {
3322
- href: "/",
3323
- className: "flex-1 text-center inline-flex justify-center items-center px-8 py-3 shadow-sm text-sm leading-4 font-medium rounded-full text-gray-600 border border-gray-150 hover:opacity-80 hover:bg-gray-50 focus:outline-none focus:shadow-outline-blue transition duration-150 ease-out"
2448
+ return /* @__PURE__ */ React__default["default"].createElement(AuthTemplate, null, /* @__PURE__ */ React__default["default"].createElement("div", {
2449
+ className: "flex w-full flex-1 gap-4 items-center justify-end"
2450
+ }, /* @__PURE__ */ React__default["default"].createElement(toolkit.Button, {
2451
+ onClick: () => {
2452
+ window.location.href = "/";
2453
+ },
2454
+ variant: "white",
2455
+ size: "custom",
2456
+ className: "text-base h-12 px-6 flex-shrink-0 flex-grow-0"
3324
2457
  }, /* @__PURE__ */ React__default["default"].createElement(MdOutlineArrowBack, {
3325
2458
  className: "w-6 h-auto mr-1.5 opacity-80"
3326
- }), " Back to site"), /* @__PURE__ */ React__default["default"].createElement("button", {
3327
- type: "submit",
2459
+ }), " Back To Site"), /* @__PURE__ */ React__default["default"].createElement(toolkit.Button, {
3328
2460
  onClick: () => logout(),
3329
- className: "flex-1 justify-center text-center inline-flex items-center px-8 py-3 shadow-sm border border-transparent text-sm leading-4 font-medium rounded-full text-white hover:opacity-80 focus:outline-none focus:shadow-outline-blue transition duration-150 ease-out",
3330
- style: { background: "#0084FF" }
2461
+ type: "submit",
2462
+ variant: "primary",
2463
+ size: "custom",
2464
+ className: "text-base h-12 px-6 flex-1"
3331
2465
  }, /* @__PURE__ */ React__default["default"].createElement(BiLogOut, {
3332
2466
  className: "w-6 h-auto mr-1.5 opacity-80"
3333
- }), " Log out"));
2467
+ }), " Log Out of Tina")));
3334
2468
  };
3335
2469
  const PageWrapper = ({
3336
2470
  children
@@ -3371,20 +2505,127 @@ This will work when developing locally but NOT when deployed to production.
3371
2505
  }, "Welcome to Tina!")), /* @__PURE__ */ React__default["default"].createElement(PageBodyNarrow, null, "This is your dashboard for editing or creating content. Select a collection on the left to begin.")));
3372
2506
  });
3373
2507
  };
3374
- function FiMoreVertical(props) {
3375
- return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "circle", "attr": { "cx": "12", "cy": "12", "r": "1" } }, { "tag": "circle", "attr": { "cx": "12", "cy": "5", "r": "1" } }, { "tag": "circle", "attr": { "cx": "12", "cy": "19", "r": "1" } }] })(props);
3376
- }
2508
+ const LoadingPage = () => /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, /* @__PURE__ */ React__default["default"].createElement("div", {
2509
+ style: {
2510
+ position: "absolute",
2511
+ top: 0,
2512
+ left: 0,
2513
+ width: "100%",
2514
+ height: "100%",
2515
+ zIndex: 200,
2516
+ opacity: "0.8",
2517
+ display: "flex",
2518
+ alignItems: "start",
2519
+ justifyContent: "center",
2520
+ padding: "120px 40px 40px 40px"
2521
+ }
2522
+ }, /* @__PURE__ */ React__default["default"].createElement("div", {
2523
+ style: {
2524
+ background: "#FFF",
2525
+ border: "1px solid #EDECF3",
2526
+ boxShadow: "0px 2px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.1)",
2527
+ borderRadius: "8px",
2528
+ padding: "32px 24px",
2529
+ width: "460px",
2530
+ maxWidth: "90%",
2531
+ display: "flex",
2532
+ alignItems: "center",
2533
+ justifyContent: "center",
2534
+ flexDirection: "column"
2535
+ }
2536
+ }, /* @__PURE__ */ React__default["default"].createElement("svg", {
2537
+ style: {
2538
+ width: "64px",
2539
+ color: "#2296fe",
2540
+ marginTop: "-8px",
2541
+ marginBottom: "16px"
2542
+ },
2543
+ version: "1.1",
2544
+ id: "L5",
2545
+ xmlns: "http://www.w3.org/2000/svg",
2546
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
2547
+ x: "0px",
2548
+ y: "0px",
2549
+ viewBox: "0 0 100 64",
2550
+ enableBackground: "new 0 0 0 0",
2551
+ xmlSpace: "preserve"
2552
+ }, /* @__PURE__ */ React__default["default"].createElement("circle", {
2553
+ fill: "currentColor",
2554
+ stroke: "none",
2555
+ cx: 6,
2556
+ cy: 32,
2557
+ r: 6
2558
+ }, /* @__PURE__ */ React__default["default"].createElement("animateTransform", {
2559
+ attributeName: "transform",
2560
+ dur: "1s",
2561
+ type: "translate",
2562
+ values: "0 15 ; 0 -15; 0 15",
2563
+ calcMode: "spline",
2564
+ keySplines: "0.8 0 0.4 1; 0.4 0 0.2 1",
2565
+ repeatCount: "indefinite",
2566
+ begin: "0.1"
2567
+ })), /* @__PURE__ */ React__default["default"].createElement("circle", {
2568
+ fill: "currentColor",
2569
+ stroke: "none",
2570
+ cx: 30,
2571
+ cy: 32,
2572
+ r: 6
2573
+ }, /* @__PURE__ */ React__default["default"].createElement("animateTransform", {
2574
+ attributeName: "transform",
2575
+ dur: "1s",
2576
+ type: "translate",
2577
+ values: "0 15 ; 0 -10; 0 15",
2578
+ calcMode: "spline",
2579
+ keySplines: "0.8 0 0.4 1; 0.4 0 0.2 1",
2580
+ repeatCount: "indefinite",
2581
+ begin: "0.2"
2582
+ })), /* @__PURE__ */ React__default["default"].createElement("circle", {
2583
+ fill: "currentColor",
2584
+ stroke: "none",
2585
+ cx: 54,
2586
+ cy: 32,
2587
+ r: 6
2588
+ }, /* @__PURE__ */ React__default["default"].createElement("animateTransform", {
2589
+ attributeName: "transform",
2590
+ dur: "1s",
2591
+ type: "translate",
2592
+ values: "0 15 ; 0 -5; 0 15",
2593
+ calcMode: "spline",
2594
+ keySplines: "0.8 0 0.4 1; 0.4 0 0.2 1",
2595
+ repeatCount: "indefinite",
2596
+ begin: "0.3"
2597
+ }))), /* @__PURE__ */ React__default["default"].createElement("p", {
2598
+ style: {
2599
+ fontSize: "16px",
2600
+ color: "#716c7f",
2601
+ textAlign: "center",
2602
+ lineHeight: "1.3",
2603
+ fontFamily: "'Inter', sans-serif",
2604
+ fontWeight: "normal"
2605
+ }
2606
+ }, "Please wait, Tina is loading data..."))));
3377
2607
  const useGetCollection = (cms, collectionName, includeDocuments = true) => {
3378
2608
  const api = new TinaAdminApi(cms);
3379
2609
  const [collection, setCollection] = React.useState(void 0);
2610
+ const [loading, setLoading] = React.useState(true);
2611
+ const [error, setError] = React.useState(void 0);
3380
2612
  React.useEffect(() => {
3381
2613
  const fetchCollection = async () => {
3382
- const response = await api.fetchCollection(collectionName, includeDocuments);
3383
- setCollection(response.getCollection);
2614
+ try {
2615
+ const response = await api.fetchCollection(collectionName, includeDocuments);
2616
+ setCollection(response.getCollection);
2617
+ } catch (error2) {
2618
+ cms.alerts.error(`[${error2.name}] GetCollection failed: ${error2.message}`, 30 * 1e3);
2619
+ console.error(error2);
2620
+ setCollection(void 0);
2621
+ setError(error2);
2622
+ }
2623
+ setLoading(false);
3384
2624
  };
2625
+ setLoading(true);
3385
2626
  fetchCollection();
3386
2627
  }, [cms, collectionName]);
3387
- return collection;
2628
+ return { collection, loading, error };
3388
2629
  };
3389
2630
  const GetCollection = ({
3390
2631
  cms,
@@ -3392,11 +2633,16 @@ This will work when developing locally but NOT when deployed to production.
3392
2633
  includeDocuments = true,
3393
2634
  children
3394
2635
  }) => {
3395
- const collection = useGetCollection(cms, collectionName, includeDocuments);
2636
+ const { collection, loading, error } = useGetCollection(cms, collectionName, includeDocuments);
3396
2637
  if (!collection) {
3397
- return null;
2638
+ if (loading) {
2639
+ return /* @__PURE__ */ React__default["default"].createElement(LoadingPage, null);
2640
+ }
2641
+ if (error) {
2642
+ return null;
2643
+ }
3398
2644
  }
3399
- return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, children(collection));
2645
+ return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, children(collection, loading));
3400
2646
  };
3401
2647
  const TemplateMenu = ({ templates }) => {
3402
2648
  return /* @__PURE__ */ React__default["default"].createElement(react.Menu, {
@@ -3425,12 +2671,21 @@ This will work when developing locally but NOT when deployed to production.
3425
2671
  className: `w-full text-md px-4 py-2 tracking-wide flex items-center opacity-80 text-gray-600 ${active && "text-gray-800 opacity-100"}`
3426
2672
  }, template.label))))))));
3427
2673
  };
2674
+ const handleNavigate = (navigate, cms, collection, document) => {
2675
+ const plugins = cms.plugins.all("tina-admin");
2676
+ const routeMapping = plugins.find(({ name }) => name === "route-mapping");
2677
+ const routeOverride = routeMapping ? routeMapping.mapper(collection, document) : void 0;
2678
+ if (routeOverride) {
2679
+ window.location.href = routeOverride;
2680
+ return null;
2681
+ } else {
2682
+ navigate(document.sys.filename);
2683
+ }
2684
+ };
3428
2685
  const CollectionListPage = () => {
3429
- const { collectionName } = reactRouterDom.useParams();
3430
2686
  const navigate = reactRouterDom.useNavigate();
2687
+ const { collectionName } = reactRouterDom.useParams();
3431
2688
  return /* @__PURE__ */ React__default["default"].createElement(GetCMS, null, (cms) => {
3432
- const plugins = cms.plugins.all("tina-admin");
3433
- const routeMapping = plugins.find(({ name }) => name === "route-mapping");
3434
2689
  return /* @__PURE__ */ React__default["default"].createElement(GetCollection, {
3435
2690
  cms,
3436
2691
  collectionName,
@@ -3457,24 +2712,16 @@ This will work when developing locally but NOT when deployed to production.
3457
2712
  }, /* @__PURE__ */ React__default["default"].createElement("tbody", {
3458
2713
  className: "divide-y divide-gray-150"
3459
2714
  }, documents.map((document) => {
3460
- const overrideRoute = routeMapping ? routeMapping.mapper(collection, document.node) : void 0;
3461
2715
  return /* @__PURE__ */ React__default["default"].createElement("tr", {
3462
2716
  key: `document-${document.node.sys.filename}`,
3463
2717
  className: ""
3464
2718
  }, /* @__PURE__ */ React__default["default"].createElement("td", {
3465
2719
  className: "px-6 py-2 whitespace-nowrap"
3466
- }, overrideRoute && /* @__PURE__ */ React__default["default"].createElement("a", {
3467
- className: "text-blue-600 hover:text-blue-400 flex items-center gap-3",
3468
- href: `${overrideRoute}`
3469
- }, /* @__PURE__ */ React__default["default"].createElement(BiEdit, {
3470
- className: "inline-block h-6 w-auto opacity-70"
3471
- }), /* @__PURE__ */ React__default["default"].createElement("span", null, /* @__PURE__ */ React__default["default"].createElement("span", {
3472
- className: "block text-xs text-gray-400 mb-1 uppercase"
3473
- }, "Filename"), /* @__PURE__ */ React__default["default"].createElement("span", {
3474
- className: "h-5 leading-5 block whitespace-nowrap"
3475
- }, document.node.sys.filename))), !overrideRoute && /* @__PURE__ */ React__default["default"].createElement(reactRouterDom.Link, {
3476
- className: "text-blue-600 hover:text-blue-400 flex items-center gap-3",
3477
- to: `${document.node.sys.filename}`
2720
+ }, /* @__PURE__ */ React__default["default"].createElement("a", {
2721
+ className: "text-blue-600 hover:text-blue-400 flex items-center gap-3 cursor-pointer",
2722
+ onClick: () => {
2723
+ handleNavigate(navigate, cms, collection, document.node);
2724
+ }
3478
2725
  }, /* @__PURE__ */ React__default["default"].createElement(BiEdit, {
3479
2726
  className: "inline-block h-6 w-auto opacity-70"
3480
2727
  }), /* @__PURE__ */ React__default["default"].createElement("span", null, /* @__PURE__ */ React__default["default"].createElement("span", {
@@ -3493,55 +2740,11 @@ This will work when developing locally but NOT when deployed to production.
3493
2740
  className: "block text-xs text-gray-400 mb-1 uppercase"
3494
2741
  }, "Template"), /* @__PURE__ */ React__default["default"].createElement("span", {
3495
2742
  className: "h-5 leading-5 block text-sm font-medium text-gray-900"
3496
- }, document.node.sys.template)), overrideRoute && /* @__PURE__ */ React__default["default"].createElement("td", {
3497
- className: "w-0"
3498
- }, /* @__PURE__ */ React__default["default"].createElement(OverflowMenu, {
3499
- items: [
3500
- {
3501
- label: "Edit in Admin",
3502
- icon: BiEdit,
3503
- onClick: () => {
3504
- navigate(`${document.node.sys.filename}`, { replace: true });
3505
- }
3506
- }
3507
- ]
3508
- })));
2743
+ }, document.node.sys.template)));
3509
2744
  })))))));
3510
2745
  });
3511
2746
  });
3512
2747
  };
3513
- const OverflowMenu = ({ items = [] }) => {
3514
- if (items.length === 0)
3515
- return null;
3516
- return /* @__PURE__ */ React__default["default"].createElement(react.Menu, null, ({ open }) => /* @__PURE__ */ React__default["default"].createElement("div", {
3517
- className: "relative"
3518
- }, /* @__PURE__ */ React__default["default"].createElement(react.Menu.Button, {
3519
- className: `flex-1 group px-5 py-3 flex justify-between items-center transition-all duration-300 ease-in-out transform`
3520
- }, /* @__PURE__ */ React__default["default"].createElement(FiMoreVertical, {
3521
- className: `flex-0 w-6 h-full inline-block text-gray-400 transition-all duration-300 ease-in-out transform ${open ? `opacity-100 text-blue-500` : `opacity-70 group-hover:opacity-100`}`
3522
- })), /* @__PURE__ */ React__default["default"].createElement("div", {
3523
- className: "transform translate-y-full absolute bottom-2 right-5 z-50"
3524
- }, /* @__PURE__ */ React__default["default"].createElement(react.Transition, {
3525
- enter: "transition duration-150 ease-out",
3526
- enterFrom: "transform opacity-0 -translate-y-2",
3527
- enterTo: "transform opacity-100 translate-y-0",
3528
- leave: "transition duration-75 ease-in",
3529
- leaveFrom: "transform opacity-100 translate-y-0",
3530
- leaveTo: "transform opacity-0 -translate-y-2"
3531
- }, /* @__PURE__ */ React__default["default"].createElement(react.Menu.Items, {
3532
- className: "bg-white border border-gray-150 rounded-lg shadow-lg"
3533
- }, items.map((item) => {
3534
- const Icon = item.icon ? item.icon : BiExit;
3535
- return /* @__PURE__ */ React__default["default"].createElement(react.Menu.Item, {
3536
- key: `menu-item-${item.label}`
3537
- }, ({ active }) => /* @__PURE__ */ React__default["default"].createElement("button", {
3538
- className: `w-full text-base px-4 py-2 first:pt-3 last:pb-3 tracking-wide whitespace-nowrap flex items-center opacity-80 text-gray-600 ${active && "text-blue-400 bg-gray-50 opacity-100"}`,
3539
- onClick: item.onClick
3540
- }, /* @__PURE__ */ React__default["default"].createElement(Icon, {
3541
- className: "w-6 h-auto mr-2 text-blue-400"
3542
- }), " ", item.label));
3543
- }))))));
3544
- };
3545
2748
  function HiChevronRight(props) {
3546
2749
  return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 20 20", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "fillRule": "evenodd", "d": "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z", "clipRule": "evenodd" } }] })(props);
3547
2750
  }
@@ -3553,30 +2756,46 @@ This will work when developing locally but NOT when deployed to production.
3553
2756
  fields: void 0,
3554
2757
  mutationInfo: void 0
3555
2758
  });
2759
+ const [loading, setLoading] = React.useState(true);
2760
+ const [error, setError] = React.useState(void 0);
3556
2761
  React.useEffect(() => {
3557
2762
  const fetchDocumentFields = async () => {
3558
- const response = await api.fetchDocumentFields();
3559
- const documentFields = response.getDocumentFields;
3560
- const collection = documentFields[collectionName].collection;
3561
- const mutationInfo = documentFields[collectionName].mutationInfo;
3562
- let fields = void 0;
3563
- let template = void 0;
3564
- if (templateName && documentFields[collectionName].templates && documentFields[collectionName].templates[templateName]) {
3565
- template = documentFields[collectionName].templates[templateName].template;
3566
- fields = documentFields[collectionName].templates[templateName].fields;
3567
- } else {
3568
- fields = documentFields[collectionName].fields;
2763
+ try {
2764
+ const response = await api.fetchDocumentFields();
2765
+ const documentFields = response.getDocumentFields;
2766
+ const collection = documentFields[collectionName].collection;
2767
+ const mutationInfo = documentFields[collectionName].mutationInfo;
2768
+ let fields = void 0;
2769
+ let template = void 0;
2770
+ if (templateName && documentFields[collectionName].templates && documentFields[collectionName].templates[templateName]) {
2771
+ template = documentFields[collectionName].templates[templateName].template;
2772
+ fields = documentFields[collectionName].templates[templateName].fields;
2773
+ } else {
2774
+ fields = documentFields[collectionName].fields;
2775
+ }
2776
+ setInfo({
2777
+ collection,
2778
+ template,
2779
+ fields,
2780
+ mutationInfo
2781
+ });
2782
+ } catch (error2) {
2783
+ cms.alerts.error(`[${error2.name}] GetDocumentFields failed: ${error2.message}`, 30 * 1e3);
2784
+ console.error(error2);
2785
+ setInfo({
2786
+ collection: void 0,
2787
+ template: void 0,
2788
+ fields: void 0,
2789
+ mutationInfo: void 0
2790
+ });
2791
+ setError(error2);
3569
2792
  }
3570
- setInfo({
3571
- collection,
3572
- template,
3573
- fields,
3574
- mutationInfo
3575
- });
2793
+ setLoading(false);
3576
2794
  };
2795
+ setLoading(true);
3577
2796
  fetchDocumentFields();
3578
2797
  }, [cms, collectionName]);
3579
- return info;
2798
+ return __spreadProps(__spreadValues({}, info), { loading, error });
3580
2799
  };
3581
2800
  const GetDocumentFields = ({
3582
2801
  cms,
@@ -3584,11 +2803,16 @@ This will work when developing locally but NOT when deployed to production.
3584
2803
  templateName,
3585
2804
  children
3586
2805
  }) => {
3587
- const { collection, template, fields, mutationInfo } = useGetDocumentFields(cms, collectionName, templateName);
2806
+ const { collection, template, fields, mutationInfo, loading, error } = useGetDocumentFields(cms, collectionName, templateName);
3588
2807
  if (!collection) {
3589
- return null;
2808
+ if (loading) {
2809
+ return /* @__PURE__ */ React__default["default"].createElement(LoadingPage, null);
2810
+ }
2811
+ if (error) {
2812
+ return null;
2813
+ }
3590
2814
  }
3591
- return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, children({ collection, template, fields, mutationInfo }));
2815
+ return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, children({ collection, template, fields, mutationInfo, loading }));
3592
2816
  };
3593
2817
  const createDocument = async (cms, collection, template, mutationInfo, values) => {
3594
2818
  const api = new TinaAdminApi(cms);
@@ -3648,8 +2872,13 @@ This will work when developing locally but NOT when deployed to production.
3648
2872
  ...fields
3649
2873
  ],
3650
2874
  onSubmit: async (values) => {
3651
- await createDocument(cms, collection, template, mutationInfo, values);
3652
- navigate(`/collections/${collection.name}`);
2875
+ try {
2876
+ await createDocument(cms, collection, template, mutationInfo, values);
2877
+ navigate(`/collections/${collection.name}`);
2878
+ } catch (error) {
2879
+ cms.alerts.error(`[${error.name}] CreateDocument failed: ${error.message}`, 30 * 1e3);
2880
+ console.error(error);
2881
+ }
3653
2882
  }
3654
2883
  });
3655
2884
  }, [cms, collection, template, fields, mutationInfo]);
@@ -3678,14 +2907,25 @@ This will work when developing locally but NOT when deployed to production.
3678
2907
  const useGetDocument = (cms, collectionName, relativePath) => {
3679
2908
  const api = new TinaAdminApi(cms);
3680
2909
  const [document, setDocument] = React.useState(void 0);
2910
+ const [loading, setLoading] = React.useState(true);
2911
+ const [error, setError] = React.useState(void 0);
3681
2912
  React.useEffect(() => {
3682
2913
  const fetchDocument = async () => {
3683
- const response = await api.fetchDocument(collectionName, relativePath);
3684
- setDocument(response.getDocument);
2914
+ try {
2915
+ const response = await api.fetchDocument(collectionName, relativePath);
2916
+ setDocument(response.getDocument);
2917
+ } catch (error2) {
2918
+ cms.alerts.error(`[${error2.name}] GetDocument failed: ${error2.message}`, 30 * 1e3);
2919
+ console.error(error2);
2920
+ setDocument(void 0);
2921
+ setError(error2);
2922
+ }
2923
+ setLoading(false);
3685
2924
  };
2925
+ setLoading(true);
3686
2926
  fetchDocument();
3687
2927
  }, [cms, collectionName, relativePath]);
3688
- return document;
2928
+ return { document, loading, error };
3689
2929
  };
3690
2930
  const GetDocument = ({
3691
2931
  cms,
@@ -3693,11 +2933,16 @@ This will work when developing locally but NOT when deployed to production.
3693
2933
  relativePath,
3694
2934
  children
3695
2935
  }) => {
3696
- const document = useGetDocument(cms, collectionName, relativePath);
2936
+ const { document, loading, error } = useGetDocument(cms, collectionName, relativePath);
3697
2937
  if (!document) {
3698
- return null;
2938
+ if (loading) {
2939
+ return /* @__PURE__ */ React__default["default"].createElement(LoadingPage, null);
2940
+ }
2941
+ if (error) {
2942
+ return null;
2943
+ }
3699
2944
  }
3700
- return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, children(document));
2945
+ return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, children(document, loading));
3701
2946
  };
3702
2947
  const updateDocument = async (cms, relativePath, collection, mutationInfo, values) => {
3703
2948
  const api = new TinaAdminApi(cms);
@@ -3747,8 +2992,13 @@ This will work when developing locally but NOT when deployed to production.
3747
2992
  fields: document.form.fields,
3748
2993
  initialValues: document.values,
3749
2994
  onSubmit: async (values) => {
3750
- await updateDocument(cms, relativePath, collection, mutationInfo, values);
3751
- navigate(`/collections/${collection.name}`);
2995
+ try {
2996
+ await updateDocument(cms, relativePath, collection, mutationInfo, values);
2997
+ navigate(`/collections/${collection.name}`);
2998
+ } catch (error) {
2999
+ cms.alerts.error(`[${error.name}] UpdateDocument failed: ${error.message}`, 30 * 1e3);
3000
+ console.error(error);
3001
+ }
3752
3002
  }
3753
3003
  });
3754
3004
  }, [cms, document, relativePath, collection, mutationInfo]);
@@ -3808,16 +3058,14 @@ This will work when developing locally but NOT when deployed to production.
3808
3058
  return /* @__PURE__ */ React__default["default"].createElement(Layout, null, /* @__PURE__ */ React__default["default"].createElement(LoginPage, null));
3809
3059
  }
3810
3060
  return /* @__PURE__ */ React__default["default"].createElement(GetCMS, null, (cms) => {
3811
- const isTinaAdminEnabled = cms.flags.get("tina-admin");
3061
+ const isTinaAdminEnabled = cms.flags.get("tina-admin") === false ? false : true;
3812
3062
  if (isTinaAdminEnabled) {
3813
- return /* @__PURE__ */ React__default["default"].createElement(Layout, null, /* @__PURE__ */ React__default["default"].createElement(reactRouterDom.BrowserRouter, {
3814
- basename: "/admin"
3815
- }, /* @__PURE__ */ React__default["default"].createElement("div", {
3063
+ return /* @__PURE__ */ React__default["default"].createElement(Layout, null, /* @__PURE__ */ React__default["default"].createElement(reactRouterDom.HashRouter, null, /* @__PURE__ */ React__default["default"].createElement("div", {
3816
3064
  className: "flex items-stretch h-screen overflow-hidden"
3817
3065
  }, /* @__PURE__ */ React__default["default"].createElement(Sidebar, {
3818
3066
  cms
3819
3067
  }), /* @__PURE__ */ React__default["default"].createElement("div", {
3820
- className: "flex-1"
3068
+ className: "flex-1 relative"
3821
3069
  }, /* @__PURE__ */ React__default["default"].createElement(reactRouterDom.Routes, null, /* @__PURE__ */ React__default["default"].createElement(reactRouterDom.Route, {
3822
3070
  path: "collections/:collectionName/new",
3823
3071
  element: /* @__PURE__ */ React__default["default"].createElement(CollectionCreatePage, null)
@@ -3838,9 +3086,7 @@ This will work when developing locally but NOT when deployed to production.
3838
3086
  element: /* @__PURE__ */ React__default["default"].createElement(DashboardPage, null)
3839
3087
  }))))));
3840
3088
  } else {
3841
- return /* @__PURE__ */ React__default["default"].createElement(Layout, null, /* @__PURE__ */ React__default["default"].createElement(reactRouterDom.BrowserRouter, {
3842
- basename: "/admin"
3843
- }, /* @__PURE__ */ React__default["default"].createElement(reactRouterDom.Routes, null, /* @__PURE__ */ React__default["default"].createElement(reactRouterDom.Route, {
3089
+ return /* @__PURE__ */ React__default["default"].createElement(Layout, null, /* @__PURE__ */ React__default["default"].createElement(reactRouterDom.HashRouter, null, /* @__PURE__ */ React__default["default"].createElement(reactRouterDom.Routes, null, /* @__PURE__ */ React__default["default"].createElement(reactRouterDom.Route, {
3844
3090
  path: "logout",
3845
3091
  element: /* @__PURE__ */ React__default["default"].createElement(LogoutPage, null)
3846
3092
  }), /* @__PURE__ */ React__default["default"].createElement(reactRouterDom.Route, {
@@ -3857,6 +3103,12 @@ This will work when developing locally but NOT when deployed to production.
3857
3103
  this.mapper = mapper;
3858
3104
  }
3859
3105
  }
3106
+ const defineSchema = (config) => {
3107
+ return config;
3108
+ };
3109
+ const defineConfig = (config) => {
3110
+ return config;
3111
+ };
3860
3112
  exports2.AuthWallInner = AuthWallInner;
3861
3113
  exports2.Client = Client;
3862
3114
  exports2.DEFAULT_LOCAL_TINA_GQL_SERVER_URL = DEFAULT_LOCAL_TINA_GQL_SERVER_URL;
@@ -3871,6 +3123,8 @@ This will work when developing locally but NOT when deployed to production.
3871
3123
  exports2.assertShape = assertShape;
3872
3124
  exports2.createClient = createClient;
3873
3125
  exports2["default"] = TinaCMSProvider2;
3126
+ exports2.defineConfig = defineConfig;
3127
+ exports2.defineSchema = defineSchema;
3874
3128
  exports2.getStaticPropsForTina = getStaticPropsForTina;
3875
3129
  exports2.gql = gql;
3876
3130
  exports2.safeAssertShape = safeAssertShape;