lucid-extension-sdk
Advanced tools
Comparing version 0.0.245 to 0.0.246
@@ -48,2 +48,3 @@ import { SerializedFieldTypeDefinition } from './core/data/fieldtypedefinition/fieldtypedefinition'; | ||
CreateDocumentElement = "cde", | ||
CreateGroup = "cg", | ||
CreateLine = "cl", | ||
@@ -245,2 +246,6 @@ CreatePage = "cp", | ||
}; | ||
[CommandName.CreateGroup]: { | ||
query: CreateGroupQuery; | ||
result: CreateGroupResult; | ||
}; | ||
[CommandName.CreateLine]: { | ||
@@ -891,2 +896,12 @@ query: CreateLineQuery; | ||
export type CreateBlockResult = string; | ||
export type CreateGroupQuery = { | ||
/** | ||
* By default, we add the group to the current page & currently active group. If specified, the | ||
* group will instead be created as a direct child of the given page. | ||
*/ | ||
'p'?: string | undefined; | ||
/** List of item IDs to group */ | ||
'i': string[]; | ||
}; | ||
export type CreateGroupResult = string; | ||
export type CreateCollectionFieldDefinition = { | ||
@@ -893,0 +908,0 @@ /** Name of the field */ |
@@ -26,2 +26,3 @@ "use strict"; | ||
["cde" /* CommandName.CreateDocumentElement */, 'CreateDocumentElement'], | ||
["cg" /* CommandName.CreateGroup */, 'CreateGroup'], | ||
["cl" /* CommandName.CreateLine */, 'CreateLine'], | ||
@@ -28,0 +29,0 @@ ["cp" /* CommandName.CreatePage */, 'CreatePage'], |
@@ -90,2 +90,9 @@ import { GetItemsAtSearchType, GetLLMContextType, MermaidDiagramType } from '../commandtypes'; | ||
/** | ||
* Creates a new group from a list of items. | ||
* | ||
* @param blocks A non-empty array of items to group | ||
* @returns The added group | ||
*/ | ||
groupBlocks(blocks: BlockProxy[]): GroupProxy; | ||
/** | ||
* Add a new line to this page. | ||
@@ -92,0 +99,0 @@ * @param def The definition of the new line to add |
@@ -132,2 +132,15 @@ "use strict"; | ||
/** | ||
* Creates a new group from a list of items. | ||
* | ||
* @param blocks A non-empty array of items to group | ||
* @returns The added group | ||
*/ | ||
groupBlocks(blocks) { | ||
const id = this.client.sendCommand("cg" /* CommandName.CreateGroup */, { | ||
'p': this.id, | ||
'i': blocks.map((block) => block.id), | ||
}); | ||
return new groupproxy_1.GroupProxy(id, this.client); | ||
} | ||
/** | ||
* Add a new line to this page. | ||
@@ -134,0 +147,0 @@ * @param def The definition of the new line to add |
{ | ||
"name": "lucid-extension-sdk", | ||
"version": "0.0.245", | ||
"version": "0.0.246", | ||
"description": "Utility classes for writing Lucid Software editor extensions", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
742463
17217