alinea 2.0.0-preview.3 → 2.0.0-preview.4
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/.init/content/pages/welcome.json +1 -1
- package/dist/LICENSES.md +144 -90
- package/dist/adapter/next/DevRemote.js +10 -2
- package/dist/adapter/next/previews.js +1 -0
- package/dist/backend/Handler.js +14 -7
- package/dist/backend/api/BasicAuth.d.ts +1 -1
- package/dist/backend/api/BasicAuth.js +14 -14
- package/dist/backend/api/OAuth2.d.ts +3 -3
- package/dist/backend/api/OAuth2.js +7 -4
- package/dist/bundled.d.ts +96 -25
- package/dist/chunks/{chunk-Y7XOMJOC.js → chunk-CFNRVI3Y.js} +220 -247
- package/dist/chunks/chunk-D6UJHBJJ.js +183 -0
- package/dist/chunks/chunk-TIJTT5ZI.js +228 -0
- package/dist/chunks/{chunk-HFBZMKIN.js → chunk-XMOVGDFI.js} +1 -1
- package/dist/cli/Serve.js +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/serve/LocalAuth.js +1 -1
- package/dist/cloud/AuthResult.d.ts +2 -0
- package/dist/cloud/CloudHandshake.d.ts +7 -0
- package/dist/cloud/CloudHandshake.js +64 -0
- package/dist/cloud/CloudRemote.d.ts +4 -1
- package/dist/cloud/CloudRemote.js +21 -3
- package/dist/components/Calendar.js +6 -6
- package/dist/components/Checkbox.js +2 -2
- package/dist/components/ComboBox.js +12 -12
- package/dist/components/DatePicker.js +4 -4
- package/dist/components/DateRangePicker.js +4 -4
- package/dist/components/Disclosure.js +6 -6
- package/dist/components/Label.js +6 -6
- package/dist/components/List.js +37 -37
- package/dist/components/Menu.js +4 -4
- package/dist/components/Modal.js +2 -2
- package/dist/components/MultipleSelect.js +23 -23
- package/dist/components/NumberField.js +5 -5
- package/dist/components/ProgressCircle.js +4 -4
- package/dist/components/SearchField.js +7 -7
- package/dist/components/Select.js +6 -6
- package/dist/components/Surface.js +1 -1
- package/dist/components/Table.js +8 -8
- package/dist/components/TextField.js +4 -4
- package/dist/components/TimeField.js +4 -4
- package/dist/components/Toggle.d.ts +1 -1
- package/dist/components/Toggle.js +2 -2
- package/dist/components/Toolbar.js +3 -3
- package/dist/components/Tooltip.js +2 -2
- package/dist/components/Tree.js +6 -6
- package/dist/core/Connection.d.ts +7 -4
- package/dist/core/Entry.d.ts +6 -0
- package/dist/core/Entry.js +10 -0
- package/dist/core/Id.d.ts +1 -0
- package/dist/core/Id.js +8 -0
- package/dist/core/db/Operation.js +4 -3
- package/dist/dashboard/App.js +30 -16
- package/dist/dashboard/StoryProvider.js +2 -2
- package/dist/dashboard/app/AccessDenied.js +3 -3
- package/dist/dashboard/app/ActivityStatus.js +23 -23
- package/dist/dashboard/app/AppShell.js +2 -2
- package/dist/dashboard/app/AppearanceToggle.d.ts +1 -0
- package/dist/dashboard/app/AppearanceToggle.js +43 -0
- package/dist/dashboard/app/AuthView.d.ts +1 -1
- package/dist/dashboard/app/AuthView.js +17 -19
- package/dist/dashboard/app/Badge.js +2 -2
- package/dist/dashboard/app/CompactField.js +17 -17
- package/dist/dashboard/app/DashboardErrorBoundary.js +23 -11
- package/dist/dashboard/app/DashboardLayout.js +15 -8
- package/dist/dashboard/app/DashboardMeta.d.ts +2 -1
- package/dist/dashboard/app/DashboardMeta.js +20 -5
- package/dist/dashboard/app/EntryFields.js +6 -6
- package/dist/dashboard/app/EntryHeader.js +27 -27
- package/dist/dashboard/app/EntryReferences.js +15 -15
- package/dist/dashboard/app/EntrySidebar.js +24 -24
- package/dist/dashboard/app/EntrySidebarPreview.js +20 -19
- package/dist/dashboard/app/EntryTranslationBanner.js +5 -5
- package/dist/dashboard/app/Explorer.js +64 -64
- package/dist/dashboard/app/ExplorerCards.js +46 -46
- package/dist/dashboard/app/ExplorerFileCard.js +19 -19
- package/dist/dashboard/app/ExplorerList.js +20 -20
- package/dist/dashboard/app/ExplorerModal.js +5 -5
- package/dist/dashboard/app/ExplorerPickerContent.js +2 -2
- package/dist/dashboard/app/ExplorerTable.js +63 -63
- package/dist/dashboard/app/ImagePicker.js +7 -7
- package/dist/dashboard/app/LinkPicker.js +17 -22
- package/dist/dashboard/app/LocaleMenu.js +10 -12
- package/dist/dashboard/app/SidebarLayout.js +4 -4
- package/dist/dashboard/app/SidebarTree.js +58 -58
- package/dist/dashboard/app/WorkspaceMenu.d.ts +10 -3
- package/dist/dashboard/app/WorkspaceMenu.js +88 -67
- package/dist/dashboard/app/WorkspaceMenu.stories.d.ts +2 -0
- package/dist/dashboard/app/WorkspaceRoots.d.ts +3 -1
- package/dist/dashboard/app/WorkspaceRoots.js +86 -111
- package/dist/dashboard/app/editor/FileEditor.js +29 -29
- package/dist/dashboard/app/editor/FilePreview.js +6 -6
- package/dist/dashboard/app/editor/MediaAltField.view.js +4 -4
- package/dist/dashboard/app/modals/CreateEntry.js +15 -15
- package/dist/dashboard/app/pages/EntryPage.js +29 -31
- package/dist/dashboard/app/pages/RootPage.js +4 -4
- package/dist/dashboard/app/pages/SplashPage.d.ts +3 -0
- package/dist/dashboard/app/pages/SplashPage.js +414 -0
- package/dist/dashboard/app/pages/UsersPage.js +42 -42
- package/dist/dashboard/app/ui/DashboardModal.js +16 -16
- package/dist/dashboard/app/ui/Rail.js +3 -3
- package/dist/dashboard/app/ui/Sidebar.js +2 -2
- package/dist/dashboard/atoms/ReactiveNode.js +1 -1
- package/dist/dashboard/atoms/activity.js +2 -3
- package/dist/dashboard/atoms/auth.d.ts +2 -0
- package/dist/dashboard/atoms/auth.js +6 -2
- package/dist/dashboard/atoms/config.js +1 -1
- package/dist/dashboard/atoms/core.js +2 -2
- package/dist/dashboard/atoms/create.js +1 -1
- package/dist/dashboard/atoms/dashboard.js +2 -2
- package/dist/dashboard/atoms/editor.js +1 -1
- package/dist/dashboard/atoms/entry.js +2 -2
- package/dist/dashboard/atoms/explorer.d.ts +1 -3
- package/dist/dashboard/atoms/explorer.js +7 -9
- package/dist/dashboard/atoms/graph.d.ts +1 -0
- package/dist/dashboard/atoms/graph.js +7 -2
- package/dist/dashboard/atoms/link.js +2 -2
- package/dist/dashboard/atoms/nav.d.ts +4 -3
- package/dist/dashboard/atoms/nav.js +10 -5
- package/dist/dashboard/atoms/preview.js +1 -1
- package/dist/dashboard/atoms/root.js +2 -2
- package/dist/dashboard/atoms/upload.js +1 -1
- package/dist/dashboard/atoms/user.d.ts +1 -1
- package/dist/dashboard/atoms/user.js +8 -6
- package/dist/dashboard/atoms/utils.js +2 -2
- package/dist/dashboard/boot/Boot.js +2 -4
- package/dist/dashboard/boot/DashboardWorker.js +34 -29
- package/dist/dashboard/editor/UseField.js +6 -6
- package/dist/dashboard/fixture/cms.d.ts +12 -0
- package/dist/dashboard/fixture/cms.js +53 -2
- package/dist/dashboard/hook/UseGraph.js +4 -4
- package/dist/dashboard/hook/UseRoot.js +4 -4
- package/dist/dashboard/hooks.js +16 -16
- package/dist/field/code/CodeField.view.js +12 -12
- package/dist/field/link/LinkField.view.js +56 -56
- package/dist/field/list/ListField.view.js +24 -24
- package/dist/field/localiser/LocalisedField.view.js +76 -5
- package/dist/field/metadata/MetadataField.view.js +19 -19
- package/dist/field/richtext/PickTextLink.js +6 -6
- package/dist/field/richtext/RichTextBlock.js +4 -4
- package/dist/field/richtext/RichTextBlocks.js +1 -1
- package/dist/field/richtext/RichTextExtensions.js +19 -19
- package/dist/field/richtext/RichTextField.view.js +6 -6
- package/dist/field/richtext/RichTextInsertMenu.js +3 -3
- package/dist/field/richtext/RichTextState.js +1 -1
- package/dist/field/text/TextField.view.js +2 -2
- package/dist/index.css +415 -28
- package/dist/preview/RegisterPreview.d.ts +1 -1
- package/dist/preview/RegisterPreview.js +4 -6
- package/dist/preview/react.d.ts +5 -1
- package/dist/preview/react.js +12 -9
- package/package.json +1 -1
- package/dist/chunks/chunk-STAJCW4Z.js +0 -322
- package/dist/chunks/chunk-U4VOHNR2.js +0 -210
package/dist/LICENSES.md
CHANGED
|
@@ -28,11 +28,11 @@ SOFTWARE.
|
|
|
28
28
|
|
|
29
29
|
===
|
|
30
30
|
|
|
31
|
-
#
|
|
31
|
+
# jotai@3.0.0 (MIT)
|
|
32
32
|
|
|
33
33
|
MIT License
|
|
34
34
|
|
|
35
|
-
Copyright (c)
|
|
35
|
+
Copyright (c) 2020 Poimandres
|
|
36
36
|
|
|
37
37
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
38
38
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -55,7 +55,7 @@ SOFTWARE.
|
|
|
55
55
|
|
|
56
56
|
===
|
|
57
57
|
|
|
58
|
-
#
|
|
58
|
+
# @internationalized/date@3.12.1 (Apache-2.0)
|
|
59
59
|
|
|
60
60
|
Apache License
|
|
61
61
|
Version 2.0, January 2004
|
|
@@ -262,7 +262,34 @@ SOFTWARE.
|
|
|
262
262
|
|
|
263
263
|
===
|
|
264
264
|
|
|
265
|
-
# @
|
|
265
|
+
# jotai-family@1.1.0 (MIT)
|
|
266
|
+
|
|
267
|
+
MIT License
|
|
268
|
+
|
|
269
|
+
Copyright (c) 2025 Poimandres
|
|
270
|
+
|
|
271
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
272
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
273
|
+
in the Software without restriction, including without limitation the rights
|
|
274
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
275
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
276
|
+
furnished to do so, subject to the following conditions:
|
|
277
|
+
|
|
278
|
+
The above copyright notice and this permission notice shall be included in all
|
|
279
|
+
copies or substantial portions of the Software.
|
|
280
|
+
|
|
281
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
282
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
283
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
284
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
285
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
286
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
287
|
+
SOFTWARE.
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
===
|
|
291
|
+
|
|
292
|
+
# react-stately@3.46.0 (Apache-2.0)
|
|
266
293
|
|
|
267
294
|
Apache License
|
|
268
295
|
Version 2.0, January 2004
|
|
@@ -467,6 +494,33 @@ SOFTWARE.
|
|
|
467
494
|
limitations under the License.
|
|
468
495
|
|
|
469
496
|
|
|
497
|
+
===
|
|
498
|
+
|
|
499
|
+
# microcbor@1.2.1 (MIT)
|
|
500
|
+
|
|
501
|
+
MIT License
|
|
502
|
+
|
|
503
|
+
Copyright (c) 2021 Joel Gustafson
|
|
504
|
+
|
|
505
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
506
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
507
|
+
in the Software without restriction, including without limitation the rights
|
|
508
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
509
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
510
|
+
furnished to do so, subject to the following conditions:
|
|
511
|
+
|
|
512
|
+
The above copyright notice and this permission notice shall be included in all
|
|
513
|
+
copies or substantial portions of the Software.
|
|
514
|
+
|
|
515
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
516
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
517
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
518
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
519
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
520
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
521
|
+
SOFTWARE.
|
|
522
|
+
|
|
523
|
+
|
|
470
524
|
===
|
|
471
525
|
|
|
472
526
|
# @tiptap/core@3.30.5 (MIT)
|
|
@@ -496,7 +550,7 @@ SOFTWARE.
|
|
|
496
550
|
|
|
497
551
|
===
|
|
498
552
|
|
|
499
|
-
# react-
|
|
553
|
+
# react-aria-components@1.17.0 (Apache-2.0)
|
|
500
554
|
|
|
501
555
|
Apache License
|
|
502
556
|
Version 2.0, January 2004
|
|
@@ -728,33 +782,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
728
782
|
THE SOFTWARE.
|
|
729
783
|
|
|
730
784
|
|
|
731
|
-
===
|
|
732
|
-
|
|
733
|
-
# @badgateway/oauth2-client@3.3.1 (MIT)
|
|
734
|
-
|
|
735
|
-
MIT License
|
|
736
|
-
|
|
737
|
-
Copyright (c) 2019-2025 Evert Pot
|
|
738
|
-
|
|
739
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
740
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
741
|
-
in the Software without restriction, including without limitation the rights
|
|
742
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
743
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
744
|
-
furnished to do so, subject to the following conditions:
|
|
745
|
-
|
|
746
|
-
The above copyright notice and this permission notice shall be included in all
|
|
747
|
-
copies or substantial portions of the Software.
|
|
748
|
-
|
|
749
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
750
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
751
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
752
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
753
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
754
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
755
|
-
SOFTWARE.
|
|
756
|
-
|
|
757
|
-
|
|
758
785
|
===
|
|
759
786
|
|
|
760
787
|
# react-aria@3.48.0 (Apache-2.0)
|
|
@@ -962,60 +989,6 @@ SOFTWARE.
|
|
|
962
989
|
limitations under the License.
|
|
963
990
|
|
|
964
991
|
|
|
965
|
-
===
|
|
966
|
-
|
|
967
|
-
# @tiptap/extension-list@3.30.5 (MIT)
|
|
968
|
-
|
|
969
|
-
MIT License
|
|
970
|
-
|
|
971
|
-
Copyright (c) 2025, Tiptap GmbH
|
|
972
|
-
|
|
973
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
974
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
975
|
-
in the Software without restriction, including without limitation the rights
|
|
976
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
977
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
978
|
-
furnished to do so, subject to the following conditions:
|
|
979
|
-
|
|
980
|
-
The above copyright notice and this permission notice shall be included in all
|
|
981
|
-
copies or substantial portions of the Software.
|
|
982
|
-
|
|
983
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
984
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
985
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
986
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
987
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
988
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
989
|
-
SOFTWARE.
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
===
|
|
993
|
-
|
|
994
|
-
# use-sync-external-store@1.6.0 (MIT)
|
|
995
|
-
|
|
996
|
-
MIT License
|
|
997
|
-
|
|
998
|
-
Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
999
|
-
|
|
1000
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1001
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
1002
|
-
in the Software without restriction, including without limitation the rights
|
|
1003
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1004
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
1005
|
-
furnished to do so, subject to the following conditions:
|
|
1006
|
-
|
|
1007
|
-
The above copyright notice and this permission notice shall be included in all
|
|
1008
|
-
copies or substantial portions of the Software.
|
|
1009
|
-
|
|
1010
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1011
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1012
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1013
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1014
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1015
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1016
|
-
SOFTWARE.
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
992
|
===
|
|
1020
993
|
|
|
1021
994
|
# htmlparser2@9.1.0 (MIT)
|
|
@@ -1041,11 +1014,11 @@ IN THE SOFTWARE.
|
|
|
1041
1014
|
|
|
1042
1015
|
===
|
|
1043
1016
|
|
|
1044
|
-
#
|
|
1017
|
+
# @badgateway/oauth2-client@3.3.1 (MIT)
|
|
1045
1018
|
|
|
1046
1019
|
MIT License
|
|
1047
1020
|
|
|
1048
|
-
Copyright (c)
|
|
1021
|
+
Copyright (c) 2019-2025 Evert Pot
|
|
1049
1022
|
|
|
1050
1023
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1051
1024
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -1117,6 +1090,87 @@ THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRE
|
|
|
1117
1090
|
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
1118
1091
|
|
|
1119
1092
|
|
|
1093
|
+
===
|
|
1094
|
+
|
|
1095
|
+
# @tiptap/extension-list@3.30.5 (MIT)
|
|
1096
|
+
|
|
1097
|
+
MIT License
|
|
1098
|
+
|
|
1099
|
+
Copyright (c) 2025, Tiptap GmbH
|
|
1100
|
+
|
|
1101
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1102
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
1103
|
+
in the Software without restriction, including without limitation the rights
|
|
1104
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1105
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
1106
|
+
furnished to do so, subject to the following conditions:
|
|
1107
|
+
|
|
1108
|
+
The above copyright notice and this permission notice shall be included in all
|
|
1109
|
+
copies or substantial portions of the Software.
|
|
1110
|
+
|
|
1111
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1112
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1113
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1114
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1115
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1116
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1117
|
+
SOFTWARE.
|
|
1118
|
+
|
|
1119
|
+
|
|
1120
|
+
===
|
|
1121
|
+
|
|
1122
|
+
# fp16@1.0.0 (MIT)
|
|
1123
|
+
|
|
1124
|
+
MIT License
|
|
1125
|
+
|
|
1126
|
+
Copyright (c) 2021 Joel Gustafson
|
|
1127
|
+
|
|
1128
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1129
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
1130
|
+
in the Software without restriction, including without limitation the rights
|
|
1131
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1132
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
1133
|
+
furnished to do so, subject to the following conditions:
|
|
1134
|
+
|
|
1135
|
+
The above copyright notice and this permission notice shall be included in all
|
|
1136
|
+
copies or substantial portions of the Software.
|
|
1137
|
+
|
|
1138
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1139
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1140
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1141
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1142
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1143
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1144
|
+
SOFTWARE.
|
|
1145
|
+
|
|
1146
|
+
|
|
1147
|
+
===
|
|
1148
|
+
|
|
1149
|
+
# use-sync-external-store@1.6.0 (MIT)
|
|
1150
|
+
|
|
1151
|
+
MIT License
|
|
1152
|
+
|
|
1153
|
+
Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1154
|
+
|
|
1155
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1156
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
1157
|
+
in the Software without restriction, including without limitation the rights
|
|
1158
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1159
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
1160
|
+
furnished to do so, subject to the following conditions:
|
|
1161
|
+
|
|
1162
|
+
The above copyright notice and this permission notice shall be included in all
|
|
1163
|
+
copies or substantial portions of the Software.
|
|
1164
|
+
|
|
1165
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1166
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1167
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1168
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1169
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1170
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1171
|
+
SOFTWARE.
|
|
1172
|
+
|
|
1173
|
+
|
|
1120
1174
|
===
|
|
1121
1175
|
|
|
1122
1176
|
# dom-serializer@2.0.0 (MIT)
|
|
@@ -1136,7 +1190,7 @@ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
1136
1190
|
|
|
1137
1191
|
===
|
|
1138
1192
|
|
|
1139
|
-
# @internationalized/
|
|
1193
|
+
# @internationalized/number@3.6.6 (Apache-2.0)
|
|
1140
1194
|
|
|
1141
1195
|
Apache License
|
|
1142
1196
|
Version 2.0, January 2004
|
|
@@ -1343,7 +1397,7 @@ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
1343
1397
|
|
|
1344
1398
|
===
|
|
1345
1399
|
|
|
1346
|
-
# @internationalized/
|
|
1400
|
+
# @internationalized/string@3.2.8 (Apache-2.0)
|
|
1347
1401
|
|
|
1348
1402
|
Apache License
|
|
1349
1403
|
Version 2.0, January 2004
|
|
@@ -12,8 +12,16 @@ function createDevRemote(context, config) {
|
|
|
12
12
|
applyAuth: context.applyAuth
|
|
13
13
|
});
|
|
14
14
|
const auth = {
|
|
15
|
-
async authenticate() {
|
|
16
|
-
|
|
15
|
+
async authenticate(_request, options) {
|
|
16
|
+
const user = await client.user();
|
|
17
|
+
if (!user)
|
|
18
|
+
throw new MissingCredentialsError(
|
|
19
|
+
"Missing forwarded development authentication"
|
|
20
|
+
);
|
|
21
|
+
return Response.json({
|
|
22
|
+
type: AuthResultType.Authenticated,
|
|
23
|
+
...await options.authenticated(user)
|
|
24
|
+
});
|
|
17
25
|
},
|
|
18
26
|
async verify() {
|
|
19
27
|
const user = await client.user();
|
|
@@ -24,6 +24,7 @@ function NextPreviews({
|
|
|
24
24
|
if (root) entryParams.set("root", root);
|
|
25
25
|
const editUrl = new URL(`#/edit?${entryParams}`, adminUrl);
|
|
26
26
|
const { isPreviewing } = usePreview({
|
|
27
|
+
hostOrigin: adminUrl.origin,
|
|
27
28
|
async preview(update) {
|
|
28
29
|
if (!update) return;
|
|
29
30
|
const success = await setPreviewCookies(update.payload);
|
package/dist/backend/Handler.js
CHANGED
|
@@ -59,9 +59,19 @@ function createHandler({
|
|
|
59
59
|
let cnx = remote(context);
|
|
60
60
|
let userCtx;
|
|
61
61
|
if (auth) {
|
|
62
|
-
return cnx.authenticate(request, {
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
return await cnx.authenticate(request, {
|
|
63
|
+
async authenticated(user) {
|
|
64
|
+
try {
|
|
65
|
+
return {
|
|
66
|
+
user: await cnx.enrichUser(user),
|
|
67
|
+
capabilities: await cnx.capabilities()
|
|
68
|
+
};
|
|
69
|
+
} catch (cause) {
|
|
70
|
+
if (cause instanceof HttpError) throw cause;
|
|
71
|
+
throw new HttpError(500, "Failed to complete authentication", {
|
|
72
|
+
cause
|
|
73
|
+
});
|
|
74
|
+
}
|
|
65
75
|
}
|
|
66
76
|
});
|
|
67
77
|
}
|
|
@@ -72,10 +82,7 @@ function createHandler({
|
|
|
72
82
|
};
|
|
73
83
|
if (action === HandleAction.Capabilities && request.method === "GET") {
|
|
74
84
|
expectJson();
|
|
75
|
-
|
|
76
|
-
return Response.json(
|
|
77
|
-
capabilities ? await capabilities() : { users: typeof cnx.listUsers === "function" }
|
|
78
|
-
);
|
|
85
|
+
return Response.json(await cnx.capabilities());
|
|
79
86
|
}
|
|
80
87
|
if (action === HandleAction.Upload && request.method === "GET") {
|
|
81
88
|
const entryId = url.searchParams.get("entryId");
|
|
@@ -7,6 +7,6 @@ export interface Verifier {
|
|
|
7
7
|
export declare class BasicAuth implements AuthApi {
|
|
8
8
|
#private;
|
|
9
9
|
constructor(context: RequestContext, verify: Verifier);
|
|
10
|
-
authenticate(request: Request, options
|
|
10
|
+
authenticate(request: Request, options: AuthOptions): Promise<Response>;
|
|
11
11
|
verify(request: Request): Promise<AuthedContext>;
|
|
12
12
|
}
|
|
@@ -16,24 +16,24 @@ var BasicAuth = class {
|
|
|
16
16
|
this.#verify = verify;
|
|
17
17
|
}
|
|
18
18
|
async authenticate(request, options) {
|
|
19
|
+
let verified;
|
|
19
20
|
try {
|
|
20
|
-
|
|
21
|
-
const url = new URL(request.url);
|
|
22
|
-
const action = url.searchParams.get("auth");
|
|
23
|
-
switch (action) {
|
|
24
|
-
case AuthAction.Status: {
|
|
25
|
-
const user = options?.enrichUser ? await options.enrichUser(verified.user) : verified.user;
|
|
26
|
-
return Response.json({
|
|
27
|
-
type: AuthResultType.Authenticated,
|
|
28
|
-
user
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
default:
|
|
32
|
-
return new Response("Bad request", { status: 400 });
|
|
33
|
-
}
|
|
21
|
+
verified = await this.verify(request);
|
|
34
22
|
} catch {
|
|
35
23
|
return unauthorized();
|
|
36
24
|
}
|
|
25
|
+
const url = new URL(request.url);
|
|
26
|
+
const action = url.searchParams.get("auth");
|
|
27
|
+
switch (action) {
|
|
28
|
+
case AuthAction.Status: {
|
|
29
|
+
return Response.json({
|
|
30
|
+
type: AuthResultType.Authenticated,
|
|
31
|
+
...await options.authenticated(verified.user)
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
default:
|
|
35
|
+
return new Response("Bad request", { status: 400 });
|
|
36
|
+
}
|
|
37
37
|
}
|
|
38
38
|
async verify(request) {
|
|
39
39
|
const ctx = this.#context;
|
|
@@ -38,14 +38,14 @@ export interface OAuth2Options {
|
|
|
38
38
|
*/
|
|
39
39
|
revocationEndpoint?: string;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Validate provider-specific claims, including `iss` and `aud`.
|
|
42
42
|
* If the claims are invalid, an error should be thrown.
|
|
43
43
|
*/
|
|
44
|
-
validateClaims
|
|
44
|
+
validateClaims(claims: JWTPayload): void | Promise<void>;
|
|
45
45
|
}
|
|
46
46
|
export declare class OAuth2 implements AuthApi {
|
|
47
47
|
#private;
|
|
48
48
|
constructor(context: RequestContext, config: Config, options: OAuth2Options);
|
|
49
|
-
authenticate(request: Request, options
|
|
49
|
+
authenticate(request: Request, options: AuthOptions): Promise<Response>;
|
|
50
50
|
verify(request: Request): Promise<AuthedContext>;
|
|
51
51
|
}
|
|
@@ -469,6 +469,10 @@ var OAuth2 = class {
|
|
|
469
469
|
#jwks;
|
|
470
470
|
#validateClaims;
|
|
471
471
|
constructor(context, config, options) {
|
|
472
|
+
assert(
|
|
473
|
+
typeof options.validateClaims === "function",
|
|
474
|
+
"OAuth2 validateClaims is required"
|
|
475
|
+
);
|
|
472
476
|
this.#context = context;
|
|
473
477
|
this.#config = config;
|
|
474
478
|
this.#validateClaims = options.validateClaims;
|
|
@@ -514,10 +518,9 @@ var OAuth2 = class {
|
|
|
514
518
|
const [ctx, err] = await outcome(this.verify(request));
|
|
515
519
|
if (err instanceof Response) return err;
|
|
516
520
|
if (ctx) {
|
|
517
|
-
const user = options?.enrichUser ? await options.enrichUser(ctx.user) : ctx.user;
|
|
518
521
|
return Response.json({
|
|
519
522
|
type: AuthResultType.Authenticated,
|
|
520
|
-
user
|
|
523
|
+
...await options.authenticated(ctx.user)
|
|
521
524
|
});
|
|
522
525
|
}
|
|
523
526
|
const codeVerifier = await generateCodeVerifier();
|
|
@@ -615,7 +618,7 @@ var OAuth2 = class {
|
|
|
615
618
|
throw new MissingCredentialsError("Missing access token cookie");
|
|
616
619
|
const key = selectKey(jwks, accessToken);
|
|
617
620
|
const user = await verify(accessToken, key);
|
|
618
|
-
this.#validateClaims
|
|
621
|
+
await this.#validateClaims(user);
|
|
619
622
|
assert(user.exp, "Missing exp claim in access token");
|
|
620
623
|
const expiresSoon = user.exp - Math.floor(Date.now() / 1e3) < 30;
|
|
621
624
|
if (expiresSoon && refreshToken)
|
|
@@ -637,7 +640,7 @@ var OAuth2 = class {
|
|
|
637
640
|
cause: [cause, error]
|
|
638
641
|
});
|
|
639
642
|
});
|
|
640
|
-
this.#validateClaims
|
|
643
|
+
await this.#validateClaims(user);
|
|
641
644
|
throw Response.json(
|
|
642
645
|
{ type: AuthResultType.NeedsRefresh },
|
|
643
646
|
{
|