sanity-plugin-aprimo 0.4.2 → 1.0.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.
- package/LICENSE +1 -1
- package/README.md +5 -6
- package/dist/index.d.ts +96 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +266 -21
- package/dist/index.js.map +1 -1
- package/package.json +49 -49
- package/dist/arrayFunctions.js +0 -116
- package/dist/arrayFunctions.js.map +0 -1
- package/dist/components/AprimoCDNPreview.js +0 -26
- package/dist/components/AprimoCDNPreview.js.map +0 -1
- package/dist/components/AprimoCDNWidget.js +0 -163
- package/dist/components/AprimoCDNWidget.js.map +0 -1
- package/dist/components/AprimoDiff.js +0 -45
- package/dist/components/AprimoDiff.js.map +0 -1
- package/dist/components/AprimoPreview.js +0 -137
- package/dist/components/AprimoPreview.js.map +0 -1
- package/dist/components/AprimoWidget.js +0 -247
- package/dist/components/AprimoWidget.js.map +0 -1
- package/dist/components/ImagePreview.js +0 -32
- package/dist/components/ImagePreview.js.map +0 -1
- package/dist/components/RenditionSelector.js +0 -49
- package/dist/components/RenditionSelector.js.map +0 -1
- package/dist/components/SecretsConfigView.js +0 -49
- package/dist/components/SecretsConfigView.js.map +0 -1
- package/dist/schema/AprimoAsset.js +0 -120
- package/dist/schema/AprimoAsset.js.map +0 -1
- package/dist/schema/AprimoCDNAsset.js +0 -54
- package/dist/schema/AprimoCDNAsset.js.map +0 -1
- package/dist/typings.d.js +0 -2
- package/dist/typings.d.js.map +0 -1
- package/dist/utils/auth.js +0 -41
- package/dist/utils/auth.js.map +0 -1
- package/dist/utils/getRenditions.js +0 -31
- package/dist/utils/getRenditions.js.map +0 -1
- package/dist/utils/index.js +0 -45
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/openSelector.js +0 -36
- package/dist/utils/openSelector.js.map +0 -1
- package/sanity.json +0 -20
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -2,22 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
-
This plugin allows you to open the Aprimo DAM asset selector from your studio and save those chosen assets and renditions in your Sanity documents.
|
|
6
|
-
|
|
7
|
-
NOTE: To take advantage of assets that aren't public renditions, you will need to authenticate requests from the studio. Because CORS isn't possible with Aprimo, you will need to set up a proxy to route authentication requests (this proxy endpoint can be configured from the studio). Your proxy endpoint should be able to route requests from the studio to https://your-tenant-name.aprimo.com/api/oauth/create-native-token. If you are using serverless functions or Next.js and would rather route all requests according to an `X-URL` header, we've set up a quickstart example for that [here](https://github.com/sanity-io/example-sanity-proxy).
|
|
5
|
+
This plugin allows you to open the Aprimo DAM asset selector from your studio and save those chosen assets and renditions in your Sanity documents. Because CORS isn't possible with Aprimo, we have removed the ability to use assets that are not public renditions. We may restore this functionality in the future, once CORS requests are allowed or we have sufficient guidance on using a proxy server.
|
|
8
6
|
|
|
9
7
|
## Installation
|
|
10
8
|
|
|
11
|
-
1. In your studio directory, run `
|
|
12
|
-
2. Declare a field to be `aprimo.
|
|
9
|
+
1. In your studio directory, run `npm install sanity-plugin-aprimo`.
|
|
10
|
+
2. Declare a field to be `aprimo.cdnasset` in your schema. For example:
|
|
13
11
|
|
|
14
12
|
```javascript
|
|
15
13
|
{
|
|
16
|
-
type: "aprimo.
|
|
14
|
+
type: "aprimo.cdnasset",
|
|
17
15
|
name: "image",
|
|
18
16
|
description: "This asset is served from Aprimo",
|
|
19
17
|
}
|
|
20
18
|
```
|
|
19
|
+
|
|
21
20
|
3. Navigate to that directory in your studio. There will be a plugin icon to the top left of that field, that will allow you to add the credentials for your Aprimo tenant. Enter in these details (they will be safely stored in your Sanity dataset as a private document. Remember to include these credentials across all your datasets!) If any of these fields are confusing, contact your Aprimo administrator.
|
|
22
21
|
|
|
23
22
|
<img width="324" alt="aprimo credentials" src="https://user-images.githubusercontent.com/3969996/136494120-0951c831-96da-4317-8b5f-d8d1f689c775.png">
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import * as sanity4 from "sanity";
|
|
2
|
+
import { ObjectInputProps, SchemaType } from "sanity";
|
|
3
|
+
import React$1 from "react";
|
|
4
|
+
interface AprimoCDNAsset {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
rendition: {
|
|
8
|
+
id: string;
|
|
9
|
+
publicuri: string;
|
|
10
|
+
};
|
|
11
|
+
_key?: string;
|
|
12
|
+
}
|
|
13
|
+
interface AprimoAdditionalFile {
|
|
14
|
+
additionalFileId: string;
|
|
15
|
+
fileName: string;
|
|
16
|
+
label: string;
|
|
17
|
+
type: string;
|
|
18
|
+
}
|
|
19
|
+
interface AprimoAsset {
|
|
20
|
+
id: string;
|
|
21
|
+
title: string;
|
|
22
|
+
additionalFile?: AprimoAdditionalFile;
|
|
23
|
+
_key?: string;
|
|
24
|
+
}
|
|
25
|
+
interface AprimoConfig {
|
|
26
|
+
tenantName: string;
|
|
27
|
+
}
|
|
28
|
+
declare const aprimoPlugin: sanity4.Plugin<Partial<AprimoConfig>>;
|
|
29
|
+
declare function AprimoDiff({
|
|
30
|
+
diff,
|
|
31
|
+
schemaType
|
|
32
|
+
}: {
|
|
33
|
+
diff: any;
|
|
34
|
+
schemaType: SchemaType;
|
|
35
|
+
}): React.JSX.Element;
|
|
36
|
+
interface AprimoWidgetProps extends ObjectInputProps<AprimoCDNAsset | AprimoAsset> {
|
|
37
|
+
pluginConfig: AprimoConfig;
|
|
38
|
+
}
|
|
39
|
+
declare function AprimoWidget(props: AprimoWidgetProps): React.JSX.Element;
|
|
40
|
+
declare const AprimoCDNAssetSchema: {
|
|
41
|
+
type: string;
|
|
42
|
+
name: string;
|
|
43
|
+
title: string;
|
|
44
|
+
fields: ({
|
|
45
|
+
type: string;
|
|
46
|
+
name: string;
|
|
47
|
+
fields?: never;
|
|
48
|
+
} | {
|
|
49
|
+
type: string;
|
|
50
|
+
name: string;
|
|
51
|
+
fields: {
|
|
52
|
+
type: string;
|
|
53
|
+
name: string;
|
|
54
|
+
}[];
|
|
55
|
+
})[];
|
|
56
|
+
components: {
|
|
57
|
+
input: typeof AprimoWidget;
|
|
58
|
+
diff: typeof AprimoDiff;
|
|
59
|
+
};
|
|
60
|
+
preview: {
|
|
61
|
+
select: {
|
|
62
|
+
url: string;
|
|
63
|
+
title: string;
|
|
64
|
+
};
|
|
65
|
+
prepare({
|
|
66
|
+
url,
|
|
67
|
+
title
|
|
68
|
+
}: {
|
|
69
|
+
url: string;
|
|
70
|
+
title: string;
|
|
71
|
+
}): {
|
|
72
|
+
title: string;
|
|
73
|
+
media: React$1.JSX.Element;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
declare const AprimoAssetSchema: {
|
|
78
|
+
type: string;
|
|
79
|
+
name: string;
|
|
80
|
+
title: string;
|
|
81
|
+
fields: {
|
|
82
|
+
type: string;
|
|
83
|
+
name: string;
|
|
84
|
+
}[];
|
|
85
|
+
components: {
|
|
86
|
+
input: typeof AprimoWidget;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
declare const AprimoAdditionalFileSchema: {
|
|
90
|
+
type: "object";
|
|
91
|
+
name: "aprimo.additionalFile";
|
|
92
|
+
} & Omit<sanity4.ObjectDefinition, "preview"> & {
|
|
93
|
+
preview?: sanity4.PreviewConfig<Record<string, string>, Record<never, any>>;
|
|
94
|
+
};
|
|
95
|
+
export { type AprimoAdditionalFile, AprimoAdditionalFileSchema, type AprimoAsset, AprimoAssetSchema, type AprimoCDNAsset, AprimoCDNAssetSchema, type AprimoConfig, AprimoWidget, aprimoPlugin };
|
|
96
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["AprimoCDNAsset","AprimoAdditionalFile","AprimoAsset","AprimoConfig","AprimoConfig","aprimoPlugin","Partial","sanity4","Plugin","SchemaType","AprimoDiff","diff","schemaType","React","JSX","Element","ObjectInputProps","AprimoCDNAsset","AprimoAsset","AprimoConfig","AprimoWidgetProps","AprimoWidget","React","JSX","Element","React","AprimoDiff","AprimoWidget","AprimoCDNAssetSchema","url","title","JSX","Element","AprimoWidget","AprimoAssetSchema","AprimoAdditionalFileSchema","sanity2","ObjectDefinition","Omit","Record","PreviewConfig"],"sources":["../src/types.d.ts","../src/plugin.d.ts","../src/components/AprimoDiff.d.ts","../src/components/AprimoWidget.d.ts","../src/schema/AprimoCDNAsset.d.ts","../src/schema/AprimoAsset.d.ts","../src/schema/AdditionalFile.d.ts"],"sourcesContent":["export interface AprimoCDNAsset {\n id: string;\n title: string;\n rendition: {\n id: string;\n publicuri: string;\n };\n _key?: string;\n}\nexport interface AprimoAdditionalFile {\n additionalFileId: string;\n fileName: string;\n label: string;\n type: string;\n}\nexport interface AprimoAsset {\n id: string;\n title: string;\n additionalFile?: AprimoAdditionalFile;\n _key?: string;\n}\nexport interface AprimoConfig {\n tenantName: string;\n}\n//# sourceMappingURL=types.d.ts.map","import type { AprimoConfig } from './types';\nexport declare const aprimoPlugin: import(\"sanity\").Plugin<Partial<AprimoConfig>>;\n//# sourceMappingURL=plugin.d.ts.map","import { type SchemaType } from 'sanity';\nexport declare function AprimoDiff({ diff, schemaType }: {\n diff: any;\n schemaType: SchemaType;\n}): React.JSX.Element;\n//# sourceMappingURL=AprimoDiff.d.ts.map","import { type ObjectInputProps } from 'sanity';\nimport type { AprimoCDNAsset, AprimoAsset, AprimoConfig } from '../types';\nexport interface AprimoWidgetProps extends ObjectInputProps<AprimoCDNAsset | AprimoAsset> {\n pluginConfig: AprimoConfig;\n}\nexport declare function AprimoWidget(props: AprimoWidgetProps): React.JSX.Element;\n//# sourceMappingURL=AprimoWidget.d.ts.map","import type React from 'react';\nimport { AprimoDiff } from '../components/AprimoDiff';\nimport { AprimoWidget } from '../components/AprimoWidget';\nexport declare const AprimoCDNAssetSchema: {\n type: string;\n name: string;\n title: string;\n fields: ({\n type: string;\n name: string;\n fields?: never;\n } | {\n type: string;\n name: string;\n fields: {\n type: string;\n name: string;\n }[];\n })[];\n components: {\n input: typeof AprimoWidget;\n diff: typeof AprimoDiff;\n };\n preview: {\n select: {\n url: string;\n title: string;\n };\n prepare({ url, title }: {\n url: string;\n title: string;\n }): {\n title: string;\n media: React.JSX.Element;\n };\n };\n};\n//# sourceMappingURL=AprimoCDNAsset.d.ts.map","import { AprimoWidget } from '../components/AprimoWidget';\nexport declare const AprimoAssetSchema: {\n type: string;\n name: string;\n title: string;\n fields: {\n type: string;\n name: string;\n }[];\n components: {\n input: typeof AprimoWidget;\n };\n};\n//# sourceMappingURL=AprimoAsset.d.ts.map","export declare const AprimoAdditionalFileSchema: {\n type: \"object\";\n name: \"aprimo.additionalFile\";\n} & Omit<import(\"sanity\").ObjectDefinition, \"preview\"> & {\n preview?: import(\"sanity\").PreviewConfig<Record<string, string>, Record<never, any>>;\n};\n//# sourceMappingURL=AdditionalFile.d.ts.map"],"mappings":";;;UAAiBA,cAAAA;;;;IAAAA,EAAAA,EAAAA,MAAAA;IASAC,SAAAA,EAAAA,MAAAA;EAMAC,CAAAA;EAMAC,IAAAA,CAAAA,EAAAA,MAAAA;;ACpBIE,UDQJJ,oBAAAA,CCRgE;EAAdG,gBAAAA,EAAAA,MAAAA;EAARE,QAAAA,EAAAA,MAAAA;EAAOC,KAAdC,EAAAA,MAAAA;EAAM,IAAA,EAAA,MAAA;;ACAlCE,UFcPR,WAAAA,CEdiB;EAAGS,EAAAA,EAAAA,MAAAA;EAAMC,KAAAA,EAAAA,MAAAA;EAE3BH,cAAAA,CAAAA,EFeKR,oBEfLQ;EACZI,IAAMC,CAAAA,EAAIC,MAAAA;;UFiBGZ,YAAAA;EGnBAiB,UAAAA,EAAAA,MAAAA;;cFDIf,cAA6CE,OAAAA,CAAdC,OAAOF,QAAQF;iBCA3CM,UAAAA;;;AFDxB;;cEGgBD;AFHhB,CAAA,CAAA,EEIII,KAAAA,CAAMC,GAAAA,CAAIC,OFJiB;UGEdK,iBAAAA,SAA0BJ,iBAAiBC,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,OAAAA,CAA5CI,aNJA,CMIcD,MNJd,CAAA,MAAA,EAAA,MAAA,CAAA,EMIsCA,MNJtC,CAAA,KAAA,EAAA,GAAA,CAAA,CAAA;AAS/B,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,24 +1,269 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { PatchEvent, unset, set, defineType, DiffFromTo, definePlugin, isObjectInputProps } from "sanity";
|
|
3
|
+
import { c } from "react-compiler-runtime";
|
|
4
|
+
import { Box, Card, Flex, Label, Stack, Text, Button, Grid } from "@sanity/ui";
|
|
5
|
+
import { useState, useEffect } from "react";
|
|
6
|
+
const openSelector = (tenantName, selectType) => {
|
|
7
|
+
let assetType = "asset rendition";
|
|
8
|
+
switch (selectType) {
|
|
9
|
+
case "singlefile":
|
|
10
|
+
assetType = "asset file";
|
|
11
|
+
break;
|
|
12
|
+
case "multiple":
|
|
13
|
+
assetType = "asset renditions";
|
|
14
|
+
break;
|
|
15
|
+
default:
|
|
16
|
+
assetType = "asset rendition";
|
|
10
17
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
const selectorOptions = {
|
|
19
|
+
title: `Select ${assetType}`,
|
|
20
|
+
description: `Select the ${assetType} you'd like to bring into this document`,
|
|
21
|
+
accept: `Use ${assetType}`,
|
|
22
|
+
select: selectType
|
|
23
|
+
}, params = `scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,
|
|
24
|
+
width=1000,height=600,left=100,top=100`, encodedOptions = btoa(JSON.stringify(selectorOptions));
|
|
25
|
+
window.open(`https://${tenantName}.dam.aprimo.com/dam/selectcontent#options=${encodedOptions}`, "selector", params);
|
|
26
|
+
};
|
|
27
|
+
function AprimoCDNPreview(t0) {
|
|
28
|
+
const $ = c(6), {
|
|
29
|
+
value,
|
|
30
|
+
layout: t1
|
|
31
|
+
} = t0, layout = t1 === void 0 ? "block" : t1, url = value?.rendition?.publicuri;
|
|
32
|
+
if (url) {
|
|
33
|
+
const t2 = `preview for ${value?.title}`, t3 = layout === "block" ? "80px" : "100%";
|
|
34
|
+
let t4;
|
|
35
|
+
$[0] !== t3 ? (t4 = {
|
|
36
|
+
maxWidth: t3,
|
|
37
|
+
height: "auto"
|
|
38
|
+
}, $[0] = t3, $[1] = t4) : t4 = $[1];
|
|
39
|
+
let t5;
|
|
40
|
+
return $[2] !== t2 || $[3] !== t4 || $[4] !== url ? (t5 = /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx("img", { alt: t2, src: url, style: t4 }) }), $[2] = t2, $[3] = t4, $[4] = url, $[5] = t5) : t5 = $[5], t5;
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
function AprimoFilePreview(t0) {
|
|
45
|
+
const $ = c(11), {
|
|
46
|
+
value,
|
|
47
|
+
tenantName
|
|
48
|
+
} = t0, {
|
|
49
|
+
title,
|
|
50
|
+
additionalFile,
|
|
51
|
+
id
|
|
52
|
+
} = value, assetName = additionalFile?.fileName || title || "No name", damUrl = `https://${tenantName}.dam.aprimo.com/Assets/Records/${id}`;
|
|
53
|
+
let t1;
|
|
54
|
+
$[0] !== damUrl ? (t1 = () => {
|
|
55
|
+
window.open(damUrl, "_blank");
|
|
56
|
+
}, $[0] = damUrl, $[1] = t1) : t1 = $[1];
|
|
57
|
+
const onClick = t1;
|
|
58
|
+
let t2;
|
|
59
|
+
$[2] === Symbol.for("react.memo_cache_sentinel") ? (t2 = /* @__PURE__ */ jsx(Label, { as: "p", children: "Aprimo File Asset" }), $[2] = t2) : t2 = $[2];
|
|
60
|
+
let t3;
|
|
61
|
+
$[3] !== assetName ? (t3 = /* @__PURE__ */ jsxs(Stack, { space: 3, children: [
|
|
62
|
+
t2,
|
|
63
|
+
/* @__PURE__ */ jsx(Text, { as: "p", children: assetName })
|
|
64
|
+
] }), $[3] = assetName, $[4] = t3) : t3 = $[4];
|
|
65
|
+
let t4;
|
|
66
|
+
$[5] !== damUrl || $[6] !== onClick ? (t4 = /* @__PURE__ */ jsx(Stack, { children: /* @__PURE__ */ jsx(Button, { tone: "primary", as: "a", href: damUrl, target: "_blank", onClick, text: "View" }) }), $[5] = damUrl, $[6] = onClick, $[7] = t4) : t4 = $[7];
|
|
67
|
+
let t5;
|
|
68
|
+
return $[8] !== t3 || $[9] !== t4 ? (t5 = /* @__PURE__ */ jsx(Box, { paddingY: 1, children: /* @__PURE__ */ jsx(Card, { paddingY: 3, paddingX: 3, radius: 1, shadow: 1, children: /* @__PURE__ */ jsxs(Flex, { align: "center", justify: "space-between", gap: 1, children: [
|
|
69
|
+
t3,
|
|
70
|
+
t4
|
|
71
|
+
] }) }) }), $[8] = t3, $[9] = t4, $[10] = t5) : t5 = $[10], t5;
|
|
72
|
+
}
|
|
73
|
+
const isAprimoCDNAsset = (value) => value && value.hasOwnProperty("rendition"), isAprimoAsset = (value) => value && value.hasOwnProperty("id");
|
|
74
|
+
function AprimoWidget(props) {
|
|
75
|
+
const $ = c(37), {
|
|
76
|
+
value,
|
|
77
|
+
readOnly,
|
|
78
|
+
onChange,
|
|
79
|
+
schemaType,
|
|
80
|
+
pluginConfig: t0
|
|
81
|
+
} = props, {
|
|
82
|
+
tenantName
|
|
83
|
+
} = t0, _key = value?._key;
|
|
84
|
+
let t1;
|
|
85
|
+
$[0] !== onChange ? (t1 = () => {
|
|
86
|
+
onChange(PatchEvent.from(unset()));
|
|
87
|
+
}, $[0] = onChange, $[1] = t1) : t1 = $[1];
|
|
88
|
+
const removeValue = t1, [isLoading, setIsLoading] = useState(!1);
|
|
89
|
+
let t2;
|
|
90
|
+
$[2] !== onChange ? (t2 = (asset) => {
|
|
91
|
+
onChange(PatchEvent.from(asset ? set(asset) : unset()));
|
|
92
|
+
}, $[2] = onChange, $[3] = t2) : t2 = $[3];
|
|
93
|
+
const setAsset = t2;
|
|
94
|
+
let t3;
|
|
95
|
+
$[4] !== _key || $[5] !== isLoading || $[6] !== setAsset || $[7] !== tenantName ? (t3 = () => {
|
|
96
|
+
const handleMessageEvent = async (event) => {
|
|
97
|
+
tenantName && event.origin === `https://${tenantName || ""}.dam.aprimo.com` && (event.data.result === "cancel" ? setIsLoading(!1) : event.data.selection && event.data.selection[0] && isLoading && (setAsset(_key ? {
|
|
98
|
+
...event.data.selection[0],
|
|
99
|
+
_key
|
|
100
|
+
} : event.data.selection[0]), setIsLoading(!1)));
|
|
101
|
+
};
|
|
102
|
+
return window.addEventListener("message", handleMessageEvent), () => window.removeEventListener("message", handleMessageEvent);
|
|
103
|
+
}, $[4] = _key, $[5] = isLoading, $[6] = setAsset, $[7] = tenantName, $[8] = t3) : t3 = $[8];
|
|
104
|
+
let t4;
|
|
105
|
+
$[9] !== _key || $[10] !== isLoading || $[11] !== tenantName ? (t4 = [tenantName, isLoading, _key], $[9] = _key, $[10] = isLoading, $[11] = tenantName, $[12] = t4) : t4 = $[12], useEffect(t3, t4);
|
|
106
|
+
let t5;
|
|
107
|
+
$[13] !== schemaType.name || $[14] !== tenantName ? (t5 = () => {
|
|
108
|
+
const selectType = schemaType.name === "aprimo.cdnasset" ? "singlerendition" : "singlefile";
|
|
109
|
+
setIsLoading(!0), openSelector(tenantName, selectType);
|
|
110
|
+
}, $[13] = schemaType.name, $[14] = tenantName, $[15] = t5) : t5 = $[15];
|
|
111
|
+
const action = t5;
|
|
112
|
+
let t6;
|
|
113
|
+
bb0: {
|
|
114
|
+
if (value && schemaType.name === "aprimo.cdnasset" && isAprimoCDNAsset(value)) {
|
|
115
|
+
let t72;
|
|
116
|
+
$[16] !== value ? (t72 = /* @__PURE__ */ jsx(AprimoCDNPreview, { value, layout: "default" }), $[16] = value, $[17] = t72) : t72 = $[17], t6 = t72;
|
|
117
|
+
break bb0;
|
|
118
|
+
} else if (value && schemaType.name === "aprimo.asset" && isAprimoAsset(value)) {
|
|
119
|
+
let t72;
|
|
120
|
+
$[18] !== tenantName || $[19] !== value ? (t72 = /* @__PURE__ */ jsx(AprimoFilePreview, { value, tenantName }), $[18] = tenantName, $[19] = value, $[20] = t72) : t72 = $[20], t6 = t72;
|
|
121
|
+
break bb0;
|
|
122
|
+
}
|
|
123
|
+
t6 = null;
|
|
124
|
+
}
|
|
125
|
+
const preview = t6;
|
|
126
|
+
if (!tenantName) {
|
|
127
|
+
let t72;
|
|
128
|
+
return $[21] === Symbol.for("react.memo_cache_sentinel") ? (t72 = /* @__PURE__ */ jsx(Box, { padding: 3, children: /* @__PURE__ */ jsx(Card, { padding: 4, radius: 2, shadow: 1, tone: "caution", children: /* @__PURE__ */ jsx(Text, { children: "The tenant name has not been set in the configuration for the Aprimo plugin. Please add a tenant name." }) }) }), $[21] = t72) : t72 = $[21], t72;
|
|
129
|
+
}
|
|
130
|
+
let t7;
|
|
131
|
+
$[22] !== preview ? (t7 = /* @__PURE__ */ jsx(Box, { children: preview }), $[22] = preview, $[23] = t7) : t7 = $[23];
|
|
132
|
+
let t8;
|
|
133
|
+
$[24] === Symbol.for("react.memo_cache_sentinel") ? (t8 = {
|
|
134
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(100px, 1fr))"
|
|
135
|
+
}, $[24] = t8) : t8 = $[24];
|
|
136
|
+
let t9;
|
|
137
|
+
$[25] !== action || $[26] !== readOnly ? (t9 = /* @__PURE__ */ jsx(Button, { disabled: readOnly, mode: "ghost", title: "Select an asset", kind: "default", onClick: action, children: "Select\u2026" }), $[25] = action, $[26] = readOnly, $[27] = t9) : t9 = $[27];
|
|
138
|
+
const t10 = readOnly || !value;
|
|
139
|
+
let t11;
|
|
140
|
+
$[28] !== removeValue || $[29] !== t10 ? (t11 = /* @__PURE__ */ jsx(Button, { disabled: t10, color: "danger", mode: "ghost", title: "Remove asset", onClick: removeValue, children: "Remove" }), $[28] = removeValue, $[29] = t10, $[30] = t11) : t11 = $[30];
|
|
141
|
+
let t12;
|
|
142
|
+
$[31] !== t11 || $[32] !== t9 ? (t12 = /* @__PURE__ */ jsxs(Grid, { gap: 1, style: t8, children: [
|
|
143
|
+
t9,
|
|
144
|
+
t11
|
|
145
|
+
] }), $[31] = t11, $[32] = t9, $[33] = t12) : t12 = $[33];
|
|
146
|
+
let t13;
|
|
147
|
+
return $[34] !== t12 || $[35] !== t7 ? (t13 = /* @__PURE__ */ jsxs(Box, { children: [
|
|
148
|
+
t7,
|
|
149
|
+
t12
|
|
150
|
+
] }), $[34] = t12, $[35] = t7, $[36] = t13) : t13 = $[36], t13;
|
|
151
|
+
}
|
|
152
|
+
const AprimoAdditionalFileSchema = defineType({
|
|
153
|
+
name: "aprimo.additionalFile",
|
|
154
|
+
title: "Aprimo Additional File",
|
|
155
|
+
type: "object",
|
|
156
|
+
fields: [{
|
|
157
|
+
name: "additionalFileId",
|
|
158
|
+
title: "Additional File ID",
|
|
159
|
+
type: "string"
|
|
160
|
+
}, {
|
|
161
|
+
name: "fileName",
|
|
162
|
+
title: "File Name",
|
|
163
|
+
type: "string"
|
|
164
|
+
}, {
|
|
165
|
+
name: "label",
|
|
166
|
+
title: "Label",
|
|
167
|
+
type: "string"
|
|
168
|
+
}, {
|
|
169
|
+
name: "type",
|
|
170
|
+
title: "Type",
|
|
171
|
+
type: "string"
|
|
172
|
+
}]
|
|
173
|
+
}), AprimoAssetSchema = {
|
|
174
|
+
type: "object",
|
|
175
|
+
name: "aprimo.asset",
|
|
176
|
+
title: "Aprimo Asset",
|
|
177
|
+
fields: [{
|
|
178
|
+
type: "string",
|
|
179
|
+
name: "id"
|
|
180
|
+
}, {
|
|
181
|
+
type: "string",
|
|
182
|
+
name: "title"
|
|
183
|
+
}, {
|
|
184
|
+
type: "aprimo.additionalFile",
|
|
185
|
+
name: "additionalFile"
|
|
186
|
+
}],
|
|
187
|
+
components: {
|
|
188
|
+
input: AprimoWidget
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
function AprimoDiff(t0) {
|
|
192
|
+
const $ = c(3), {
|
|
193
|
+
diff,
|
|
194
|
+
schemaType
|
|
195
|
+
} = t0;
|
|
196
|
+
let t1;
|
|
197
|
+
return $[0] !== diff || $[1] !== schemaType ? (t1 = /* @__PURE__ */ jsx(DiffFromTo, { diff, schemaType, previewComponent: AprimoCDNPreview }), $[0] = diff, $[1] = schemaType, $[2] = t1) : t1 = $[2], t1;
|
|
198
|
+
}
|
|
199
|
+
const AprimoCDNAssetSchema = {
|
|
200
|
+
type: "object",
|
|
201
|
+
name: "aprimo.cdnasset",
|
|
202
|
+
title: "Aprimo CDN Asset",
|
|
203
|
+
fields: [{
|
|
204
|
+
type: "string",
|
|
205
|
+
name: "id"
|
|
206
|
+
}, {
|
|
207
|
+
type: "string",
|
|
208
|
+
name: "title"
|
|
209
|
+
}, {
|
|
210
|
+
type: "object",
|
|
211
|
+
name: "rendition",
|
|
212
|
+
fields: [{
|
|
213
|
+
type: "string",
|
|
214
|
+
name: "publicuri"
|
|
215
|
+
}]
|
|
216
|
+
}],
|
|
217
|
+
components: {
|
|
218
|
+
input: AprimoWidget,
|
|
219
|
+
diff: AprimoDiff
|
|
220
|
+
},
|
|
221
|
+
preview: {
|
|
222
|
+
select: {
|
|
223
|
+
url: "rendition.publicuri",
|
|
224
|
+
title: "title"
|
|
225
|
+
},
|
|
226
|
+
prepare({
|
|
227
|
+
url,
|
|
228
|
+
title
|
|
229
|
+
}) {
|
|
230
|
+
return {
|
|
231
|
+
title,
|
|
232
|
+
media: /* @__PURE__ */ jsx("img", { src: url, style: {
|
|
233
|
+
height: "100%",
|
|
234
|
+
width: "100%"
|
|
235
|
+
} })
|
|
236
|
+
};
|
|
237
|
+
}
|
|
16
238
|
}
|
|
239
|
+
}, aprimoPlugin = definePlugin((config) => {
|
|
240
|
+
const reqConfig = {
|
|
241
|
+
tenantName: "",
|
|
242
|
+
...config
|
|
243
|
+
};
|
|
244
|
+
return {
|
|
245
|
+
name: "aprimo-assets",
|
|
246
|
+
schema: {
|
|
247
|
+
types: [AprimoCDNAssetSchema, AprimoAdditionalFileSchema, AprimoAssetSchema]
|
|
248
|
+
},
|
|
249
|
+
form: {
|
|
250
|
+
components: {
|
|
251
|
+
input: (props) => isObjectInputProps(props) && (isType(props.schemaType, AprimoCDNAssetSchema.name) || isType(props.schemaType, AprimoAssetSchema.name)) ? (
|
|
252
|
+
// @ts-expect-error - TODO: fix this
|
|
253
|
+
/* @__PURE__ */ jsx(AprimoWidget, { ...props, value: props.value, pluginConfig: reqConfig })
|
|
254
|
+
) : props.renderDefault(props)
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
};
|
|
17
258
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
259
|
+
function isType(schemaType, name) {
|
|
260
|
+
return schemaType.name === name ? !0 : schemaType.type ? isType(schemaType.type, name) : !1;
|
|
261
|
+
}
|
|
262
|
+
export {
|
|
263
|
+
AprimoAdditionalFileSchema,
|
|
264
|
+
AprimoAssetSchema,
|
|
265
|
+
AprimoCDNAssetSchema,
|
|
266
|
+
AprimoWidget,
|
|
267
|
+
aprimoPlugin
|
|
268
|
+
};
|
|
269
|
+
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;AACA","sourcesContent":["import aprimo from './schema/AprimoAsset'\nimport aprimoCDN from './schema/AprimoCDNAsset'\n\nexport { aprimo, aprimoCDN }\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/utils.ts","../src/components/AprimoCDNPreview.tsx","../src/components/AprimoFilePreview.tsx","../src/components/AprimoWidget.tsx","../src/schema/AdditionalFile.ts","../src/schema/AprimoAsset.ts","../src/components/AprimoDiff.tsx","../src/schema/AprimoCDNAsset.tsx","../src/plugin.tsx"],"sourcesContent":["export const openSelector = (tenantName: string, selectType: string): void => {\n let assetType = 'asset rendition'\n switch (selectType) {\n case 'singlefile':\n assetType = 'asset file'\n break\n case 'multiple':\n assetType = 'asset renditions'\n break\n default:\n assetType = 'asset rendition'\n }\n\n const selectorOptions = {\n title: `Select ${assetType}`,\n description: `Select the ${assetType} you'd like to bring into this document`,\n accept: `Use ${assetType}`,\n select: selectType,\n }\n\n const params = `scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,\n width=1000,height=600,left=100,top=100`\n\n const encodedOptions = btoa(JSON.stringify(selectorOptions))\n window.open(\n `https://${tenantName}.dam.aprimo.com/dam/selectcontent#options=${encodedOptions}`,\n 'selector',\n params,\n )\n}\n","import {Box} from '@sanity/ui'\n\nimport type {AprimoCDNAsset} from '../types'\n\ntype ComponentProps = {\n layout?: 'default' | 'block'\n value: AprimoCDNAsset\n title?: string\n}\n\nexport function AprimoCDNPreview({\n value,\n layout = 'block',\n}: ComponentProps): React.JSX.Element | null {\n const url = value?.rendition?.publicuri\n if (url) {\n return (\n <Box>\n <img\n alt={`preview for ${value?.title}`}\n src={url}\n style={{\n maxWidth: layout === 'block' ? '80px' : '100%',\n height: 'auto',\n }}\n />\n </Box>\n )\n }\n return null\n}\n","import {Card, Box, Flex, Stack, Text, Label, Button} from '@sanity/ui'\nimport {useCallback} from 'react'\n\nimport type {AprimoAsset} from '../types'\n\ninterface AprimoFilePreviewProps {\n value: AprimoAsset\n tenantName: string\n}\n\nexport function AprimoFilePreview({value, tenantName}: AprimoFilePreviewProps): React.JSX.Element {\n const {title, additionalFile, id} = value\n const assetName = additionalFile?.fileName || title || 'No name'\n const damUrl = `https://${tenantName}.dam.aprimo.com/Assets/Records/${id}`\n const onClick = useCallback(() => {\n window.open(damUrl, '_blank')\n }, [damUrl])\n return (\n <Box paddingY={1}>\n <Card paddingY={3} paddingX={3} radius={1} shadow={1}>\n <Flex align=\"center\" justify=\"space-between\" gap={1}>\n <Stack space={3}>\n <Label as=\"p\">Aprimo File Asset</Label>\n <Text as=\"p\">{assetName}</Text>\n </Stack>\n <Stack>\n {/* ADD launch icon */}\n <Button\n tone=\"primary\"\n as={'a'}\n href={damUrl}\n target={`_blank`}\n onClick={onClick}\n text={'View'}\n />\n </Stack>\n </Flex>\n </Card>\n </Box>\n )\n}\n","import {Box, Button, Card, Grid, Text} from '@sanity/ui'\nimport {useEffect, useState, useMemo} from 'react'\nimport {PatchEvent, type ObjectInputProps, set, unset} from 'sanity'\n\nimport type {AprimoCDNAsset, AprimoAsset, AprimoConfig} from '../types'\n\nimport {openSelector} from '../utils'\nimport {AprimoCDNPreview} from './AprimoCDNPreview'\nimport {AprimoFilePreview} from './AprimoFilePreview'\n\nconst isAprimoCDNAsset = (value: AprimoCDNAsset | AprimoAsset): value is AprimoCDNAsset => {\n return value && value.hasOwnProperty('rendition')\n}\n\nconst isAprimoAsset = (value: AprimoCDNAsset | AprimoAsset): value is AprimoAsset => {\n //the ID is all we need to construct a link back to Aprimo\n return value && value.hasOwnProperty('id')\n}\n\nexport interface AprimoWidgetProps extends ObjectInputProps<AprimoCDNAsset | AprimoAsset> {\n pluginConfig: AprimoConfig\n}\n\nexport function AprimoWidget(props: AprimoWidgetProps): React.JSX.Element {\n const {\n value,\n readOnly,\n onChange,\n schemaType,\n pluginConfig: {tenantName},\n } = props\n\n const _key = value?._key\n const removeValue = () => {\n onChange(PatchEvent.from(unset()))\n }\n\n //this keeps track of which component is requesting an asset\n const [isLoading, setIsLoading] = useState(false)\n\n const setAsset = (asset: Record<string, any>) => {\n onChange(PatchEvent.from(asset ? set(asset) : unset()))\n }\n\n useEffect(() => {\n const handleMessageEvent = async (event: MessageEvent) => {\n // Ensure only messages from the Aprimo Content Selector are handled\n if (tenantName && event.origin === `https://${tenantName || ''}.dam.aprimo.com`) {\n //if cancel, get out of fetching state\n if (event.data.result === 'cancel') {\n setIsLoading(false)\n } else if (event.data.selection && event.data.selection[0] && isLoading) {\n if (_key) {\n setAsset({...event.data.selection[0], _key})\n } else {\n setAsset(event.data.selection[0])\n }\n setIsLoading(false)\n }\n }\n }\n\n window.addEventListener('message', handleMessageEvent)\n //cleanup\n return () => window.removeEventListener('message', handleMessageEvent)\n }, [tenantName, isLoading, _key])\n\n const action = () => {\n const selectType = schemaType.name === 'aprimo.cdnasset' ? 'singlerendition' : 'singlefile'\n setIsLoading(true)\n openSelector(tenantName, selectType)\n }\n\n const preview = useMemo(() => {\n if (value && schemaType.name === 'aprimo.cdnasset' && isAprimoCDNAsset(value)) {\n return <AprimoCDNPreview value={value} layout=\"default\" />\n } else if (value && schemaType.name === 'aprimo.asset' && isAprimoAsset(value)) {\n return <AprimoFilePreview value={value} tenantName={tenantName} />\n }\n return null\n }, [tenantName, schemaType, value])\n\n if (!tenantName) {\n return (\n <Box padding={3}>\n <Card padding={4} radius={2} shadow={1} tone=\"caution\">\n <Text>\n The tenant name has not been set in the configuration for the Aprimo plugin. Please add\n a tenant name.\n </Text>\n </Card>\n </Box>\n )\n }\n\n return (\n <Box>\n <Box>{preview}</Box>\n <Grid gap={1} style={{gridTemplateColumns: 'repeat(auto-fit, minmax(100px, 1fr))'}}>\n <Button\n disabled={readOnly}\n mode=\"ghost\"\n title=\"Select an asset\"\n kind=\"default\"\n onClick={action}\n >\n Select…\n </Button>\n <Button\n disabled={readOnly || !value}\n color=\"danger\"\n mode=\"ghost\"\n title=\"Remove asset\"\n onClick={removeValue}\n >\n Remove\n </Button>\n </Grid>\n </Box>\n )\n}\n","import {defineType} from 'sanity'\n\nexport const AprimoAdditionalFileSchema = defineType({\n name: 'aprimo.additionalFile',\n title: 'Aprimo Additional File',\n type: 'object',\n fields: [\n {\n name: 'additionalFileId',\n title: 'Additional File ID',\n type: 'string',\n },\n {\n name: 'fileName',\n title: 'File Name',\n type: 'string',\n },\n {\n name: 'label',\n title: 'Label',\n type: 'string',\n },\n {\n name: 'type',\n title: 'Type',\n type: 'string',\n },\n ],\n})\n","import {AprimoWidget} from '../components/AprimoWidget'\n\nexport const AprimoAssetSchema = {\n type: 'object',\n name: 'aprimo.asset',\n title: 'Aprimo Asset',\n fields: [\n {\n type: 'string',\n name: 'id',\n },\n {\n type: 'string',\n name: 'title',\n },\n {\n type: 'aprimo.additionalFile',\n name: 'additionalFile',\n },\n ],\n components: {\n input: AprimoWidget,\n },\n}\n","import {DiffFromTo, type SchemaType} from 'sanity'\n\nimport {AprimoCDNPreview} from './AprimoCDNPreview'\n\n//@TODO: HUGE\nexport function AprimoDiff({\n diff,\n schemaType,\n}: {\n diff: any\n schemaType: SchemaType\n}): React.JSX.Element {\n return <DiffFromTo diff={diff} schemaType={schemaType} previewComponent={AprimoCDNPreview} />\n}\n","import type React from 'react'\n\nimport {AprimoDiff} from '../components/AprimoDiff'\nimport {AprimoWidget} from '../components/AprimoWidget'\n\nexport const AprimoCDNAssetSchema = {\n type: 'object',\n name: 'aprimo.cdnasset',\n title: 'Aprimo CDN Asset',\n fields: [\n {\n type: 'string',\n name: 'id',\n },\n {\n type: 'string',\n name: 'title',\n },\n {\n type: 'object',\n name: 'rendition',\n fields: [\n {\n type: 'string',\n name: 'publicuri',\n },\n ],\n },\n ],\n components: {\n input: AprimoWidget,\n diff: AprimoDiff,\n },\n preview: {\n select: {\n url: 'rendition.publicuri',\n title: 'title',\n },\n prepare({url, title}: {url: string; title: string}) {\n return {\n title,\n media: (<img src={url} style={{height: '100%', width: '100%'}} />) as React.JSX.Element,\n }\n },\n },\n}\n","import {definePlugin, isObjectInputProps, type SchemaType} from 'sanity'\n\nimport type {AprimoCDNAsset, AprimoConfig} from './types'\n\nimport {AprimoWidget} from './components/AprimoWidget'\nimport {AprimoAdditionalFileSchema} from './schema/AdditionalFile'\nimport {AprimoAssetSchema} from './schema/AprimoAsset'\nimport {AprimoCDNAssetSchema} from './schema/AprimoCDNAsset'\n\nexport const aprimoPlugin = definePlugin((config: Partial<AprimoConfig>) => {\n const reqConfig: AprimoConfig = {\n tenantName: '',\n ...config,\n }\n\n return {\n name: 'aprimo-assets',\n schema: {\n types: [AprimoCDNAssetSchema, AprimoAdditionalFileSchema, AprimoAssetSchema],\n },\n form: {\n components: {\n input: (props) => {\n if (\n isObjectInputProps(props) &&\n (isType(props.schemaType, AprimoCDNAssetSchema.name) ||\n isType(props.schemaType, AprimoAssetSchema.name))\n ) {\n return (\n // @ts-expect-error - TODO: fix this\n <AprimoWidget\n {...props}\n value={props.value as AprimoCDNAsset}\n pluginConfig={reqConfig}\n />\n )\n }\n //add array check here to render the widget in array\n return props.renderDefault(props)\n },\n },\n },\n }\n})\n\nfunction isType(schemaType: SchemaType, name: string): boolean {\n if (schemaType.name === name) {\n return true\n }\n if (schemaType.type) {\n return isType(schemaType.type, name)\n }\n return false\n}\n"],"names":["openSelector","tenantName","selectType","assetType","selectorOptions","title","description","accept","select","params","encodedOptions","btoa","JSON","stringify","window","open","AprimoCDNPreview","t0","$","_c","value","layout","t1","undefined","url","rendition","publicuri","t2","t3","t4","maxWidth","height","t5","AprimoFilePreview","additionalFile","id","assetName","fileName","damUrl","onClick","Symbol","for","isAprimoCDNAsset","hasOwnProperty","isAprimoAsset","AprimoWidget","props","readOnly","onChange","schemaType","pluginConfig","_key","PatchEvent","from","unset","removeValue","isLoading","setIsLoading","useState","asset","set","setAsset","handleMessageEvent","event","origin","data","result","selection","addEventListener","removeEventListener","useEffect","name","action","t6","bb0","t7","preview","t8","gridTemplateColumns","t9","t10","t11","t12","t13","AprimoAdditionalFileSchema","defineType","type","fields","AprimoAssetSchema","components","input","AprimoDiff","diff","AprimoCDNAssetSchema","prepare","media","width","aprimoPlugin","definePlugin","config","reqConfig","schema","types","form","isObjectInputProps","isType","renderDefault"],"mappings":";;;;;AAAO,MAAMA,eAAeA,CAACC,YAAoBC,eAA6B;AAC5E,MAAIC,YAAY;AAChB,UAAQD,YAAAA;AAAAA,IACN,KAAK;AACHC,kBAAY;AACZ;AAAA,IACF,KAAK;AACHA,kBAAY;AACZ;AAAA,IACF;AACEA,kBAAY;A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,QACA0F,OAAQ,oBAAC,OAAA,EAAI,KAAKvE,KAAK,OAAO;AAAA,UAACO,QAAQ;AAAA,UAAQiE,OAAO;AAAA,QAAA,EAAM,CAAE;AAAA,MAAA;AAAA,IAElE;AAAA,EAAA;AAEJ,GCpCaC,eAAeC,aAAcC,CAAAA,WAAkC;AAC1E,QAAMC,YAA0B;AAAA,IAC9BnG,YAAY;AAAA,IACZ,GAAGkG;AAAAA,EAAAA;AAGL,SAAO;AAAA,IACL5B,MAAM;AAAA,IACN8B,QAAQ;AAAA,MACNC,OAAO,CAACT,sBAAsBT,4BAA4BI,iBAAiB;AAAA,IAAA;AAAA,IAE7Ee,MAAM;AAAA,MACJd,YAAY;AAAA,QACVC,OAAQ5C,CAAAA,UAEJ0D,mBAAmB1D,KAAK,MACvB2D,OAAO3D,MAAMG,YAAY4C,qBAAqBtB,IAAI,KACjDkC,OAAO3D,MAAMG,YAAYuC,kBAAkBjB,IAAI;AAAA;AAAA,UAI/C,oBAAC,gBACC,GAAIzB,OACJ,OAAOA,MAAM1B,OACb,cAAcgF,UAAAA,CAAU;AAAA,YAKvBtD,MAAM4D,cAAc5D,KAAK;AAAA,MAAA;AAAA,IAEpC;AAAA,EACF;AAEJ,CAAC;AAED,SAAS2D,OAAOxD,YAAwBsB,MAAuB;AAC7D,SAAItB,WAAWsB,SAASA,OACf,KAELtB,WAAWqC,OACNmB,OAAOxD,WAAWqC,MAAMf,IAAI,IAE9B;AACT;"}
|
package/package.json
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"name": "sanity-plugin-aprimo",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Aprimo asset selector for Sanity",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"sanity",
|
|
7
|
+
"sanity-plugin"
|
|
8
|
+
],
|
|
9
|
+
"homepage": "https://github.com/sanity-io/plugins/tree/main/plugins/sanity-plugin-aprimo#readme",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/sanity-io/plugins/issues"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+ssh://git@github.com/sanity-io/plugins.git",
|
|
16
|
+
"directory": "plugins/sanity-plugin-aprimo"
|
|
17
|
+
},
|
|
3
18
|
"license": "MIT",
|
|
19
|
+
"author": "Sanity.io <hello@sanity.io>",
|
|
20
|
+
"type": "module",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": "./dist/index.js",
|
|
23
|
+
"./package.json": "./package.json"
|
|
24
|
+
},
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
4
26
|
"files": [
|
|
5
|
-
"dist"
|
|
6
|
-
"sanity.json"
|
|
27
|
+
"dist"
|
|
7
28
|
],
|
|
8
|
-
"
|
|
9
|
-
"
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@sanity/icons": "^3.7.4",
|
|
31
|
+
"@sanity/ui": "^3.1.11",
|
|
32
|
+
"react-compiler-runtime": "^1.0.0"
|
|
10
33
|
},
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@sanity/pkg-utils": "^10.0.0",
|
|
36
|
+
"@types/react": "^19.2.7",
|
|
37
|
+
"@typescript/native-preview": "7.0.0-dev.20251129.1",
|
|
38
|
+
"babel-plugin-react-compiler": "^1.0.0",
|
|
39
|
+
"eslint": "^9.39.1",
|
|
40
|
+
"react": "^19.2.0",
|
|
41
|
+
"sanity": "^4.20.0",
|
|
42
|
+
"typescript": "5.9.3",
|
|
43
|
+
"@repo/eslint-config": "0.0.3",
|
|
44
|
+
"@repo/package.config": "0.0.0",
|
|
45
|
+
"@repo/tsconfig": "1.0.0"
|
|
14
46
|
},
|
|
15
47
|
"peerDependencies": {
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"@sanity/form-builder": "^2.19.0",
|
|
19
|
-
"react": "^16.8.0 || 17.x"
|
|
20
|
-
},
|
|
21
|
-
"husky": {
|
|
22
|
-
"hooks": {
|
|
23
|
-
"pre-commit": "sanipack verify"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"prettier": {
|
|
27
|
-
"printWidth": 80,
|
|
28
|
-
"semi": false,
|
|
29
|
-
"singleQuote": true,
|
|
30
|
-
"trailingComma": "es5"
|
|
48
|
+
"react": "^18.3 || ^19",
|
|
49
|
+
"sanity": "^4"
|
|
31
50
|
},
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"@sanity/base": "^2.19.0",
|
|
36
|
-
"@sanity/field": "^2.19.0",
|
|
37
|
-
"@sanity/form-builder": "^2.19.0",
|
|
38
|
-
"@sanity/types": "^2.6.0",
|
|
39
|
-
"@size-limit/preset-small-lib": "^4.9.2",
|
|
40
|
-
"@types/react": "^17.0.2",
|
|
41
|
-
"@types/styled-components": "^5.1.12",
|
|
42
|
-
"@types/video.js": "^7.3.15",
|
|
43
|
-
"autoprefixer": "^9.0.0",
|
|
44
|
-
"cssnano": "^4.1.10",
|
|
45
|
-
"husky": "^5.1.3",
|
|
46
|
-
"postcss": "^8.0.0",
|
|
47
|
-
"rollup-plugin-postcss": "^4.0.0",
|
|
48
|
-
"sanipack": "^1.0.8",
|
|
49
|
-
"size-limit": "^4.9.2",
|
|
50
|
-
"tsdx": "^0.14.1",
|
|
51
|
-
"tslib": "^2.1.0",
|
|
52
|
-
"typescript": "^4.2.2"
|
|
51
|
+
"engines": {
|
|
52
|
+
"node": ">=20.19 <22 || >=22.12"
|
|
53
53
|
},
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
54
|
+
"scripts": {
|
|
55
|
+
"build": "pkg build --strict --check --clean",
|
|
56
|
+
"lint": "eslint .",
|
|
57
|
+
"typecheck": "(cd ../.. && tsgo --project plugins/sanity-plugin-aprimo/tsconfig.json)"
|
|
58
58
|
}
|
|
59
|
-
}
|
|
59
|
+
}
|