@comet/site-react 9.0.0-canary-20250915134805 → 9.0.0-canary-20251001104910
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/lib/blocks/SvgImageBlock.d.ts +2 -1
- package/lib/blocks/SvgImageBlock.d.ts.map +1 -1
- package/lib/blocks/SvgImageBlock.js +8 -2
- package/lib/blocks/factories/BlocksBlock.d.ts.map +1 -1
- package/lib/blocks/factories/BlocksBlock.js +6 -9
- package/lib/blocks/factories/OneOfBlock.d.ts.map +1 -1
- package/lib/blocks/factories/OneOfBlock.js +6 -9
- package/package.json +4 -4
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
1
2
|
import { SvgImageBlockData } from '../blocks.generated';
|
|
2
3
|
import { PropsWithData } from './PropsWithData';
|
|
3
4
|
interface SvgImageBlockProps extends PropsWithData<SvgImageBlockData> {
|
|
4
5
|
width?: string | number | "auto";
|
|
5
6
|
height?: string | number | "auto";
|
|
6
7
|
}
|
|
7
|
-
export declare const SvgImageBlock: ({ ...componentProps }: import('../iframebridge/withPreview').WithPreviewProps & SvgImageBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const SvgImageBlock: ({ ...componentProps }: import('../iframebridge/withPreview').WithPreviewProps & SvgImageBlockProps & Omit<HTMLAttributes<HTMLImageElement>, "width" | "height">) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
9
10
|
//# sourceMappingURL=SvgImageBlock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SvgImageBlock.d.ts","sourceRoot":"","sources":["../../src/blocks/SvgImageBlock.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAG7D,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,UAAU,kBAAmB,SAAQ,aAAa,CAAC,iBAAiB,CAAC;IACjE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CACrC;AAED,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"SvgImageBlock.d.ts","sourceRoot":"","sources":["../../src/blocks/SvgImageBlock.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAG7D,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,UAAU,kBAAmB,SAAQ,aAAa,CAAC,iBAAiB,CAAC;IACjE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CACrC;AAED,eAAO,MAAM,aAAa,8MAoBzB,CAAC"}
|
|
@@ -3,7 +3,12 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { withPreview } from "../iframebridge/withPreview.js";
|
|
4
4
|
import { PreviewSkeleton } from "../previewskeleton/PreviewSkeleton.js";
|
|
5
5
|
const SvgImageBlock = withPreview(
|
|
6
|
-
({
|
|
6
|
+
({
|
|
7
|
+
data: { damFile },
|
|
8
|
+
width = "100%",
|
|
9
|
+
height = "auto",
|
|
10
|
+
...restProps
|
|
11
|
+
}) => {
|
|
7
12
|
if (!damFile) return /* @__PURE__ */ jsx(PreviewSkeleton, { type: "media", hasContent: false, height: height === "auto" ? void 0 : height });
|
|
8
13
|
return /* @__PURE__ */ jsx(
|
|
9
14
|
"img",
|
|
@@ -12,7 +17,8 @@ const SvgImageBlock = withPreview(
|
|
|
12
17
|
width: width === "auto" ? void 0 : width,
|
|
13
18
|
height: height === "auto" ? void 0 : height,
|
|
14
19
|
alt: damFile.altText ?? "",
|
|
15
|
-
title: damFile.title ?? ""
|
|
20
|
+
title: damFile.title ?? "",
|
|
21
|
+
...restProps
|
|
16
22
|
}
|
|
17
23
|
);
|
|
18
24
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlocksBlock.d.ts","sourceRoot":"","sources":["../../../src/blocks/factories/BlocksBlock.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,UAAU,KAAK;IACX,eAAe,EAAE,eAAe,CAAC;IACjC,IAAI,EAAE;QACF,MAAM,EAAE,KAAK,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,OAAO,CAAC;YAAC,KAAK,EAAE,OAAO,CAAA;SAAE,CAAC,CAAC;KAClF,CAAC;CACL;AAED,eAAO,MAAM,WAAW,GAAI,uCAAuC,KAAK,
|
|
1
|
+
{"version":3,"file":"BlocksBlock.d.ts","sourceRoot":"","sources":["../../../src/blocks/factories/BlocksBlock.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,UAAU,KAAK;IACX,eAAe,EAAE,eAAe,CAAC;IACjC,IAAI,EAAE;QACF,MAAM,EAAE,KAAK,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,OAAO,CAAC;YAAC,KAAK,EAAE,OAAO,CAAA;SAAE,CAAC,CAAC;KAClF,CAAC;CACL;AAED,eAAO,MAAM,WAAW,GAAI,uCAAuC,KAAK,4CAgCvE,CAAC"}
|
|
@@ -10,15 +10,12 @@ const BlocksBlock = ({ supportedBlocks, data: { blocks } }) => {
|
|
|
10
10
|
const blockFunction = supportedBlocks[block.type];
|
|
11
11
|
if (!blockFunction) {
|
|
12
12
|
if (process.env.NODE_ENV === "development") {
|
|
13
|
-
return (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
JSON.stringify(block.props)
|
|
20
|
-
] }, block.key)
|
|
21
|
-
);
|
|
13
|
+
return /* @__PURE__ */ jsxs("pre", { children: [
|
|
14
|
+
"Unknown type (",
|
|
15
|
+
block.type,
|
|
16
|
+
"): ",
|
|
17
|
+
JSON.stringify(block.props)
|
|
18
|
+
] }, block.key);
|
|
22
19
|
}
|
|
23
20
|
return null;
|
|
24
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OneOfBlock.d.ts","sourceRoot":"","sources":["../../../src/blocks/factories/OneOfBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,UAAU,KAAM,SAAQ,iBAAiB;IACrC,IAAI,EAAE;QACF,KAAK,CAAC,EAAE;YACJ,IAAI,EAAE,MAAM,CAAC;YAEb,KAAK,EAAE,GAAG,CAAC;SACd,CAAC;KACL,CAAC;IACF,eAAe,EAAE,eAAe,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,UAAU,GAAI,+EAA+E,KAAK,
|
|
1
|
+
{"version":3,"file":"OneOfBlock.d.ts","sourceRoot":"","sources":["../../../src/blocks/factories/OneOfBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,UAAU,KAAM,SAAQ,iBAAiB;IACrC,IAAI,EAAE;QACF,KAAK,CAAC,EAAE;YACJ,IAAI,EAAE,MAAM,CAAC;YAEb,KAAK,EAAE,GAAG,CAAC;SACd,CAAC;KACL,CAAC;IACF,eAAe,EAAE,eAAe,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,UAAU,GAAI,+EAA+E,KAAK,mDAsB9G,CAAC"}
|
|
@@ -7,15 +7,12 @@ const OneOfBlock = ({ data: { block, ...additionalProps }, supportedBlocks, chil
|
|
|
7
7
|
const blockFunction = supportedBlocks[block.type];
|
|
8
8
|
if (!blockFunction) {
|
|
9
9
|
if (process.env.NODE_ENV === "development") {
|
|
10
|
-
return (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
JSON.stringify(block.props)
|
|
17
|
-
] })
|
|
18
|
-
);
|
|
10
|
+
return /* @__PURE__ */ jsxs("pre", { children: [
|
|
11
|
+
"Unknown type (",
|
|
12
|
+
block.type,
|
|
13
|
+
"): ",
|
|
14
|
+
JSON.stringify(block.props)
|
|
15
|
+
] });
|
|
19
16
|
}
|
|
20
17
|
return null;
|
|
21
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comet/site-react",
|
|
3
|
-
"version": "9.0.0-canary-
|
|
3
|
+
"version": "9.0.0-canary-20251001104910",
|
|
4
4
|
"description": "Comet Site React package",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"jest": "^29.7.0",
|
|
40
40
|
"jest-environment-jsdom": "^29.7.0",
|
|
41
41
|
"jest-junit": "^16.0.0",
|
|
42
|
-
"npm-run-all2": "^
|
|
42
|
+
"npm-run-all2": "^8.0.0",
|
|
43
43
|
"prettier": "^3.6.2",
|
|
44
44
|
"react": "^18.3.1",
|
|
45
45
|
"rimraf": "^6.0.1",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"typescript": "5.8.3",
|
|
51
51
|
"vite": "^5.4.19",
|
|
52
52
|
"vite-plugin-dts": "^4.5.4",
|
|
53
|
-
"@comet/cli": "9.0.0-canary-
|
|
54
|
-
"@comet/eslint-config": "9.0.0-canary-
|
|
53
|
+
"@comet/cli": "9.0.0-canary-20251001104910",
|
|
54
|
+
"@comet/eslint-config": "9.0.0-canary-20251001104910"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"react": "^18.0.0"
|