@comet/site-react 7.25.2 → 7.25.3-canary-20250721064910
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.
|
@@ -8,7 +8,8 @@ interface SkeletonProps extends PropsWithChildren {
|
|
|
8
8
|
color?: string;
|
|
9
9
|
title?: ReactNode;
|
|
10
10
|
customContainer?: ReactNode;
|
|
11
|
+
fill?: boolean;
|
|
11
12
|
}
|
|
12
|
-
declare const PreviewSkeleton: ({ children, customContainer, title, type, aspectRatio, height: passedHeight, hasContent, color, backgroundColor, }: SkeletonProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
declare const PreviewSkeleton: ({ children, customContainer, title, type, aspectRatio, height: passedHeight, hasContent, color, backgroundColor, fill, }: SkeletonProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
13
14
|
export { PreviewSkeleton };
|
|
14
15
|
//# sourceMappingURL=PreviewSkeleton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreviewSkeleton.d.ts","sourceRoot":"","sources":["../../src/previewskeleton/PreviewSkeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAK/D,UAAU,aAAc,SAAQ,iBAAiB;IAC7C,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,eAAe,CAAC,EAAE,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"PreviewSkeleton.d.ts","sourceRoot":"","sources":["../../src/previewskeleton/PreviewSkeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAK/D,UAAU,aAAc,SAAQ,iBAAiB;IAC7C,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,QAAA,MAAM,eAAe,6HAWlB,aAAa,mDA+Cf,CAAC;AAsBF,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -11,7 +11,8 @@ const PreviewSkeleton = ({
|
|
|
11
11
|
height: passedHeight,
|
|
12
12
|
hasContent,
|
|
13
13
|
color = "#A8A7A8",
|
|
14
|
-
backgroundColor = type === "media" ? "#efefef" : "#E0DDE0"
|
|
14
|
+
backgroundColor = type === "media" ? "#efefef" : "#E0DDE0",
|
|
15
|
+
fill = false
|
|
15
16
|
}) => {
|
|
16
17
|
const preview = usePreview();
|
|
17
18
|
const validAspectRatio = getValidAspectRatio(aspectRatio);
|
|
@@ -27,7 +28,7 @@ const PreviewSkeleton = ({
|
|
|
27
28
|
/* @__PURE__ */ jsx("div", { className: styles.rowSkeleton, style: { "--width": "50%", "--background-color": backgroundColor, "--color": color } })
|
|
28
29
|
] });
|
|
29
30
|
} else if (type === "media") {
|
|
30
|
-
const height = passedHeight ?? 300;
|
|
31
|
+
const height = fill ? "100%" : passedHeight ?? 300;
|
|
31
32
|
return /* @__PURE__ */ jsx(
|
|
32
33
|
"div",
|
|
33
34
|
{
|
|
@@ -35,7 +36,7 @@ const PreviewSkeleton = ({
|
|
|
35
36
|
style: {
|
|
36
37
|
"--background-color": backgroundColor,
|
|
37
38
|
"--color": color,
|
|
38
|
-
...validAspectRatio === void 0 ? { "--height": typeof height === "string" ? height : `${height}px` } : { "--aspect-ratio": validAspectRatio }
|
|
39
|
+
...validAspectRatio === void 0 || fill ? { "--height": typeof height === "string" ? height : `${height}px` } : { "--aspect-ratio": validAspectRatio }
|
|
39
40
|
},
|
|
40
41
|
children: title
|
|
41
42
|
}
|
package/lib/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._childrenWrapper_qguhx_1{position:relative;z-index:1}.
|
|
1
|
+
._previewElementContainer_nwhl6_1{display:contents}._childrenWrapper_qguhx_1{position:relative;z-index:1}._barSkeleton_zomv4_1{min-height:20px;margin-bottom:5px;margin-right:5px;background-color:var(--background-color);color:var(--color)}._rowsContainer_zomv4_9{width:100%;min-width:300px}._rowSkeleton_zomv4_14{margin-bottom:10px;min-height:20px;width:var(--width);background-color:var(--background-color);color:var(--color)}._imageContainer_zomv4_22{width:100%;aspect-ratio:var(--aspect-ratio);height:var(--height);background-color:var(--background-color);color:var(--color)}._root_v4248_1{position:absolute;z-index:2;top:0;left:0;right:0;min-height:100vh;height:var(--height)}._root_1ya0k_1{position:absolute;cursor:pointer;outline:1px solid transparent;outline-offset:-1px}._root_1ya0k_1:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;opacity:.25}._root_1ya0k_1:hover{outline-color:#29b6f6;outline-style:solid}._root_1ya0k_1:hover:after{background-color:#29b6f6}._isHoveredInBlockList_1ya0k_24{outline-color:#29b6f6;outline-style:solid}._isHoveredInBlockList_1ya0k_24:after{background-color:#29b6f6}._showBlockOutlines_1ya0k_32:not(:hover){outline-color:#d9d9d9;outline-style:dashed}._blockIsSelected_1ya0k_37{outline-color:#29b6f6}._blockIsSelected_1ya0k_37 ._label_1ya0k_40{display:inline-block}._label_1ya0k_40{position:absolute;padding:2px;background-color:#57b0eb;line-height:16px;color:#fff;top:1px;right:1px;font-size:12px;display:none}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comet/site-react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.25.
|
|
4
|
+
"version": "7.25.3-canary-20250721064910",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/vivid-planet/comet",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"typescript": "^4.0.0",
|
|
55
55
|
"vite": "^5.1.6",
|
|
56
56
|
"vite-plugin-dts": "^4.5.3",
|
|
57
|
-
"@comet/cli": "7.25.
|
|
58
|
-
"@comet/eslint-config": "7.25.
|
|
57
|
+
"@comet/cli": "7.25.3-canary-20250721064910",
|
|
58
|
+
"@comet/eslint-config": "7.25.3-canary-20250721064910"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"react": "^18.0.0",
|