tinacms 1.1.5 → 1.2.1

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.
Files changed (58) hide show
  1. package/LICENSE +8 -0
  2. package/dist/admin/api.d.ts +9 -11
  3. package/dist/admin/components/AuthTemplate.d.ts +2 -10
  4. package/dist/admin/components/GetCMS.d.ts +2 -10
  5. package/dist/admin/components/GetCollection.d.ts +6 -12
  6. package/dist/admin/components/GetCollections.d.ts +2 -10
  7. package/dist/admin/components/GetDocument.d.ts +2 -10
  8. package/dist/admin/components/Layout.d.ts +2 -10
  9. package/dist/admin/components/LoadingPage.d.ts +2 -10
  10. package/dist/admin/components/Page.d.ts +1 -10
  11. package/dist/admin/components/Sidebar.d.ts +2 -10
  12. package/dist/admin/index.d.ts +2 -10
  13. package/dist/admin/pages/CollectionCreatePage.d.ts +2 -10
  14. package/dist/admin/pages/CollectionListPage.d.ts +2 -10
  15. package/dist/admin/pages/CollectionUpdatePage.d.ts +2 -10
  16. package/dist/admin/pages/DashboardPage.d.ts +2 -10
  17. package/dist/admin/pages/LoginPage.d.ts +2 -10
  18. package/dist/admin/pages/LogoutPage.d.ts +2 -10
  19. package/dist/admin/pages/ScreenPage.d.ts +2 -10
  20. package/dist/admin/plugins/route-mapping.d.ts +1 -10
  21. package/dist/admin/types.d.ts +1 -10
  22. package/dist/auth/AuthModal.d.ts +2 -10
  23. package/dist/auth/TinaCloudProvider.d.ts +1 -10
  24. package/dist/auth/authenticate.d.ts +3 -12
  25. package/dist/auth/index.d.ts +1 -10
  26. package/dist/auth/popupWindow.d.ts +1 -10
  27. package/dist/auth/useGenerator.d.ts +1 -10
  28. package/dist/auth/useTinaAuthRedirect.d.ts +1 -10
  29. package/dist/client.d.ts +1 -10
  30. package/dist/client.es.js +1 -29
  31. package/dist/client.js +3 -31
  32. package/dist/edit-state.d.ts +1 -10
  33. package/dist/hooks/create-page-plugin.d.ts +1 -10
  34. package/dist/hooks/formify/formify-utils.d.ts +1 -10
  35. package/dist/hooks/formify/formify.d.ts +1 -10
  36. package/dist/hooks/formify/index.d.ts +1 -10
  37. package/dist/hooks/formify/reducer.d.ts +1 -10
  38. package/dist/hooks/formify/spec/runner.d.ts +1 -10
  39. package/dist/hooks/formify/spec/util.d.ts +1 -10
  40. package/dist/hooks/formify/types.d.ts +1 -10
  41. package/dist/hooks/formify/util.d.ts +1 -10
  42. package/dist/hooks/use-content-creator.d.ts +1 -10
  43. package/dist/hooks/use-graphql-forms.d.ts +1 -10
  44. package/dist/index.d.ts +1 -10
  45. package/dist/index.es.js +369 -87
  46. package/dist/index.js +370 -88
  47. package/dist/internalClient/formify.d.ts +1 -10
  48. package/dist/internalClient/index.d.ts +2 -13
  49. package/dist/rich-text/index.d.ts +2 -10
  50. package/dist/rich-text/prism.d.ts +2 -10
  51. package/dist/style.css +46 -8
  52. package/dist/tina-cms.d.ts +2 -10
  53. package/dist/types/cms.d.ts +1 -10
  54. package/dist/unifiedClient/index.d.ts +1 -11
  55. package/dist/utils/client.d.ts +1 -10
  56. package/dist/utils/index.d.ts +1 -10
  57. package/package.json +5 -6
  58. package/dist/utils/parseUrl.d.ts +0 -18
@@ -1,14 +1,5 @@
1
1
  /**
2
- Copyright 2021 Forestry.io Holdings, Inc.
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
6
- http://www.apache.org/licenses/LICENSE-2.0
7
- Unless required by applicable law or agreed to in writing, software
8
- distributed under the License is distributed on an "AS IS" BASIS,
9
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
- See the License for the specific language governing permissions and
11
- limitations under the License.
2
+
12
3
  */
13
4
  import { GraphQLSchema, GraphQLField, DocumentNode, FieldNode } from 'graphql';
14
5
  /**
@@ -1,14 +1,5 @@
1
1
  /**
2
- Copyright 2021 Forestry.io Holdings, Inc.
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
6
- http://www.apache.org/licenses/LICENSE-2.0
7
- Unless required by applicable law or agreed to in writing, software
8
- distributed under the License is distributed on an "AS IS" BASIS,
9
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
- See the License for the specific language governing permissions and
11
- limitations under the License.
2
+
12
3
  */
13
4
  import { TokenObject } from '../auth/authenticate';
14
5
  import { BranchData, EventBus } from '@tinacms/toolkit';
@@ -30,7 +21,6 @@ interface ServerOptions {
30
21
  branch: string;
31
22
  customContentApiUrl?: string;
32
23
  getTokenFn?: () => Promise<TokenObject>;
33
- onLogin?: OnLoginFunc;
34
24
  tinaioConfig?: TinaIOConfig;
35
25
  tokenStorage?: 'MEMORY' | 'LOCAL_STORAGE' | 'CUSTOM';
36
26
  }
@@ -147,7 +137,6 @@ export declare class LocalClient extends Client {
147
137
  id_token: string;
148
138
  refresh_token: string;
149
139
  }>;
150
- isAuthorized(): Promise<boolean>;
151
- isAuthenticated(): Promise<boolean>;
140
+ getUser(): Promise<boolean>;
152
141
  }
153
142
  export {};
@@ -1,15 +1,7 @@
1
1
  /**
2
- Copyright 2021 Forestry.io Holdings, Inc.
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
6
- http://www.apache.org/licenses/LICENSE-2.0
7
- Unless required by applicable law or agreed to in writing, software
8
- distributed under the License is distributed on an "AS IS" BASIS,
9
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
- See the License for the specific language governing permissions and
11
- limitations under the License.
2
+
12
3
  */
4
+ /// <reference types="react" />
13
5
  declare type BaseComponents = {
14
6
  h1?: {
15
7
  children: JSX.Element;
@@ -1,15 +1,7 @@
1
1
  /**
2
- Copyright 2021 Forestry.io Holdings, Inc.
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
6
- http://www.apache.org/licenses/LICENSE-2.0
7
- Unless required by applicable law or agreed to in writing, software
8
- distributed under the License is distributed on an "AS IS" BASIS,
9
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
- See the License for the specific language governing permissions and
11
- limitations under the License.
2
+
12
3
  */
4
+ /// <reference types="react" />
13
5
  export declare const Prism: (props: {
14
6
  value: string;
15
7
  lang?: string;
package/dist/style.css CHANGED
@@ -399,6 +399,9 @@
399
399
  .tina-tailwind .mt-2 {
400
400
  margin-top: 8px;
401
401
  }
402
+ .tina-tailwind .ml-1\.5 {
403
+ margin-left: 6px;
404
+ }
402
405
  .tina-tailwind .mb-4 {
403
406
  margin-bottom: 16px;
404
407
  }
@@ -426,6 +429,9 @@
426
429
  .tina-tailwind .table {
427
430
  display: table;
428
431
  }
432
+ .tina-tailwind .grid {
433
+ display: grid;
434
+ }
429
435
  .tina-tailwind .h-screen {
430
436
  height: 100vh;
431
437
  }
@@ -536,9 +542,18 @@
536
542
  .tina-tailwind .cursor-pointer {
537
543
  cursor: pointer;
538
544
  }
545
+ .tina-tailwind .grid-flow-col {
546
+ grid-auto-flow: column;
547
+ }
539
548
  .tina-tailwind .flex-col {
540
549
  flex-direction: column;
541
550
  }
551
+ .tina-tailwind .flex-wrap {
552
+ flex-wrap: wrap;
553
+ }
554
+ .tina-tailwind .items-start {
555
+ align-items: flex-start;
556
+ }
542
557
  .tina-tailwind .items-end {
543
558
  align-items: flex-end;
544
559
  }
@@ -581,6 +596,12 @@
581
596
  --tw-divide-opacity: 1;
582
597
  border-color: rgb(230 227 239 / var(--tw-divide-opacity));
583
598
  }
599
+ .tina-tailwind .self-end {
600
+ align-self: flex-end;
601
+ }
602
+ .tina-tailwind .justify-self-end {
603
+ justify-self: end;
604
+ }
584
605
  .tina-tailwind .overflow-hidden {
585
606
  overflow: hidden;
586
607
  }
@@ -595,6 +616,9 @@
595
616
  .tina-tailwind .whitespace-normal {
596
617
  white-space: normal;
597
618
  }
619
+ .tina-tailwind .whitespace-nowrap {
620
+ white-space: nowrap;
621
+ }
598
622
  .tina-tailwind .rounded-lg {
599
623
  border-radius: 8px;
600
624
  }
@@ -625,6 +649,10 @@
625
649
  --tw-border-opacity: 1;
626
650
  border-color: rgb(225 221 236 / var(--tw-border-opacity));
627
651
  }
652
+ .tina-tailwind .border-gray-100 {
653
+ --tw-border-opacity: 1;
654
+ border-color: rgb(237 236 243 / var(--tw-border-opacity));
655
+ }
628
656
  .tina-tailwind .bg-white {
629
657
  --tw-bg-opacity: 1;
630
658
  background-color: rgb(255 255 255 / var(--tw-bg-opacity));
@@ -648,6 +676,11 @@
648
676
  --tw-gradient-to: rgb(29 44 108 / 0);
649
677
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
650
678
  }
679
+ .tina-tailwind .from-gray-50\/50 {
680
+ --tw-gradient-from: rgb(246 246 249 / .5);
681
+ --tw-gradient-to: rgb(246 246 249 / 0);
682
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
683
+ }
651
684
  .tina-tailwind .from-gray-800 {
652
685
  --tw-gradient-from: #363145;
653
686
  --tw-gradient-to: rgb(54 49 69 / 0);
@@ -660,6 +693,9 @@
660
693
  .tina-tailwind .to-gray-900 {
661
694
  --tw-gradient-to: #252336;
662
695
  }
696
+ .tina-tailwind .to-gray-50 {
697
+ --tw-gradient-to: #F6F6F9;
698
+ }
663
699
  .tina-tailwind .to-black {
664
700
  --tw-gradient-to: #000;
665
701
  }
@@ -683,6 +719,10 @@
683
719
  padding-left: 48px;
684
720
  padding-right: 48px;
685
721
  }
722
+ .tina-tailwind .py-8 {
723
+ padding-top: 32px;
724
+ padding-bottom: 32px;
725
+ }
686
726
  .tina-tailwind .py-10 {
687
727
  padding-top: 40px;
688
728
  padding-bottom: 40px;
@@ -707,6 +747,10 @@
707
747
  padding-left: 12px;
708
748
  padding-right: 12px;
709
749
  }
750
+ .tina-tailwind .py-3 {
751
+ padding-top: 12px;
752
+ padding-bottom: 12px;
753
+ }
710
754
  .tina-tailwind .py-5 {
711
755
  padding-top: 20px;
712
756
  padding-bottom: 20px;
@@ -714,11 +758,8 @@
714
758
  .tina-tailwind .pt-4 {
715
759
  padding-top: 16px;
716
760
  }
717
- .tina-tailwind .pb-4 {
718
- padding-bottom: 16px;
719
- }
720
- .tina-tailwind .pt-16 {
721
- padding-top: 64px;
761
+ .tina-tailwind .pt-12 {
762
+ padding-top: 48px;
722
763
  }
723
764
  .tina-tailwind .pr-3 {
724
765
  padding-right: 12px;
@@ -732,9 +773,6 @@
732
773
  .tina-tailwind .pl-5 {
733
774
  padding-left: 20px;
734
775
  }
735
- .tina-tailwind .pt-3 {
736
- padding-top: 12px;
737
- }
738
776
  .tina-tailwind .pl-18 {
739
777
  padding-left: 72px;
740
778
  }
@@ -1,15 +1,7 @@
1
1
  /**
2
- Copyright 2021 Forestry.io Holdings, Inc.
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
6
- http://www.apache.org/licenses/LICENSE-2.0
7
- Unless required by applicable law or agreed to in writing, software
8
- distributed under the License is distributed on an "AS IS" BASIS,
9
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
- See the License for the specific language governing permissions and
11
- limitations under the License.
2
+
12
3
  */
4
+ /// <reference types="react" />
13
5
  import type { formifyCallback } from './hooks/use-graphql-forms';
14
6
  import { useDocumentCreatorPlugin } from './hooks/use-content-creator';
15
7
  import { TinaCMSProviderDefaultProps } from './types/cms';
@@ -1,14 +1,5 @@
1
1
  /**
2
- Copyright 2021 Forestry.io Holdings, Inc.
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
6
- http://www.apache.org/licenses/LICENSE-2.0
7
- Unless required by applicable law or agreed to in writing, software
8
- distributed under the License is distributed on an "AS IS" BASIS,
9
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
- See the License for the specific language governing permissions and
11
- limitations under the License.
2
+
12
3
  */
13
4
  /// <reference types="react" />
14
5
  import type { TinaCMS } from '@tinacms/toolkit';
@@ -1,14 +1,5 @@
1
1
  /**
2
- Copyright 2021 Forestry.io Holdings, Inc.
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
6
- http://www.apache.org/licenses/LICENSE-2.0
7
- Unless required by applicable law or agreed to in writing, software
8
- distributed under the License is distributed on an "AS IS" BASIS,
9
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
- See the License for the specific language governing permissions and
11
- limitations under the License.
2
+
12
3
  */
13
4
  export declare const TINA_HOST = "content.tinajs.io";
14
5
  export interface TinaClientArgs<GenQueries = Record<string, unknown>> {
@@ -38,6 +29,5 @@ export declare class TinaClient<GenQueries> {
38
29
  data: DataType;
39
30
  query: string;
40
31
  }>;
41
- parseURL: (overrideUrl: string) => TinaClientURLParts;
42
32
  }
43
33
  export declare function createClient<GenQueries>(args: TinaClientArgs<GenQueries>): TinaClient<GenQueries>;
@@ -1,14 +1,5 @@
1
1
  /**
2
- Copyright 2021 Forestry.io Holdings, Inc.
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
6
- http://www.apache.org/licenses/LICENSE-2.0
7
- Unless required by applicable law or agreed to in writing, software
8
- distributed under the License is distributed on an "AS IS" BASIS,
9
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
- See the License for the specific language governing permissions and
11
- limitations under the License.
2
+
12
3
  */
13
4
  export declare class TinaGQLClient {
14
5
  private _usedFrags;
@@ -1,14 +1,5 @@
1
1
  /**
2
- Copyright 2021 Forestry.io Holdings, Inc.
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
6
- http://www.apache.org/licenses/LICENSE-2.0
7
- Unless required by applicable law or agreed to in writing, software
8
- distributed under the License is distributed on an "AS IS" BASIS,
9
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
- See the License for the specific language governing permissions and
11
- limitations under the License.
2
+
12
3
  */
13
4
  import { Client } from '../internalClient';
14
5
  import type { TinaIOConfig } from '../internalClient';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinacms",
3
- "version": "1.1.5",
3
+ "version": "1.2.1",
4
4
  "main": "dist/index.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "exports": {
@@ -55,9 +55,9 @@
55
55
  "@headlessui/react": "^1.5.0",
56
56
  "@heroicons/react": "^1.0.4",
57
57
  "@react-hook/window-size": "^3.0.7",
58
- "@tinacms/schema-tools": "1.2.1",
59
- "@tinacms/sharedctx": "1.0.0",
60
- "@tinacms/toolkit": "1.3.1",
58
+ "@tinacms/schema-tools": "1.3.1",
59
+ "@tinacms/sharedctx": "1.0.1",
60
+ "@tinacms/toolkit": "1.3.3",
61
61
  "crypto-js": "^4.0.0",
62
62
  "encoding": "0.1.13",
63
63
  "fetch-ponyfill": "^7.1.0",
@@ -68,7 +68,6 @@
68
68
  "prism-react-renderer": "^1.3.5",
69
69
  "react-icons": "^4.3.1",
70
70
  "react-router-dom": "6",
71
- "url-pattern": "^1.0.3",
72
71
  "yup": "^0.32.0"
73
72
  },
74
73
  "devDependencies": {
@@ -77,7 +76,7 @@
77
76
  "@testing-library/react": "^12.0.0",
78
77
  "@testing-library/react-hooks": "^7.0.2",
79
78
  "@testing-library/user-event": "^12.7.0",
80
- "@tinacms/scripts": "1.0.1",
79
+ "@tinacms/scripts": "1.0.2",
81
80
  "@types/jest": "^27.0.1",
82
81
  "@types/lodash": "^4.14.169",
83
82
  "@types/node": "^14.0.13",
@@ -1,18 +0,0 @@
1
- /**
2
- Copyright 2021 Forestry.io Holdings, Inc.
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
6
- http://www.apache.org/licenses/LICENSE-2.0
7
- Unless required by applicable law or agreed to in writing, software
8
- distributed under the License is distributed on an "AS IS" BASIS,
9
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
- See the License for the specific language governing permissions and
11
- limitations under the License.
12
- */
13
- export declare const TINA_HOST = "content.tinajs.io";
14
- export declare const parseURL: (url: string) => {
15
- branch: any;
16
- isLocalClient: any;
17
- clientId: any;
18
- };