manifest-editor 1.3.0 → 1.4.0

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.cjs CHANGED
@@ -35,8 +35,9 @@ __export(src_exports, {
35
35
  module.exports = __toCommonJS(src_exports);
36
36
 
37
37
  // src/ManifestEditor.tsx
38
- var import_shell = require("@manifest-editor/shell");
38
+ var import_collection_preset = require("@manifest-editor/collection-preset");
39
39
  var manifestEditorPreset = __toESM(require("@manifest-editor/manifest-preset"), 1);
40
+ var import_shell = require("@manifest-editor/shell");
40
41
  var import_react_iiif_vault = require("react-iiif-vault");
41
42
 
42
43
  // ../../node_modules/.pnpm/tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js
@@ -61,9 +62,20 @@ function ManifestEditor(props) {
61
62
  const vault = (0, import_react_iiif_vault.useExistingVault)(props.vault);
62
63
  invariant(props.resource);
63
64
  invariant(props.data, "Data is required");
64
- invariant(props.resource.type === "Manifest", "Only Manifests are supported at the moment");
65
65
  if (!vault.requestStatus(props.resource.id)) {
66
66
  vault.loadManifestSync(props.resource.id, props.data);
67
67
  }
68
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_shell.AppProvider, { appId: "manifest-editor", definition: manifestEditor, instanceId: "test-1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_iiif_vault.VaultProvider, { vault, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_shell.ShellProvider, { resource: props.resource, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_shell.Layout, {}) }) }) });
68
+ let preset = null;
69
+ let appId = null;
70
+ if (props.resource.type === "Manifest") {
71
+ preset = manifestEditor;
72
+ appId = manifestEditor.metadata.id;
73
+ } else if (props.resource.type === "Collection") {
74
+ preset = import_collection_preset.collectionPreset;
75
+ appId = import_collection_preset.collectionPreset.metadata.id;
76
+ }
77
+ if (preset === null || appId === null) {
78
+ return null;
79
+ }
80
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_shell.AppProvider, { appId, definition: preset, instanceId: "test-1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_iiif_vault.VaultProvider, { vault, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_shell.ShellProvider, { resource: props.resource, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_shell.Layout, {}) }) }) });
69
81
  }
package/dist/index.css CHANGED
@@ -896,6 +896,620 @@
896
896
  max-width: 1536px;
897
897
  }
898
898
  }
899
+ .prose {
900
+ color: var(--tw-prose-body);
901
+ max-width: 65ch;
902
+ }
903
+ .prose :where(p):not(:where([class~=not-prose], [class~=not-prose] *)) {
904
+ margin-top: 1.25em;
905
+ margin-bottom: 1.25em;
906
+ }
907
+ .prose :where([class~=lead]):not(:where([class~=not-prose], [class~=not-prose] *)) {
908
+ color: var(--tw-prose-lead);
909
+ font-size: 1.25em;
910
+ line-height: 1.6;
911
+ margin-top: 1.2em;
912
+ margin-bottom: 1.2em;
913
+ }
914
+ .prose :where(a):not(:where([class~=not-prose], [class~=not-prose] *)) {
915
+ color: var(--tw-prose-links);
916
+ text-decoration: underline;
917
+ font-weight: 500;
918
+ }
919
+ .prose :where(strong):not(:where([class~=not-prose], [class~=not-prose] *)) {
920
+ color: var(--tw-prose-bold);
921
+ font-weight: 600;
922
+ }
923
+ .prose :where(a strong):not(:where([class~=not-prose], [class~=not-prose] *)) {
924
+ color: inherit;
925
+ }
926
+ .prose :where(blockquote strong):not(:where([class~=not-prose], [class~=not-prose] *)) {
927
+ color: inherit;
928
+ }
929
+ .prose :where(thead th strong):not(:where([class~=not-prose], [class~=not-prose] *)) {
930
+ color: inherit;
931
+ }
932
+ .prose :where(ol):not(:where([class~=not-prose], [class~=not-prose] *)) {
933
+ list-style-type: decimal;
934
+ margin-top: 1.25em;
935
+ margin-bottom: 1.25em;
936
+ padding-inline-start: 1.625em;
937
+ }
938
+ .prose :where(ol[type=A]):not(:where([class~=not-prose], [class~=not-prose] *)) {
939
+ list-style-type: upper-alpha;
940
+ }
941
+ .prose :where(ol[type=a]):not(:where([class~=not-prose], [class~=not-prose] *)) {
942
+ list-style-type: lower-alpha;
943
+ }
944
+ .prose :where(ol[type=A s]):not(:where([class~=not-prose], [class~=not-prose] *)) {
945
+ list-style-type: upper-alpha;
946
+ }
947
+ .prose :where(ol[type=a s]):not(:where([class~=not-prose], [class~=not-prose] *)) {
948
+ list-style-type: lower-alpha;
949
+ }
950
+ .prose :where(ol[type=I]):not(:where([class~=not-prose], [class~=not-prose] *)) {
951
+ list-style-type: upper-roman;
952
+ }
953
+ .prose :where(ol[type=i]):not(:where([class~=not-prose], [class~=not-prose] *)) {
954
+ list-style-type: lower-roman;
955
+ }
956
+ .prose :where(ol[type=I s]):not(:where([class~=not-prose], [class~=not-prose] *)) {
957
+ list-style-type: upper-roman;
958
+ }
959
+ .prose :where(ol[type=i s]):not(:where([class~=not-prose], [class~=not-prose] *)) {
960
+ list-style-type: lower-roman;
961
+ }
962
+ .prose :where(ol[type="1"]):not(:where([class~=not-prose], [class~=not-prose] *)) {
963
+ list-style-type: decimal;
964
+ }
965
+ .prose :where(ul):not(:where([class~=not-prose], [class~=not-prose] *)) {
966
+ list-style-type: disc;
967
+ margin-top: 1.25em;
968
+ margin-bottom: 1.25em;
969
+ padding-inline-start: 1.625em;
970
+ }
971
+ .prose :where(ol > li):not(:where([class~=not-prose], [class~=not-prose] *))::marker {
972
+ font-weight: 400;
973
+ color: var(--tw-prose-counters);
974
+ }
975
+ .prose :where(ul > li):not(:where([class~=not-prose], [class~=not-prose] *))::marker {
976
+ color: var(--tw-prose-bullets);
977
+ }
978
+ .prose :where(dt):not(:where([class~=not-prose], [class~=not-prose] *)) {
979
+ color: var(--tw-prose-headings);
980
+ font-weight: 600;
981
+ margin-top: 1.25em;
982
+ }
983
+ .prose :where(hr):not(:where([class~=not-prose], [class~=not-prose] *)) {
984
+ border-color: var(--tw-prose-hr);
985
+ border-top-width: 1px;
986
+ margin-top: 3em;
987
+ margin-bottom: 3em;
988
+ }
989
+ .prose :where(blockquote):not(:where([class~=not-prose], [class~=not-prose] *)) {
990
+ font-weight: 500;
991
+ font-style: italic;
992
+ color: var(--tw-prose-quotes);
993
+ border-inline-start-width: 0.25rem;
994
+ border-inline-start-color: var(--tw-prose-quote-borders);
995
+ quotes: "\201c""\201d""\2018""\2019";
996
+ margin-top: 1.6em;
997
+ margin-bottom: 1.6em;
998
+ padding-inline-start: 1em;
999
+ }
1000
+ .prose :where(blockquote p:first-of-type):not(:where([class~=not-prose], [class~=not-prose] *))::before {
1001
+ content: open-quote;
1002
+ }
1003
+ .prose :where(blockquote p:last-of-type):not(:where([class~=not-prose], [class~=not-prose] *))::after {
1004
+ content: close-quote;
1005
+ }
1006
+ .prose :where(h1):not(:where([class~=not-prose], [class~=not-prose] *)) {
1007
+ color: var(--tw-prose-headings);
1008
+ font-weight: 800;
1009
+ font-size: 2.25em;
1010
+ margin-top: 0;
1011
+ margin-bottom: 0.8888889em;
1012
+ line-height: 1.1111111;
1013
+ }
1014
+ .prose :where(h1 strong):not(:where([class~=not-prose], [class~=not-prose] *)) {
1015
+ font-weight: 900;
1016
+ color: inherit;
1017
+ }
1018
+ .prose :where(h2):not(:where([class~=not-prose], [class~=not-prose] *)) {
1019
+ color: var(--tw-prose-headings);
1020
+ font-weight: 700;
1021
+ font-size: 1.5em;
1022
+ margin-top: 2em;
1023
+ margin-bottom: 1em;
1024
+ line-height: 1.3333333;
1025
+ }
1026
+ .prose :where(h2 strong):not(:where([class~=not-prose], [class~=not-prose] *)) {
1027
+ font-weight: 800;
1028
+ color: inherit;
1029
+ }
1030
+ .prose :where(h3):not(:where([class~=not-prose], [class~=not-prose] *)) {
1031
+ color: var(--tw-prose-headings);
1032
+ font-weight: 600;
1033
+ font-size: 1.25em;
1034
+ margin-top: 1.6em;
1035
+ margin-bottom: 0.6em;
1036
+ line-height: 1.6;
1037
+ }
1038
+ .prose :where(h3 strong):not(:where([class~=not-prose], [class~=not-prose] *)) {
1039
+ font-weight: 700;
1040
+ color: inherit;
1041
+ }
1042
+ .prose :where(h4):not(:where([class~=not-prose], [class~=not-prose] *)) {
1043
+ color: var(--tw-prose-headings);
1044
+ font-weight: 600;
1045
+ margin-top: 1.5em;
1046
+ margin-bottom: 0.5em;
1047
+ line-height: 1.5;
1048
+ }
1049
+ .prose :where(h4 strong):not(:where([class~=not-prose], [class~=not-prose] *)) {
1050
+ font-weight: 700;
1051
+ color: inherit;
1052
+ }
1053
+ .prose :where(img):not(:where([class~=not-prose], [class~=not-prose] *)) {
1054
+ margin-top: 2em;
1055
+ margin-bottom: 2em;
1056
+ }
1057
+ .prose :where(picture):not(:where([class~=not-prose], [class~=not-prose] *)) {
1058
+ display: block;
1059
+ margin-top: 2em;
1060
+ margin-bottom: 2em;
1061
+ }
1062
+ .prose :where(video):not(:where([class~=not-prose], [class~=not-prose] *)) {
1063
+ margin-top: 2em;
1064
+ margin-bottom: 2em;
1065
+ }
1066
+ .prose :where(kbd):not(:where([class~=not-prose], [class~=not-prose] *)) {
1067
+ font-weight: 500;
1068
+ font-family: inherit;
1069
+ color: var(--tw-prose-kbd);
1070
+ box-shadow: 0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%), 0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);
1071
+ font-size: 0.875em;
1072
+ border-radius: 0.3125rem;
1073
+ padding-top: 0.1875em;
1074
+ padding-inline-end: 0.375em;
1075
+ padding-bottom: 0.1875em;
1076
+ padding-inline-start: 0.375em;
1077
+ }
1078
+ .prose :where(code):not(:where([class~=not-prose], [class~=not-prose] *)) {
1079
+ color: var(--tw-prose-code);
1080
+ font-weight: 600;
1081
+ font-size: 0.875em;
1082
+ }
1083
+ .prose :where(code):not(:where([class~=not-prose], [class~=not-prose] *))::before {
1084
+ content: "`";
1085
+ }
1086
+ .prose :where(code):not(:where([class~=not-prose], [class~=not-prose] *))::after {
1087
+ content: "`";
1088
+ }
1089
+ .prose :where(a code):not(:where([class~=not-prose], [class~=not-prose] *)) {
1090
+ color: inherit;
1091
+ }
1092
+ .prose :where(h1 code):not(:where([class~=not-prose], [class~=not-prose] *)) {
1093
+ color: inherit;
1094
+ }
1095
+ .prose :where(h2 code):not(:where([class~=not-prose], [class~=not-prose] *)) {
1096
+ color: inherit;
1097
+ font-size: 0.875em;
1098
+ }
1099
+ .prose :where(h3 code):not(:where([class~=not-prose], [class~=not-prose] *)) {
1100
+ color: inherit;
1101
+ font-size: 0.9em;
1102
+ }
1103
+ .prose :where(h4 code):not(:where([class~=not-prose], [class~=not-prose] *)) {
1104
+ color: inherit;
1105
+ }
1106
+ .prose :where(blockquote code):not(:where([class~=not-prose], [class~=not-prose] *)) {
1107
+ color: inherit;
1108
+ }
1109
+ .prose :where(thead th code):not(:where([class~=not-prose], [class~=not-prose] *)) {
1110
+ color: inherit;
1111
+ }
1112
+ .prose :where(pre):not(:where([class~=not-prose], [class~=not-prose] *)) {
1113
+ color: var(--tw-prose-pre-code);
1114
+ background-color: var(--tw-prose-pre-bg);
1115
+ overflow-x: auto;
1116
+ font-weight: 400;
1117
+ font-size: 0.875em;
1118
+ line-height: 1.7142857;
1119
+ margin-top: 1.7142857em;
1120
+ margin-bottom: 1.7142857em;
1121
+ border-radius: 0.375rem;
1122
+ padding-top: 0.8571429em;
1123
+ padding-inline-end: 1.1428571em;
1124
+ padding-bottom: 0.8571429em;
1125
+ padding-inline-start: 1.1428571em;
1126
+ }
1127
+ .prose :where(pre code):not(:where([class~=not-prose], [class~=not-prose] *)) {
1128
+ background-color: transparent;
1129
+ border-width: 0;
1130
+ border-radius: 0;
1131
+ padding: 0;
1132
+ font-weight: inherit;
1133
+ color: inherit;
1134
+ font-size: inherit;
1135
+ font-family: inherit;
1136
+ line-height: inherit;
1137
+ }
1138
+ .prose :where(pre code):not(:where([class~=not-prose], [class~=not-prose] *))::before {
1139
+ content: none;
1140
+ }
1141
+ .prose :where(pre code):not(:where([class~=not-prose], [class~=not-prose] *))::after {
1142
+ content: none;
1143
+ }
1144
+ .prose :where(table):not(:where([class~=not-prose], [class~=not-prose] *)) {
1145
+ width: 100%;
1146
+ table-layout: auto;
1147
+ text-align: start;
1148
+ margin-top: 2em;
1149
+ margin-bottom: 2em;
1150
+ font-size: 0.875em;
1151
+ line-height: 1.7142857;
1152
+ }
1153
+ .prose :where(thead):not(:where([class~=not-prose], [class~=not-prose] *)) {
1154
+ border-bottom-width: 1px;
1155
+ border-bottom-color: var(--tw-prose-th-borders);
1156
+ }
1157
+ .prose :where(thead th):not(:where([class~=not-prose], [class~=not-prose] *)) {
1158
+ color: var(--tw-prose-headings);
1159
+ font-weight: 600;
1160
+ vertical-align: bottom;
1161
+ padding-inline-end: 0.5714286em;
1162
+ padding-bottom: 0.5714286em;
1163
+ padding-inline-start: 0.5714286em;
1164
+ }
1165
+ .prose :where(tbody tr):not(:where([class~=not-prose], [class~=not-prose] *)) {
1166
+ border-bottom-width: 1px;
1167
+ border-bottom-color: var(--tw-prose-td-borders);
1168
+ }
1169
+ .prose :where(tbody tr:last-child):not(:where([class~=not-prose], [class~=not-prose] *)) {
1170
+ border-bottom-width: 0;
1171
+ }
1172
+ .prose :where(tbody td):not(:where([class~=not-prose], [class~=not-prose] *)) {
1173
+ vertical-align: baseline;
1174
+ }
1175
+ .prose :where(tfoot):not(:where([class~=not-prose], [class~=not-prose] *)) {
1176
+ border-top-width: 1px;
1177
+ border-top-color: var(--tw-prose-th-borders);
1178
+ }
1179
+ .prose :where(tfoot td):not(:where([class~=not-prose], [class~=not-prose] *)) {
1180
+ vertical-align: top;
1181
+ }
1182
+ .prose :where(figure > *):not(:where([class~=not-prose], [class~=not-prose] *)) {
1183
+ margin-top: 0;
1184
+ margin-bottom: 0;
1185
+ }
1186
+ .prose :where(figcaption):not(:where([class~=not-prose], [class~=not-prose] *)) {
1187
+ color: var(--tw-prose-captions);
1188
+ font-size: 0.875em;
1189
+ line-height: 1.4285714;
1190
+ margin-top: 0.8571429em;
1191
+ }
1192
+ .prose {
1193
+ --tw-prose-body: #374151;
1194
+ --tw-prose-headings: #111827;
1195
+ --tw-prose-lead: #4b5563;
1196
+ --tw-prose-links: #111827;
1197
+ --tw-prose-bold: #111827;
1198
+ --tw-prose-counters: #6b7280;
1199
+ --tw-prose-bullets: #d1d5db;
1200
+ --tw-prose-hr: #e5e7eb;
1201
+ --tw-prose-quotes: #111827;
1202
+ --tw-prose-quote-borders: #e5e7eb;
1203
+ --tw-prose-captions: #6b7280;
1204
+ --tw-prose-kbd: #111827;
1205
+ --tw-prose-kbd-shadows: 17 24 39;
1206
+ --tw-prose-code: #111827;
1207
+ --tw-prose-pre-code: #e5e7eb;
1208
+ --tw-prose-pre-bg: #1f2937;
1209
+ --tw-prose-th-borders: #d1d5db;
1210
+ --tw-prose-td-borders: #e5e7eb;
1211
+ --tw-prose-invert-body: #d1d5db;
1212
+ --tw-prose-invert-headings: #fff;
1213
+ --tw-prose-invert-lead: #9ca3af;
1214
+ --tw-prose-invert-links: #fff;
1215
+ --tw-prose-invert-bold: #fff;
1216
+ --tw-prose-invert-counters: #9ca3af;
1217
+ --tw-prose-invert-bullets: #4b5563;
1218
+ --tw-prose-invert-hr: #374151;
1219
+ --tw-prose-invert-quotes: #f3f4f6;
1220
+ --tw-prose-invert-quote-borders: #374151;
1221
+ --tw-prose-invert-captions: #9ca3af;
1222
+ --tw-prose-invert-kbd: #fff;
1223
+ --tw-prose-invert-kbd-shadows: 255 255 255;
1224
+ --tw-prose-invert-code: #fff;
1225
+ --tw-prose-invert-pre-code: #d1d5db;
1226
+ --tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);
1227
+ --tw-prose-invert-th-borders: #4b5563;
1228
+ --tw-prose-invert-td-borders: #374151;
1229
+ font-size: 1rem;
1230
+ line-height: 1.75;
1231
+ }
1232
+ .prose :where(picture > img):not(:where([class~=not-prose], [class~=not-prose] *)) {
1233
+ margin-top: 0;
1234
+ margin-bottom: 0;
1235
+ }
1236
+ .prose :where(li):not(:where([class~=not-prose], [class~=not-prose] *)) {
1237
+ margin-top: 0.5em;
1238
+ margin-bottom: 0.5em;
1239
+ }
1240
+ .prose :where(ol > li):not(:where([class~=not-prose], [class~=not-prose] *)) {
1241
+ padding-inline-start: 0.375em;
1242
+ }
1243
+ .prose :where(ul > li):not(:where([class~=not-prose], [class~=not-prose] *)) {
1244
+ padding-inline-start: 0.375em;
1245
+ }
1246
+ .prose :where(.prose > ul > li p):not(:where([class~=not-prose], [class~=not-prose] *)) {
1247
+ margin-top: 0.75em;
1248
+ margin-bottom: 0.75em;
1249
+ }
1250
+ .prose :where(.prose > ul > li > p:first-child):not(:where([class~=not-prose], [class~=not-prose] *)) {
1251
+ margin-top: 1.25em;
1252
+ }
1253
+ .prose :where(.prose > ul > li > p:last-child):not(:where([class~=not-prose], [class~=not-prose] *)) {
1254
+ margin-bottom: 1.25em;
1255
+ }
1256
+ .prose :where(.prose > ol > li > p:first-child):not(:where([class~=not-prose], [class~=not-prose] *)) {
1257
+ margin-top: 1.25em;
1258
+ }
1259
+ .prose :where(.prose > ol > li > p:last-child):not(:where([class~=not-prose], [class~=not-prose] *)) {
1260
+ margin-bottom: 1.25em;
1261
+ }
1262
+ .prose :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~=not-prose], [class~=not-prose] *)) {
1263
+ margin-top: 0.75em;
1264
+ margin-bottom: 0.75em;
1265
+ }
1266
+ .prose :where(dl):not(:where([class~=not-prose], [class~=not-prose] *)) {
1267
+ margin-top: 1.25em;
1268
+ margin-bottom: 1.25em;
1269
+ }
1270
+ .prose :where(dd):not(:where([class~=not-prose], [class~=not-prose] *)) {
1271
+ margin-top: 0.5em;
1272
+ padding-inline-start: 1.625em;
1273
+ }
1274
+ .prose :where(hr + *):not(:where([class~=not-prose], [class~=not-prose] *)) {
1275
+ margin-top: 0;
1276
+ }
1277
+ .prose :where(h2 + *):not(:where([class~=not-prose], [class~=not-prose] *)) {
1278
+ margin-top: 0;
1279
+ }
1280
+ .prose :where(h3 + *):not(:where([class~=not-prose], [class~=not-prose] *)) {
1281
+ margin-top: 0;
1282
+ }
1283
+ .prose :where(h4 + *):not(:where([class~=not-prose], [class~=not-prose] *)) {
1284
+ margin-top: 0;
1285
+ }
1286
+ .prose :where(thead th:first-child):not(:where([class~=not-prose], [class~=not-prose] *)) {
1287
+ padding-inline-start: 0;
1288
+ }
1289
+ .prose :where(thead th:last-child):not(:where([class~=not-prose], [class~=not-prose] *)) {
1290
+ padding-inline-end: 0;
1291
+ }
1292
+ .prose :where(tbody td, tfoot td):not(:where([class~=not-prose], [class~=not-prose] *)) {
1293
+ padding-top: 0.5714286em;
1294
+ padding-inline-end: 0.5714286em;
1295
+ padding-bottom: 0.5714286em;
1296
+ padding-inline-start: 0.5714286em;
1297
+ }
1298
+ .prose :where(tbody td:first-child, tfoot td:first-child):not(:where([class~=not-prose], [class~=not-prose] *)) {
1299
+ padding-inline-start: 0;
1300
+ }
1301
+ .prose :where(tbody td:last-child, tfoot td:last-child):not(:where([class~=not-prose], [class~=not-prose] *)) {
1302
+ padding-inline-end: 0;
1303
+ }
1304
+ .prose :where(figure):not(:where([class~=not-prose], [class~=not-prose] *)) {
1305
+ margin-top: 2em;
1306
+ margin-bottom: 2em;
1307
+ }
1308
+ .prose :where(.prose > :first-child):not(:where([class~=not-prose], [class~=not-prose] *)) {
1309
+ margin-top: 0;
1310
+ }
1311
+ .prose :where(.prose > :last-child):not(:where([class~=not-prose], [class~=not-prose] *)) {
1312
+ margin-bottom: 0;
1313
+ }
1314
+ .prose-sm {
1315
+ font-size: 0.875rem;
1316
+ line-height: 1.7142857;
1317
+ }
1318
+ .prose-sm :where(p):not(:where([class~=not-prose], [class~=not-prose] *)) {
1319
+ margin-top: 1.1428571em;
1320
+ margin-bottom: 1.1428571em;
1321
+ }
1322
+ .prose-sm :where([class~=lead]):not(:where([class~=not-prose], [class~=not-prose] *)) {
1323
+ font-size: 1.2857143em;
1324
+ line-height: 1.5555556;
1325
+ margin-top: 0.8888889em;
1326
+ margin-bottom: 0.8888889em;
1327
+ }
1328
+ .prose-sm :where(blockquote):not(:where([class~=not-prose], [class~=not-prose] *)) {
1329
+ margin-top: 1.3333333em;
1330
+ margin-bottom: 1.3333333em;
1331
+ padding-inline-start: 1.1111111em;
1332
+ }
1333
+ .prose-sm :where(h1):not(:where([class~=not-prose], [class~=not-prose] *)) {
1334
+ font-size: 2.1428571em;
1335
+ margin-top: 0;
1336
+ margin-bottom: 0.8em;
1337
+ line-height: 1.2;
1338
+ }
1339
+ .prose-sm :where(h2):not(:where([class~=not-prose], [class~=not-prose] *)) {
1340
+ font-size: 1.4285714em;
1341
+ margin-top: 1.6em;
1342
+ margin-bottom: 0.8em;
1343
+ line-height: 1.4;
1344
+ }
1345
+ .prose-sm :where(h3):not(:where([class~=not-prose], [class~=not-prose] *)) {
1346
+ font-size: 1.2857143em;
1347
+ margin-top: 1.5555556em;
1348
+ margin-bottom: 0.4444444em;
1349
+ line-height: 1.5555556;
1350
+ }
1351
+ .prose-sm :where(h4):not(:where([class~=not-prose], [class~=not-prose] *)) {
1352
+ margin-top: 1.4285714em;
1353
+ margin-bottom: 0.5714286em;
1354
+ line-height: 1.4285714;
1355
+ }
1356
+ .prose-sm :where(img):not(:where([class~=not-prose], [class~=not-prose] *)) {
1357
+ margin-top: 1.7142857em;
1358
+ margin-bottom: 1.7142857em;
1359
+ }
1360
+ .prose-sm :where(picture):not(:where([class~=not-prose], [class~=not-prose] *)) {
1361
+ margin-top: 1.7142857em;
1362
+ margin-bottom: 1.7142857em;
1363
+ }
1364
+ .prose-sm :where(picture > img):not(:where([class~=not-prose], [class~=not-prose] *)) {
1365
+ margin-top: 0;
1366
+ margin-bottom: 0;
1367
+ }
1368
+ .prose-sm :where(video):not(:where([class~=not-prose], [class~=not-prose] *)) {
1369
+ margin-top: 1.7142857em;
1370
+ margin-bottom: 1.7142857em;
1371
+ }
1372
+ .prose-sm :where(kbd):not(:where([class~=not-prose], [class~=not-prose] *)) {
1373
+ font-size: 0.8571429em;
1374
+ border-radius: 0.3125rem;
1375
+ padding-top: 0.1428571em;
1376
+ padding-inline-end: 0.3571429em;
1377
+ padding-bottom: 0.1428571em;
1378
+ padding-inline-start: 0.3571429em;
1379
+ }
1380
+ .prose-sm :where(code):not(:where([class~=not-prose], [class~=not-prose] *)) {
1381
+ font-size: 0.8571429em;
1382
+ }
1383
+ .prose-sm :where(h2 code):not(:where([class~=not-prose], [class~=not-prose] *)) {
1384
+ font-size: 0.9em;
1385
+ }
1386
+ .prose-sm :where(h3 code):not(:where([class~=not-prose], [class~=not-prose] *)) {
1387
+ font-size: 0.8888889em;
1388
+ }
1389
+ .prose-sm :where(pre):not(:where([class~=not-prose], [class~=not-prose] *)) {
1390
+ font-size: 0.8571429em;
1391
+ line-height: 1.6666667;
1392
+ margin-top: 1.6666667em;
1393
+ margin-bottom: 1.6666667em;
1394
+ border-radius: 0.25rem;
1395
+ padding-top: 0.6666667em;
1396
+ padding-inline-end: 1em;
1397
+ padding-bottom: 0.6666667em;
1398
+ padding-inline-start: 1em;
1399
+ }
1400
+ .prose-sm :where(ol):not(:where([class~=not-prose], [class~=not-prose] *)) {
1401
+ margin-top: 1.1428571em;
1402
+ margin-bottom: 1.1428571em;
1403
+ padding-inline-start: 1.5714286em;
1404
+ }
1405
+ .prose-sm :where(ul):not(:where([class~=not-prose], [class~=not-prose] *)) {
1406
+ margin-top: 1.1428571em;
1407
+ margin-bottom: 1.1428571em;
1408
+ padding-inline-start: 1.5714286em;
1409
+ }
1410
+ .prose-sm :where(li):not(:where([class~=not-prose], [class~=not-prose] *)) {
1411
+ margin-top: 0.2857143em;
1412
+ margin-bottom: 0.2857143em;
1413
+ }
1414
+ .prose-sm :where(ol > li):not(:where([class~=not-prose], [class~=not-prose] *)) {
1415
+ padding-inline-start: 0.4285714em;
1416
+ }
1417
+ .prose-sm :where(ul > li):not(:where([class~=not-prose], [class~=not-prose] *)) {
1418
+ padding-inline-start: 0.4285714em;
1419
+ }
1420
+ .prose-sm :where(.prose-sm > ul > li p):not(:where([class~=not-prose], [class~=not-prose] *)) {
1421
+ margin-top: 0.5714286em;
1422
+ margin-bottom: 0.5714286em;
1423
+ }
1424
+ .prose-sm :where(.prose-sm > ul > li > p:first-child):not(:where([class~=not-prose], [class~=not-prose] *)) {
1425
+ margin-top: 1.1428571em;
1426
+ }
1427
+ .prose-sm :where(.prose-sm > ul > li > p:last-child):not(:where([class~=not-prose], [class~=not-prose] *)) {
1428
+ margin-bottom: 1.1428571em;
1429
+ }
1430
+ .prose-sm :where(.prose-sm > ol > li > p:first-child):not(:where([class~=not-prose], [class~=not-prose] *)) {
1431
+ margin-top: 1.1428571em;
1432
+ }
1433
+ .prose-sm :where(.prose-sm > ol > li > p:last-child):not(:where([class~=not-prose], [class~=not-prose] *)) {
1434
+ margin-bottom: 1.1428571em;
1435
+ }
1436
+ .prose-sm :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~=not-prose], [class~=not-prose] *)) {
1437
+ margin-top: 0.5714286em;
1438
+ margin-bottom: 0.5714286em;
1439
+ }
1440
+ .prose-sm :where(dl):not(:where([class~=not-prose], [class~=not-prose] *)) {
1441
+ margin-top: 1.1428571em;
1442
+ margin-bottom: 1.1428571em;
1443
+ }
1444
+ .prose-sm :where(dt):not(:where([class~=not-prose], [class~=not-prose] *)) {
1445
+ margin-top: 1.1428571em;
1446
+ }
1447
+ .prose-sm :where(dd):not(:where([class~=not-prose], [class~=not-prose] *)) {
1448
+ margin-top: 0.2857143em;
1449
+ padding-inline-start: 1.5714286em;
1450
+ }
1451
+ .prose-sm :where(hr):not(:where([class~=not-prose], [class~=not-prose] *)) {
1452
+ margin-top: 2.8571429em;
1453
+ margin-bottom: 2.8571429em;
1454
+ }
1455
+ .prose-sm :where(hr + *):not(:where([class~=not-prose], [class~=not-prose] *)) {
1456
+ margin-top: 0;
1457
+ }
1458
+ .prose-sm :where(h2 + *):not(:where([class~=not-prose], [class~=not-prose] *)) {
1459
+ margin-top: 0;
1460
+ }
1461
+ .prose-sm :where(h3 + *):not(:where([class~=not-prose], [class~=not-prose] *)) {
1462
+ margin-top: 0;
1463
+ }
1464
+ .prose-sm :where(h4 + *):not(:where([class~=not-prose], [class~=not-prose] *)) {
1465
+ margin-top: 0;
1466
+ }
1467
+ .prose-sm :where(table):not(:where([class~=not-prose], [class~=not-prose] *)) {
1468
+ font-size: 0.8571429em;
1469
+ line-height: 1.5;
1470
+ }
1471
+ .prose-sm :where(thead th):not(:where([class~=not-prose], [class~=not-prose] *)) {
1472
+ padding-inline-end: 1em;
1473
+ padding-bottom: 0.6666667em;
1474
+ padding-inline-start: 1em;
1475
+ }
1476
+ .prose-sm :where(thead th:first-child):not(:where([class~=not-prose], [class~=not-prose] *)) {
1477
+ padding-inline-start: 0;
1478
+ }
1479
+ .prose-sm :where(thead th:last-child):not(:where([class~=not-prose], [class~=not-prose] *)) {
1480
+ padding-inline-end: 0;
1481
+ }
1482
+ .prose-sm :where(tbody td, tfoot td):not(:where([class~=not-prose], [class~=not-prose] *)) {
1483
+ padding-top: 0.6666667em;
1484
+ padding-inline-end: 1em;
1485
+ padding-bottom: 0.6666667em;
1486
+ padding-inline-start: 1em;
1487
+ }
1488
+ .prose-sm :where(tbody td:first-child, tfoot td:first-child):not(:where([class~=not-prose], [class~=not-prose] *)) {
1489
+ padding-inline-start: 0;
1490
+ }
1491
+ .prose-sm :where(tbody td:last-child, tfoot td:last-child):not(:where([class~=not-prose], [class~=not-prose] *)) {
1492
+ padding-inline-end: 0;
1493
+ }
1494
+ .prose-sm :where(figure):not(:where([class~=not-prose], [class~=not-prose] *)) {
1495
+ margin-top: 1.7142857em;
1496
+ margin-bottom: 1.7142857em;
1497
+ }
1498
+ .prose-sm :where(figure > *):not(:where([class~=not-prose], [class~=not-prose] *)) {
1499
+ margin-top: 0;
1500
+ margin-bottom: 0;
1501
+ }
1502
+ .prose-sm :where(figcaption):not(:where([class~=not-prose], [class~=not-prose] *)) {
1503
+ font-size: 0.8571429em;
1504
+ line-height: 1.3333333;
1505
+ margin-top: 0.6666667em;
1506
+ }
1507
+ .prose-sm :where(.prose-sm > :first-child):not(:where([class~=not-prose], [class~=not-prose] *)) {
1508
+ margin-top: 0;
1509
+ }
1510
+ .prose-sm :where(.prose-sm > :last-child):not(:where([class~=not-prose], [class~=not-prose] *)) {
1511
+ margin-bottom: 0;
1512
+ }
899
1513
  .sr-only {
900
1514
  position: absolute;
901
1515
  width: 1px;
@@ -949,6 +1563,9 @@
949
1563
  .right-1 {
950
1564
  right: 0.25rem;
951
1565
  }
1566
+ .right-3 {
1567
+ right: 0.75rem;
1568
+ }
952
1569
  .start-12 {
953
1570
  inset-inline-start: 3rem;
954
1571
  }
@@ -958,6 +1575,9 @@
958
1575
  .top-1 {
959
1576
  top: 0.25rem;
960
1577
  }
1578
+ .top-3 {
1579
+ top: 0.75rem;
1580
+ }
961
1581
  .z-0 {
962
1582
  z-index: 0;
963
1583
  }
@@ -989,6 +1609,10 @@
989
1609
  margin-top: 1rem;
990
1610
  margin-bottom: 1rem;
991
1611
  }
1612
+ .my-5 {
1613
+ margin-top: 1.25rem;
1614
+ margin-bottom: 1.25rem;
1615
+ }
992
1616
  .my-8 {
993
1617
  margin-top: 2rem;
994
1618
  margin-bottom: 2rem;
@@ -1017,6 +1641,12 @@
1017
1641
  .mt-1 {
1018
1642
  margin-top: 0.25rem;
1019
1643
  }
1644
+ .line-clamp-2 {
1645
+ overflow: hidden;
1646
+ display: -webkit-box;
1647
+ -webkit-box-orient: vertical;
1648
+ -webkit-line-clamp: 2;
1649
+ }
1020
1650
  .block {
1021
1651
  display: block;
1022
1652
  }
@@ -1056,6 +1686,9 @@
1056
1686
  .h-8 {
1057
1687
  height: 2rem;
1058
1688
  }
1689
+ .h-96 {
1690
+ height: 24rem;
1691
+ }
1059
1692
  .h-\[23px\] {
1060
1693
  height: 23px;
1061
1694
  }
@@ -1138,6 +1771,10 @@
1138
1771
  .flex-shrink-0 {
1139
1772
  flex-shrink: 0;
1140
1773
  }
1774
+ .-translate-y-1 {
1775
+ --tw-translate-y: -0.25rem;
1776
+ 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));
1777
+ }
1141
1778
  .translate-x-3 {
1142
1779
  --tw-translate-x: 0.75rem;
1143
1780
  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));
@@ -1226,6 +1863,9 @@
1226
1863
  .gap-2 {
1227
1864
  gap: 0.5rem;
1228
1865
  }
1866
+ .gap-3 {
1867
+ gap: 0.75rem;
1868
+ }
1229
1869
  .gap-4 {
1230
1870
  gap: 1rem;
1231
1871
  }
@@ -1334,6 +1974,10 @@
1334
1974
  .border-transparent {
1335
1975
  border-color: transparent;
1336
1976
  }
1977
+ .border-b-gray-200 {
1978
+ --tw-border-opacity: 1;
1979
+ border-bottom-color: rgb(229 231 235 / var(--tw-border-opacity));
1980
+ }
1337
1981
  .border-b-me-gray-300 {
1338
1982
  --tw-border-opacity: 1;
1339
1983
  border-bottom-color: rgb(217 217 217 / var(--tw-border-opacity));
@@ -1360,6 +2004,10 @@
1360
2004
  --tw-bg-opacity: 1;
1361
2005
  background-color: rgb(243 244 246 / var(--tw-bg-opacity));
1362
2006
  }
2007
+ .bg-gray-200 {
2008
+ --tw-bg-opacity: 1;
2009
+ background-color: rgb(229 231 235 / var(--tw-bg-opacity));
2010
+ }
1363
2011
  .bg-me-gray-100 {
1364
2012
  --tw-bg-opacity: 1;
1365
2013
  background-color: rgb(245 245 245 / var(--tw-bg-opacity));
@@ -1465,6 +2113,9 @@
1465
2113
  .pt-3 {
1466
2114
  padding-top: 0.75rem;
1467
2115
  }
2116
+ .text-left {
2117
+ text-align: left;
2118
+ }
1468
2119
  .text-center {
1469
2120
  text-align: center;
1470
2121
  }
@@ -1534,6 +2185,10 @@
1534
2185
  --tw-text-opacity: 1;
1535
2186
  color: rgb(107 114 128 / var(--tw-text-opacity));
1536
2187
  }
2188
+ .text-gray-600 {
2189
+ --tw-text-opacity: 1;
2190
+ color: rgb(75 85 99 / var(--tw-text-opacity));
2191
+ }
1537
2192
  .text-gray-900 {
1538
2193
  --tw-text-opacity: 1;
1539
2194
  color: rgb(17 24 39 / var(--tw-text-opacity));
@@ -1563,6 +2218,9 @@
1563
2218
  .opacity-50 {
1564
2219
  opacity: 0.5;
1565
2220
  }
2221
+ .opacity-70 {
2222
+ opacity: 0.7;
2223
+ }
1566
2224
  .opacity-90 {
1567
2225
  opacity: 0.9;
1568
2226
  }
@@ -1629,6 +2287,14 @@
1629
2287
  --tw-ring-opacity: 1;
1630
2288
  --tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity));
1631
2289
  }
2290
+ .ring-me-gray-500 {
2291
+ --tw-ring-opacity: 1;
2292
+ --tw-ring-color: rgb(161 161 161 / var(--tw-ring-opacity));
2293
+ }
2294
+ .ring-me-primary-100 {
2295
+ --tw-ring-opacity: 1;
2296
+ --tw-ring-color: rgb(241 214 229 / var(--tw-ring-opacity));
2297
+ }
1632
2298
  .ring-me-primary-500 {
1633
2299
  --tw-ring-opacity: 1;
1634
2300
  --tw-ring-color: rgb(184 76 116 / var(--tw-ring-opacity));
@@ -1713,11 +2379,15 @@
1713
2379
  --grid-item--min-width: 120px;
1714
2380
  --total-gap-width: 1.5rem;
1715
2381
  }
2382
+ div[data-floating-ui-portal] {
2383
+ z-index: 505;
2384
+ position: relative;
2385
+ }
1716
2386
  .grid-lg,
1717
2387
  .grid-md,
1718
2388
  .grid-sm {
1719
2389
  --gap-count: calc(var(--grid-column-count) - 1);
1720
- --grid-item--max-width: calc( (100% - var(--total-gap-width)) / var(--grid-column-count) );
2390
+ --grid-item--max-width: calc((100% - var(--total-gap-width)) / var(--grid-column-count));
1721
2391
  grid-template-columns: repeat(auto-fill, minmax(max(var(--grid-item--min-width), var(--grid-item--max-width)), 1fr));
1722
2392
  }
1723
2393
  .tab-shadow {
@@ -1773,6 +2443,14 @@
1773
2443
  #floating-ui {
1774
2444
  z-index: 1000;
1775
2445
  }
2446
+ div.mdxeditor-popup-container {
2447
+ position: relative;
2448
+ z-index: 1000;
2449
+ }
2450
+ div.mdxeditor-popup-container > *[role=dialog] {
2451
+ display: flex;
2452
+ flex-direction: column;
2453
+ }
1776
2454
  .focus-within\:border-me-primary-500:focus-within {
1777
2455
  --tw-border-opacity: 1;
1778
2456
  border-color: rgb(184 76 116 / var(--tw-border-opacity));
@@ -1868,6 +2546,14 @@
1868
2546
  var(--tw-ring-shadow),
1869
2547
  var(--tw-shadow, 0 0 #0000);
1870
2548
  }
2549
+ .hover\:ring-2:hover {
2550
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
2551
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
2552
+ box-shadow:
2553
+ var(--tw-ring-offset-shadow),
2554
+ var(--tw-ring-shadow),
2555
+ var(--tw-shadow, 0 0 #0000);
2556
+ }
1871
2557
  .focus\:border-me-primary-500:focus {
1872
2558
  --tw-border-opacity: 1;
1873
2559
  border-color: rgb(184 76 116 / var(--tw-border-opacity));
@@ -1908,13 +2594,49 @@
1908
2594
  --tw-border-opacity: 1;
1909
2595
  border-color: rgb(137 44 78 / var(--tw-border-opacity));
1910
2596
  }
2597
+ .data-\[active\]\:border-b-me-primary-500[data-active] {
2598
+ --tw-border-opacity: 1;
2599
+ border-bottom-color: rgb(184 76 116 / var(--tw-border-opacity));
2600
+ }
2601
+ .data-\[active\]\:bg-gray-200[data-active] {
2602
+ --tw-bg-opacity: 1;
2603
+ background-color: rgb(229 231 235 / var(--tw-bg-opacity));
2604
+ }
2605
+ .data-\[selected\]\:bg-me-primary-100[data-selected] {
2606
+ --tw-bg-opacity: 1;
2607
+ background-color: rgb(241 214 229 / var(--tw-bg-opacity));
2608
+ }
2609
+ .data-\[active\]\:text-me-primary-500[data-active] {
2610
+ --tw-text-opacity: 1;
2611
+ color: rgb(184 76 116 / var(--tw-text-opacity));
2612
+ }
1911
2613
  .data-\[visible\]\:opacity-100[data-visible] {
1912
2614
  opacity: 1;
1913
2615
  }
1914
- @media (min-width: 768px) {
1915
- .md\:p-5 {
1916
- padding: 1.25rem;
1917
- }
2616
+ .data-\[selected\]\:ring-2[data-selected] {
2617
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
2618
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
2619
+ box-shadow:
2620
+ var(--tw-ring-offset-shadow),
2621
+ var(--tw-ring-shadow),
2622
+ var(--tw-shadow, 0 0 #0000);
2623
+ }
2624
+ .data-\[selected\]\:ring-me-primary-500[data-selected] {
2625
+ --tw-ring-opacity: 1;
2626
+ --tw-ring-color: rgb(184 76 116 / var(--tw-ring-opacity));
2627
+ }
2628
+ .prose-a\:text-me-primary-500 :is(:where(a):not(:where([class~=not-prose], [class~=not-prose] *))) {
2629
+ --tw-text-opacity: 1;
2630
+ color: rgb(184 76 116 / var(--tw-text-opacity));
2631
+ }
2632
+ .prose-a\:underline :is(:where(a):not(:where([class~=not-prose], [class~=not-prose] *))) {
2633
+ text-decoration-line: underline;
2634
+ }
2635
+ .prose-ol\:list-decimal :is(:where(ol):not(:where([class~=not-prose], [class~=not-prose] *))) {
2636
+ list-style-type: decimal;
2637
+ }
2638
+ .prose-ul\:list-disc :is(:where(ul):not(:where([class~=not-prose], [class~=not-prose] *))) {
2639
+ list-style-type: disc;
1918
2640
  }
1919
2641
  .\[\&\>svg\]\:h-16 > svg {
1920
2642
  height: 4rem;
package/dist/index.d.cts CHANGED
@@ -10,6 +10,6 @@ interface ManifestEditorProps {
10
10
  data?: Manifest | Collection;
11
11
  vault?: Vault;
12
12
  }
13
- declare function ManifestEditor(props: ManifestEditorProps): react_jsx_runtime.JSX.Element;
13
+ declare function ManifestEditor(props: ManifestEditorProps): react_jsx_runtime.JSX.Element | null;
14
14
 
15
15
  export { ManifestEditor };
package/dist/index.d.ts CHANGED
@@ -10,6 +10,6 @@ interface ManifestEditorProps {
10
10
  data?: Manifest | Collection;
11
11
  vault?: Vault;
12
12
  }
13
- declare function ManifestEditor(props: ManifestEditorProps): react_jsx_runtime.JSX.Element;
13
+ declare function ManifestEditor(props: ManifestEditorProps): react_jsx_runtime.JSX.Element | null;
14
14
 
15
15
  export { ManifestEditor };
package/dist/index.js CHANGED
@@ -1,7 +1,8 @@
1
1
  // src/ManifestEditor.tsx
2
- import { AppProvider, Layout, ShellProvider, mapApp } from "@manifest-editor/shell";
2
+ import { collectionPreset } from "@manifest-editor/collection-preset";
3
3
  import * as manifestEditorPreset from "@manifest-editor/manifest-preset";
4
- import { useExistingVault, VaultProvider } from "react-iiif-vault";
4
+ import { AppProvider, Layout, ShellProvider, mapApp } from "@manifest-editor/shell";
5
+ import { VaultProvider, useExistingVault } from "react-iiif-vault";
5
6
 
6
7
  // ../../node_modules/.pnpm/tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js
7
8
  var isProduction = false;
@@ -25,11 +26,22 @@ function ManifestEditor(props) {
25
26
  const vault = useExistingVault(props.vault);
26
27
  invariant(props.resource);
27
28
  invariant(props.data, "Data is required");
28
- invariant(props.resource.type === "Manifest", "Only Manifests are supported at the moment");
29
29
  if (!vault.requestStatus(props.resource.id)) {
30
30
  vault.loadManifestSync(props.resource.id, props.data);
31
31
  }
32
- return /* @__PURE__ */ jsx(AppProvider, { appId: "manifest-editor", definition: manifestEditor, instanceId: "test-1", children: /* @__PURE__ */ jsx(VaultProvider, { vault, children: /* @__PURE__ */ jsx(ShellProvider, { resource: props.resource, children: /* @__PURE__ */ jsx(Layout, {}) }) }) });
32
+ let preset = null;
33
+ let appId = null;
34
+ if (props.resource.type === "Manifest") {
35
+ preset = manifestEditor;
36
+ appId = manifestEditor.metadata.id;
37
+ } else if (props.resource.type === "Collection") {
38
+ preset = collectionPreset;
39
+ appId = collectionPreset.metadata.id;
40
+ }
41
+ if (preset === null || appId === null) {
42
+ return null;
43
+ }
44
+ return /* @__PURE__ */ jsx(AppProvider, { appId, definition: preset, instanceId: "test-1", children: /* @__PURE__ */ jsx(VaultProvider, { vault, children: /* @__PURE__ */ jsx(ShellProvider, { resource: props.resource, children: /* @__PURE__ */ jsx(Layout, {}) }) }) });
33
45
  }
34
46
  export {
35
47
  ManifestEditor
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "manifest-editor",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "type": "module",
5
5
  "bugs": "https://github.com/digirati-co-uk/iiif-manifest-editor/issues",
6
6
  "repository": {
@@ -46,15 +46,15 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@iiif/helpers": "^1.3.1",
49
- "@iiif/parser": "^2.1.7",
49
+ "@iiif/parser": "^2.1.8",
50
50
  "@iiif/presentation-3": "^2.2.3",
51
51
  "@iiif/presentation-3-normalized": "^0.9.7",
52
- "@manifest-editor/collection-preset": "1.3.0",
53
- "@manifest-editor/components": "1.3.0",
54
- "@manifest-editor/editors": "1.3.0",
55
- "@manifest-editor/iiif-browser": "1.3.0",
56
- "@manifest-editor/manifest-preset": "1.3.0",
57
- "@manifest-editor/shell": "1.3.0",
52
+ "@manifest-editor/collection-preset": "1.4.0",
53
+ "@manifest-editor/components": "1.4.0",
54
+ "@manifest-editor/editors": "1.4.0",
55
+ "@manifest-editor/iiif-browser": "1.4.0",
56
+ "@manifest-editor/manifest-preset": "1.4.0",
57
+ "@manifest-editor/shell": "1.4.0",
58
58
  "react": "^18.3.1",
59
59
  "react-dom": "^18.3.1",
60
60
  "react-iiif-vault": "^1.2.1"
@@ -72,5 +72,5 @@
72
72
  "publishConfig": {
73
73
  "access": "public"
74
74
  },
75
- "gitHead": "deba5190f58c11b91383eacd79715607ba5b8d24"
75
+ "gitHead": "4ca76024a42ec30c958f476a6fcd8d10592c12d3"
76
76
  }