@supernova-studio/client 0.10.0 → 0.10.2
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 -18
- package/dist/index.d.ts +18 -18
- package/dist/index.js +12 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/docs-editor/blocks-to-prosemirror.ts +4 -2
- package/src/docs-editor/prosemirror-to-blocks.ts +7 -2
package/package.json
CHANGED
|
@@ -466,13 +466,15 @@ function richTextHeadingLevel(property: PageBlockDefinitionProperty): number | u
|
|
|
466
466
|
function serializeCalloutType(calloutType: PageBlockCalloutType) {
|
|
467
467
|
switch (calloutType) {
|
|
468
468
|
case "Error":
|
|
469
|
-
return "
|
|
469
|
+
return "critical";
|
|
470
470
|
case "Info":
|
|
471
471
|
return "neutral";
|
|
472
472
|
case "Success":
|
|
473
|
-
return "
|
|
473
|
+
return "positive";
|
|
474
474
|
case "Warning":
|
|
475
475
|
return "warning";
|
|
476
|
+
case "Primary":
|
|
477
|
+
return "primary";
|
|
476
478
|
}
|
|
477
479
|
}
|
|
478
480
|
|
|
@@ -40,6 +40,7 @@ import {
|
|
|
40
40
|
PageBlockAppearanceV2,
|
|
41
41
|
ColorValue,
|
|
42
42
|
nullishToOptional,
|
|
43
|
+
PageBlockItemFigmaNodeValue,
|
|
43
44
|
} from "@supernova-studio/model";
|
|
44
45
|
import { PageBlockEditorModel } from "./model/block";
|
|
45
46
|
import { DocumentationPageEditorModel } from "./model/page";
|
|
@@ -169,14 +170,16 @@ function parseCalloutType(prosemirrorCalloutType: unknown): PageBlockCalloutType
|
|
|
169
170
|
if (!prosemirrorCalloutType) return undefined;
|
|
170
171
|
|
|
171
172
|
switch (prosemirrorCalloutType) {
|
|
172
|
-
case "
|
|
173
|
+
case "critical":
|
|
173
174
|
return "Error";
|
|
174
175
|
case "neutral":
|
|
175
176
|
return "Info";
|
|
176
|
-
case "
|
|
177
|
+
case "positive":
|
|
177
178
|
return "Success";
|
|
178
179
|
case "warning":
|
|
179
180
|
return "Warning";
|
|
181
|
+
case "primary":
|
|
182
|
+
return "Primary";
|
|
180
183
|
}
|
|
181
184
|
}
|
|
182
185
|
|
|
@@ -647,6 +650,8 @@ function valueSchemaForPropertyType(type: PageBlockDefinitionPropertyType) {
|
|
|
647
650
|
return PageBlockItemAssetValue;
|
|
648
651
|
case "AssetProperty":
|
|
649
652
|
return PageBlockItemAssetPropertyValue;
|
|
653
|
+
case "FigmaNode":
|
|
654
|
+
return PageBlockItemFigmaNodeValue;
|
|
650
655
|
case "EmbedURL":
|
|
651
656
|
return PageBlockItemEmbedValue;
|
|
652
657
|
case "URL":
|