@supernova-studio/client 0.38.0 → 0.39.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 +1 -29
- package/dist/index.d.ts +1 -29
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/yjs/docs-editor/prosemirror-to-blocks.ts +8 -2
package/dist/index.d.mts
CHANGED
|
@@ -17188,35 +17188,7 @@ declare function getMockPageBlockDefinitions(): PageBlockDefinition[];
|
|
|
17188
17188
|
declare function yDocToPage(yDoc: Y.Doc, definitions: PageBlockDefinition[]): DocumentationPageEditorModel;
|
|
17189
17189
|
declare function yXmlFragmentToPage(fragment: Y.XmlFragment, definitions: PageBlockDefinition[]): DocumentationPageEditorModel;
|
|
17190
17190
|
declare function prosemirrorDocToPage(prosemirrorDoc: ProsemirrorNode, definitions: PageBlockDefinition[]): DocumentationPageEditorModel;
|
|
17191
|
-
declare function shallowProsemirrorNodeToBlock(prosemirrorNode: ProsemirrorNode, definition: PageBlockDefinition):
|
|
17192
|
-
id: string;
|
|
17193
|
-
type: "Block";
|
|
17194
|
-
data: {
|
|
17195
|
-
items: {
|
|
17196
|
-
id: string;
|
|
17197
|
-
props: Record<string, {
|
|
17198
|
-
value?: any;
|
|
17199
|
-
} & Record<string, any>>;
|
|
17200
|
-
linksTo?: {
|
|
17201
|
-
type: "DocumentationItem" | "PageHeading" | "Url";
|
|
17202
|
-
documentationItemId?: string | undefined;
|
|
17203
|
-
pageHeadingId?: string | undefined;
|
|
17204
|
-
url?: string | undefined;
|
|
17205
|
-
openInNewTab?: boolean | undefined;
|
|
17206
|
-
} | undefined;
|
|
17207
|
-
}[];
|
|
17208
|
-
packageId: string;
|
|
17209
|
-
indentLevel: number;
|
|
17210
|
-
variantId?: string | undefined;
|
|
17211
|
-
appearance?: {
|
|
17212
|
-
itemBackgroundColor?: {
|
|
17213
|
-
value: string;
|
|
17214
|
-
referencedTokenId?: string | undefined;
|
|
17215
|
-
} | undefined;
|
|
17216
|
-
numberOfColumns?: number | undefined;
|
|
17217
|
-
} | undefined;
|
|
17218
|
-
};
|
|
17219
|
-
}[];
|
|
17191
|
+
declare function shallowProsemirrorNodeToBlock(prosemirrorNode: ProsemirrorNode, definition: PageBlockDefinition): PageBlockEditorModel | null;
|
|
17220
17192
|
declare function prosemirrorNodeToSection(prosemirrorNode: ProsemirrorNode, definitions: PageBlockDefinition[]): PageSectionEditorModel | null;
|
|
17221
17193
|
declare function prosemirrorNodesToBlocks(prosemirrorNodes: ProsemirrorNode[], definitions: PageBlockDefinition[]): {
|
|
17222
17194
|
id: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -17188,35 +17188,7 @@ declare function getMockPageBlockDefinitions(): PageBlockDefinition[];
|
|
|
17188
17188
|
declare function yDocToPage(yDoc: Y.Doc, definitions: PageBlockDefinition[]): DocumentationPageEditorModel;
|
|
17189
17189
|
declare function yXmlFragmentToPage(fragment: Y.XmlFragment, definitions: PageBlockDefinition[]): DocumentationPageEditorModel;
|
|
17190
17190
|
declare function prosemirrorDocToPage(prosemirrorDoc: ProsemirrorNode, definitions: PageBlockDefinition[]): DocumentationPageEditorModel;
|
|
17191
|
-
declare function shallowProsemirrorNodeToBlock(prosemirrorNode: ProsemirrorNode, definition: PageBlockDefinition):
|
|
17192
|
-
id: string;
|
|
17193
|
-
type: "Block";
|
|
17194
|
-
data: {
|
|
17195
|
-
items: {
|
|
17196
|
-
id: string;
|
|
17197
|
-
props: Record<string, {
|
|
17198
|
-
value?: any;
|
|
17199
|
-
} & Record<string, any>>;
|
|
17200
|
-
linksTo?: {
|
|
17201
|
-
type: "DocumentationItem" | "PageHeading" | "Url";
|
|
17202
|
-
documentationItemId?: string | undefined;
|
|
17203
|
-
pageHeadingId?: string | undefined;
|
|
17204
|
-
url?: string | undefined;
|
|
17205
|
-
openInNewTab?: boolean | undefined;
|
|
17206
|
-
} | undefined;
|
|
17207
|
-
}[];
|
|
17208
|
-
packageId: string;
|
|
17209
|
-
indentLevel: number;
|
|
17210
|
-
variantId?: string | undefined;
|
|
17211
|
-
appearance?: {
|
|
17212
|
-
itemBackgroundColor?: {
|
|
17213
|
-
value: string;
|
|
17214
|
-
referencedTokenId?: string | undefined;
|
|
17215
|
-
} | undefined;
|
|
17216
|
-
numberOfColumns?: number | undefined;
|
|
17217
|
-
} | undefined;
|
|
17218
|
-
};
|
|
17219
|
-
}[];
|
|
17191
|
+
declare function shallowProsemirrorNodeToBlock(prosemirrorNode: ProsemirrorNode, definition: PageBlockDefinition): PageBlockEditorModel | null;
|
|
17220
17192
|
declare function prosemirrorNodeToSection(prosemirrorNode: ProsemirrorNode, definitions: PageBlockDefinition[]): PageSectionEditorModel | null;
|
|
17221
17193
|
declare function prosemirrorNodesToBlocks(prosemirrorNodes: ProsemirrorNode[], definitions: PageBlockDefinition[]): {
|
|
17222
17194
|
id: string;
|
package/dist/index.js
CHANGED
|
@@ -7667,7 +7667,7 @@ function prosemirrorDocToPage(prosemirrorDoc, definitions) {
|
|
|
7667
7667
|
};
|
|
7668
7668
|
}
|
|
7669
7669
|
function shallowProsemirrorNodeToBlock(prosemirrorNode, definition) {
|
|
7670
|
-
return prosemirrorNodeAndDefinitionToBlock(prosemirrorNode, definition, /* @__PURE__ */ new Map([[definition.id, definition]]), 0);
|
|
7670
|
+
return _nullishCoalesce(prosemirrorNodeAndDefinitionToBlock(prosemirrorNode, definition, /* @__PURE__ */ new Map([[definition.id, definition]]), 0)[0], () => ( null));
|
|
7671
7671
|
}
|
|
7672
7672
|
function prosemirrorNodeToSection(prosemirrorNode, definitions) {
|
|
7673
7673
|
const definitionsById = mapByUnique2(definitions, (d) => d.id);
|