manifest-editor 2.0.3-next.0.f58cbd8 → 2.1.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.d.cts +7 -7
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +12 -12
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Vault } from "@iiif/helpers";
|
|
2
2
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
import { Collection, Manifest } from "@iiif/presentation-3";
|
|
4
|
-
import { Config, MappedPlugin, PluginModule } from "@manifest-editor/shell";
|
|
4
|
+
import { Config, Config as Config$1, LazyPluginModule, MappedPlugin, PluginInput, PluginInput as PluginInput$1, PluginModule } from "@manifest-editor/shell";
|
|
5
5
|
|
|
6
6
|
//#region src/ManifestEditor.d.ts
|
|
7
7
|
interface ManifestEditorProps {
|
|
@@ -11,16 +11,16 @@ interface ManifestEditorProps {
|
|
|
11
11
|
};
|
|
12
12
|
data?: Manifest | Collection;
|
|
13
13
|
vault?: Vault;
|
|
14
|
-
config?: Partial<Config>;
|
|
15
|
-
saveConfig?: (config: Partial<Config>) => void;
|
|
16
|
-
globalPluginConfig?: Config["plugins"];
|
|
17
|
-
saveGlobalPluginConfig?: (config: Config["plugins"]) => void | Promise<void>;
|
|
18
|
-
plugins?:
|
|
14
|
+
config?: Partial<Config$1>;
|
|
15
|
+
saveConfig?: (config: Partial<Config$1>) => void;
|
|
16
|
+
globalPluginConfig?: Config$1["plugins"];
|
|
17
|
+
saveGlobalPluginConfig?: (config: Config$1["plugins"]) => void | Promise<void>;
|
|
18
|
+
plugins?: PluginInput$1[];
|
|
19
19
|
enabledPlugins?: string[];
|
|
20
20
|
disabledPlugins?: string[];
|
|
21
21
|
layoutMode?: "default" | "focused";
|
|
22
22
|
}
|
|
23
23
|
declare function ManifestEditor(props: ManifestEditorProps): react_jsx_runtime0.JSX.Element | null;
|
|
24
24
|
//#endregion
|
|
25
|
-
export { ManifestEditor };
|
|
25
|
+
export { type Config, type LazyPluginModule, ManifestEditor, ManifestEditorProps, type MappedPlugin, type PluginInput, type PluginModule };
|
|
26
26
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/ManifestEditor.tsx"],"sourcesContent":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/ManifestEditor.tsx"],"sourcesContent":[],"mappings":";;;;;;UAmBiB,mBAAA;;;IAAA,IAAA,EAAA,UAAA,GAAmB,YAAA;EAE3B,CAAA;EAAW,IAAA,CAAA,EAAX,QAAW,GAAA,UAAA;EACV,KAAA,CAAA,EAAA,KAAA;EACS,MAAA,CAAA,EAAR,OAAQ,CAAA,QAAA,CAAA;EAAR,UAAA,CAAA,EAAA,CAAA,MAAA,EACa,OADb,CACqB,QADrB,CAAA,EAAA,GAAA,IAAA;EACqB,kBAAA,CAAA,EACT,QADS,CAAA,SAAA,CAAA;EAAR,sBAAA,CAAA,EAAA,CAAA,MAAA,EAEY,QAFZ,CAAA,SAAA,CAAA,EAAA,GAAA,IAAA,GAEyC,OAFzC,CAAA,IAAA,CAAA;EACD,OAAA,CAAA,EAEX,aAFW,EAAA;EACa,cAAA,CAAA,EAAA,MAAA,EAAA;EAA6B,eAAA,CAAA,EAAA,MAAA,EAAA;EACrD,UAAA,CAAA,EAAA,SAAA,GAAA,SAAA;;AAgCI,iBAAA,cAAA,CAAsB,KAAA,EAAA,mBAAmB,CAAA,EAAA,kBAAA,CAAA,GAAA,CAAA,OAAA,GAAA,IAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Config, MappedPlugin, PluginModule } from "@manifest-editor/shell";
|
|
1
|
+
import { Config, Config as Config$1, LazyPluginModule, MappedPlugin, PluginInput, PluginInput as PluginInput$1, PluginModule } from "@manifest-editor/shell";
|
|
2
2
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
import { Vault } from "@iiif/helpers";
|
|
4
4
|
import { Collection, Manifest } from "@iiif/presentation-3";
|
|
@@ -11,16 +11,16 @@ interface ManifestEditorProps {
|
|
|
11
11
|
};
|
|
12
12
|
data?: Manifest | Collection;
|
|
13
13
|
vault?: Vault;
|
|
14
|
-
config?: Partial<Config>;
|
|
15
|
-
saveConfig?: (config: Partial<Config>) => void;
|
|
16
|
-
globalPluginConfig?: Config["plugins"];
|
|
17
|
-
saveGlobalPluginConfig?: (config: Config["plugins"]) => void | Promise<void>;
|
|
18
|
-
plugins?:
|
|
14
|
+
config?: Partial<Config$1>;
|
|
15
|
+
saveConfig?: (config: Partial<Config$1>) => void;
|
|
16
|
+
globalPluginConfig?: Config$1["plugins"];
|
|
17
|
+
saveGlobalPluginConfig?: (config: Config$1["plugins"]) => void | Promise<void>;
|
|
18
|
+
plugins?: PluginInput$1[];
|
|
19
19
|
enabledPlugins?: string[];
|
|
20
20
|
disabledPlugins?: string[];
|
|
21
21
|
layoutMode?: "default" | "focused";
|
|
22
22
|
}
|
|
23
23
|
declare function ManifestEditor(props: ManifestEditorProps): react_jsx_runtime0.JSX.Element | null;
|
|
24
24
|
//#endregion
|
|
25
|
-
export { ManifestEditor };
|
|
25
|
+
export { type Config, type LazyPluginModule, ManifestEditor, ManifestEditorProps, type MappedPlugin, type PluginInput, type PluginModule };
|
|
26
26
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/ManifestEditor.tsx"],"sourcesContent":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/ManifestEditor.tsx"],"sourcesContent":[],"mappings":";;;;;;UAmBiB,mBAAA;;;IAAA,IAAA,EAAA,UAAA,GAAmB,YAAA;EAE3B,CAAA;EAAW,IAAA,CAAA,EAAX,QAAW,GAAA,UAAA;EACV,KAAA,CAAA,EAAA,KAAA;EACS,MAAA,CAAA,EAAR,OAAQ,CAAA,QAAA,CAAA;EAAR,UAAA,CAAA,EAAA,CAAA,MAAA,EACa,OADb,CACqB,QADrB,CAAA,EAAA,GAAA,IAAA;EACqB,kBAAA,CAAA,EACT,QADS,CAAA,SAAA,CAAA;EAAR,sBAAA,CAAA,EAAA,CAAA,MAAA,EAEY,QAFZ,CAAA,SAAA,CAAA,EAAA,GAAA,IAAA,GAEyC,OAFzC,CAAA,IAAA,CAAA;EACD,OAAA,CAAA,EAEX,aAFW,EAAA;EACa,cAAA,CAAA,EAAA,MAAA,EAAA;EAA6B,eAAA,CAAA,EAAA,MAAA,EAAA;EACrD,UAAA,CAAA,EAAA,SAAA,GAAA,SAAA;;AAgCI,iBAAA,cAAA,CAAsB,KAAA,EAAA,mBAAmB,CAAA,EAAA,kBAAA,CAAA,GAAA,CAAA,OAAA,GAAA,IAAA"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["prefix: string","provided: string | undefined","value: string"],"sources":["../src/ManifestEditor.tsx"],"sourcesContent":["import type { Vault } from \"@iiif/helpers\";\nimport type { Collection, Manifest } from \"@iiif/presentation-3\";\nimport { collectionPreset } from \"@manifest-editor/collection-preset\";\nimport * as manifestEditorPreset from \"@manifest-editor/manifest-preset\";\nimport {\n AppProvider,\n type Config,\n Layout,\n
|
|
1
|
+
{"version":3,"file":"index.js","names":["prefix: string","provided: string | undefined","value: string"],"sources":["../src/ManifestEditor.tsx"],"sourcesContent":["import type { Vault } from \"@iiif/helpers\";\nimport type { Collection, Manifest } from \"@iiif/presentation-3\";\nimport { collectionPreset } from \"@manifest-editor/collection-preset\";\nimport * as manifestEditorPreset from \"@manifest-editor/manifest-preset\";\nimport {\n AppProvider,\n type Config,\n Layout,\n mapApp,\n type PluginInput,\n PluginProvider,\n ShellProvider,\n} from \"@manifest-editor/shell\";\nimport { useRef } from \"react\";\nimport { useExistingVault, VaultProvider } from \"react-iiif-vault\";\nimport invariant from \"tiny-invariant\";\n\nconst manifestEditor = mapApp(manifestEditorPreset);\n\nexport interface ManifestEditorProps {\n resource: string | { id: string; type: \"Manifest\" | \"Collection\" };\n data?: Manifest | Collection;\n vault?: Vault;\n config?: Partial<Config>;\n saveConfig?: (config: Partial<Config>) => void;\n globalPluginConfig?: Config[\"plugins\"];\n saveGlobalPluginConfig?: (config: Config[\"plugins\"]) => void | Promise<void>;\n plugins?: PluginInput[];\n enabledPlugins?: string[];\n disabledPlugins?: string[];\n layoutMode?: \"default\" | \"focused\";\n\n // // Future bits.\n // onChange?: (resource: { id: string; type: \"Manifest\" | \"Collection\" }, vault: Vault) => void;\n // onSave?: (data: Manifest | Collection) => void;\n // appState?: any;\n // previews?: PreviewConfiguration[];\n}\n\nfunction configInvariant(\n condition: any,\n // Not providing an inline default argument for message as the result is smaller\n /**\n * Can provide a string, or a function that returns a string for cases where\n * the message takes a fair amount of effort to compute\n */\n message?: string | (() => string),\n): asserts condition {\n if (condition) {\n return;\n }\n const prefix: string = \"Configuration Error\";\n\n const provided: string | undefined =\n typeof message === \"function\" ? message() : message;\n const value: string = provided ? `${prefix}: ${provided}` : prefix;\n throw new Error(value);\n}\n\nexport function ManifestEditor(props: ManifestEditorProps) {\n const vault = useExistingVault(props.vault);\n const didLoad = useRef(\"\");\n\n configInvariant(\n props.resource,\n `Prop resource is required. Usage example:\n <ManifestEditor resource=\"https://example.org/manifest\" />\n`,\n );\n\n const resource =\n typeof props.resource === \"string\"\n ? { id: props.resource, type: \"Manifest\" }\n : props.resource;\n\n if (!vault.requestStatus(resource.id)) {\n if (props.data) {\n vault.loadManifestSync(resource.id, props.data);\n } else {\n if (didLoad.current !== resource.id) {\n vault.load(resource);\n didLoad.current = resource.id;\n }\n }\n }\n\n let preset = null;\n let appId = null;\n\n if (resource.type === \"Manifest\") {\n preset = manifestEditor;\n appId = manifestEditor.metadata.id;\n } else if (resource.type === \"Collection\") {\n preset = collectionPreset;\n appId = collectionPreset.metadata.id;\n }\n\n if (preset === null || appId === null) {\n return null;\n }\n\n const plugins =\n resource.type === \"Manifest\"\n ? [...(manifestEditorPreset.plugins || []), ...(props.plugins || [])]\n : props.plugins || [];\n\n return (\n <PluginProvider\n plugins={plugins}\n enabled={props.enabledPlugins}\n disabled={props.disabledPlugins}\n globalPluginConfig={props.globalPluginConfig}\n saveGlobalPluginConfig={props.saveGlobalPluginConfig}\n >\n <AppProvider appId={appId} definition={preset} instanceId=\"test-1\">\n <VaultProvider vault={vault}>\n <ShellProvider\n resource={resource}\n config={props.config}\n saveConfig={props.saveConfig}\n >\n <Layout layoutMode={props.layoutMode} />\n </ShellProvider>\n </VaultProvider>\n </AppProvider>\n </PluginProvider>\n );\n}\n"],"mappings":"2XAiBA,MAAM,EAAiB,EAAO,EAAqB,CAsBnD,SAAS,EACP,EAMA,EACmB,CACnB,GAAI,EACF,OAEF,IAAMA,EAAiB,sBAEjBC,EACJ,OAAO,GAAY,WAAa,GAAS,CAAG,EACxCC,EAAgB,EAAW,GAAG,EAAO,IAAI,IAAa,EAC5D,MAAU,MAAM,EAAM,CAGxB,SAAgB,EAAe,EAA4B,CACzD,IAAM,EAAQ,EAAiB,EAAM,MAAM,CACrC,EAAU,EAAO,GAAG,CAE1B,EACE,EAAM,SACN;;EAGD,CAED,IAAM,EACJ,OAAO,EAAM,UAAa,SACtB,CAAE,GAAI,EAAM,SAAU,KAAM,WAAY,CACxC,EAAM,SAEP,EAAM,cAAc,EAAS,GAAG,GAC/B,EAAM,KACR,EAAM,iBAAiB,EAAS,GAAI,EAAM,KAAK,CAE3C,EAAQ,UAAY,EAAS,KAC/B,EAAM,KAAK,EAAS,CACpB,EAAQ,QAAU,EAAS,KAKjC,IAAI,EAAS,KACT,EAAQ,KAmBZ,OAjBI,EAAS,OAAS,YACpB,EAAS,EACT,EAAQ,EAAe,SAAS,IACvB,EAAS,OAAS,eAC3B,EAAS,EACT,EAAQ,EAAiB,SAAS,IAGhC,IAAW,MAAQ,IAAU,KACxB,KASP,EAAC,EAAA,CACC,QANF,EAAS,OAAS,WACd,CAAC,GAAI,EAAqB,SAAW,EAAE,CAAG,GAAI,EAAM,SAAW,EAAE,CAAE,CACnE,EAAM,SAAW,EAAE,CAKrB,QAAS,EAAM,eACf,SAAU,EAAM,gBAChB,mBAAoB,EAAM,mBAC1B,uBAAwB,EAAM,gCAE9B,EAAC,EAAA,CAAmB,QAAO,WAAY,EAAQ,WAAW,kBACxD,EAAC,EAAA,CAAqB,iBACpB,EAAC,EAAA,CACW,WACV,OAAQ,EAAM,OACd,WAAY,EAAM,oBAElB,EAAC,EAAA,CAAO,WAAY,EAAM,WAAA,CAAc,EAC1B,EACF,EACJ,EACC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "manifest-editor",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bugs": "https://github.com/digirati-co-uk/iiif-manifest-editor/issues",
|
|
6
6
|
"repository": {
|
|
@@ -92,15 +92,15 @@
|
|
|
92
92
|
"@iiif/parser": "2.2.8",
|
|
93
93
|
"@iiif/presentation-3": "^2.2.3",
|
|
94
94
|
"@iiif/presentation-3-normalized": "^0.9.7",
|
|
95
|
-
"@manifest-editor/collection-preset": "2.
|
|
96
|
-
"@manifest-editor/components": "2.
|
|
97
|
-
"@manifest-editor/creator-api": "2.
|
|
98
|
-
"@manifest-editor/creators": "2.
|
|
99
|
-
"@manifest-editor/editor-api": "2.
|
|
100
|
-
"@manifest-editor/editors": "2.
|
|
101
|
-
"@manifest-editor/exhibition-preset": "2.
|
|
102
|
-
"@manifest-editor/manifest-preset": "2.
|
|
103
|
-
"@manifest-editor/shell": "2.
|
|
95
|
+
"@manifest-editor/collection-preset": "2.1.0",
|
|
96
|
+
"@manifest-editor/components": "2.1.0",
|
|
97
|
+
"@manifest-editor/creator-api": "2.1.0",
|
|
98
|
+
"@manifest-editor/creators": "2.1.0",
|
|
99
|
+
"@manifest-editor/editor-api": "2.1.0",
|
|
100
|
+
"@manifest-editor/editors": "2.1.0",
|
|
101
|
+
"@manifest-editor/exhibition-preset": "2.1.0",
|
|
102
|
+
"@manifest-editor/manifest-preset": "2.1.0",
|
|
103
|
+
"@manifest-editor/shell": "2.1.0",
|
|
104
104
|
"@mdxeditor/editor": "^3.29.0",
|
|
105
105
|
"iiif-browser": "2.0.5-next.95a29ac",
|
|
106
106
|
"react": "19.2.0",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"react-iiif-vault": "2.0.11"
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
|
-
"@manifest-editor/ui": "2.0
|
|
111
|
+
"@manifest-editor/ui": "2.1.0",
|
|
112
112
|
"@repo/eslint-config": "",
|
|
113
113
|
"@tailwindcss/postcss": "^4.1.12",
|
|
114
114
|
"@types/react": "^18.3.3",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"publishConfig": {
|
|
128
128
|
"access": "public"
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "96fdf3010c854efc620205ad43a3e361fea56691"
|
|
131
131
|
}
|