@supernova-studio/client 0.11.0 → 0.12.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.mts +18 -324
- package/dist/index.d.ts +18 -324
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/docs-editor/prosemirror-to-blocks.ts +2 -1
package/package.json
CHANGED
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
ColorValue,
|
|
42
42
|
nullishToOptional,
|
|
43
43
|
PageBlockItemFigmaNodeValue,
|
|
44
|
+
PageBlockColorV2,
|
|
44
45
|
} from "@supernova-studio/model";
|
|
45
46
|
import { PageBlockEditorModel } from "./model/block";
|
|
46
47
|
import { DocumentationPageEditorModel } from "./model/page";
|
|
@@ -530,7 +531,7 @@ function parseAppearance(prosemirrorNode: ProsemirrorNode): PageBlockAppearanceV
|
|
|
530
531
|
|
|
531
532
|
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor", z.string().optional());
|
|
532
533
|
if (backgroundColor) {
|
|
533
|
-
const parsedColor =
|
|
534
|
+
const parsedColor = PageBlockColorV2.safeParse(JSON.parse(backgroundColor));
|
|
534
535
|
if (parsedColor.success) {
|
|
535
536
|
appearance.itemBackgroundColor = parsedColor.data;
|
|
536
537
|
}
|